Taxi::Mysql::Query::YYLexer - extendable full-text index using mysql: query lexer


NAME

Taxi::Mysql::Query::YYLexer - extendable full-text index using mysql: query lexer (low-level)

(Back to Top)


SYNOPSIS

 ##========================================================================
 ## PRELIMINARIES
 use Taxi::Mysql::Query::YYLexer;
 ##========================================================================
 ## Constructors etc.
 $q = $CLASS_OR_OBJ->new();
 ##========================================================================
 ## Subs: unquoting
 $str_unquoted = unquote($str, $start_str='', $end_str=$start_str, $escape_str='\\');
 ##========================================================================
 ## Testing: dummy lexing
 $text = $lexer->dummylex(@from_whatever);

(Back to Top)


DESCRIPTION

Taxi::Mysql::Query::YYLexer provides the low-level lexical analyzer for the Taxi::Mysql::Query::Parser query parser class. The YYLexer module uses Parse::Lex to implement the low-level scanner. Due to problems with the underlying Parse::Lex module, Taxi::Mysql::Query::YYLexer objects are not true multiple-instance-safe objects. This will be repaired whenever I or anyone else writes a good object safe replacement for Parse::Lex. Until then, either deal with it or make a better suggestion.

Globals etc.

Variable: @ISA

Taxi::Mysql::YYLexer inherits from Parse::Lex. This is probably a Bad Thing, and could easily be changed to a 'uses' relation, but such a change would only serve to hide bugs in Parse::Lex which could potentially wreak great havoc.

Variable: $ST_PLAIN

Partial regex: characters to be considered 'plain letters'.

Variable: $ST_SYMBOL_WORD

Partial regex: literal ``symbol'' regex for search tokens.

Variable: @LEXER_TOKENS

Passed to underlying Parse::Lex::new() method.

Constructors etc.

new
 $q = $CLASS_OR_OBJ->new();

Constructor.

Subs: unquoting

unquote
 $str_unquoted = unquote($str, $start_str='', $end_str=$start_str, $escape_str='\\');

Utility function for unquoting string tokens as returned by Parse::Lex methods.

Testing: dummy lexing

dummylex
 $text = $lexer->dummylex(@from_whatever);

For debugging.

(Back to Top)


ACKNOWLEDGEMENTS

Perl by Larry Wall.

(Back to Top)


AUTHOR

Bryan Jurish <moocow@ling.uni-potsdam.de>

(Back to Top)


COPYRIGHT AND LICENSE

Copyright (C) 2006 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.

(Back to Top)


SEE ALSO

perl(1), Taxi::Mysql(3perl), Taxi::Mysql::Query::Parser(3perl), Taxi::Mysql::Query::YYParser(3perl).

(Back to Top)

 Taxi::Mysql::Query::YYLexer - extendable full-text index using mysql: query lexer