NAME

DBIx::MyParsePP::Lexer - Pure-perl SQL lexer based on MySQL's source

SYNOPSIS

use DBIx::MyParsePP::Lexer;
use Data::Dumper;

my $lexer = DBIx::MyParsePP::Lexer->new($string);

while ( my $token = $lexer->yylex() ) {

	print Dumper $token;
	
	last if $token->type() eq 'END_OF_INPUT';

}

DESCRIPTION

DBIx::MyParsePP::Lexer is a translation of the lexer function from MySQL into pure Perl.

The goal of the translation was to closely follow the method of operation of the original lexer -- therefore performance is suffering at the expense of compatibility. For example, the original character set definitions are used, rather than determining which letter is uppercase or lowercase using a Perl regular expression.

LICENCE

This file contains code derived from code Copyright (C) 2000-2006 MySQL AB

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License in the file named LICENCE for more details.

BUGS

One Lexer object is required for every string being parsed/lexed. Lexer-related options from MySQL are not configurable.