NAME

Parse::Flex - The Fastest Lexer in the West

SYNOPSIS

# Copy your custom library as ENV{PWD}/auto/*.so , or
# as  $ENV{PWD}/auto/Parse/Flex.so . Otherwise, we load the default Flex.so .

cp  /properpath/Flex.so  $ENV{PWD}/auto/libflex_custom1.so

use Parse::Flex;
yying = 'datafile'
yylex() ;

DESCRIPTION

Parse::Flex works similar to Parse::Lex, but it uses XS for faster performance.

This module allows the user to implement a customized lexer analyzer with his own rules. It is expected that you will supply your own rules; otherwise, the default rules might not be very useful.

Custom Rules & Libraries

At present, the easiest way to construct your own lexer is to alter the rules in src/default.y, and then to issue "make realclean; make && make install". This lexer is compatible with Yapp . If you desire compatibility with Bison, you will have to return an int value by modifying Flex.xs. Future versions of Parse::Flex should add Bison compatibility. (Perhaps soon.).

It is good idea to save your new and old Flex.so libraries (under different names) if you wish to use them later to override the default Flex.so library. For details, read the next section about Loading the Custom Library.

Loading the Custom Library

    The bootstrap process loads the first soname library found, using the following rule:

    * If there are *.so libraries in the ${PWD}/auto/ directory, sort them in reverse order (to fetch the latest version), then select the one at the top of the list.

    * If nothing was found, load the Flex.so library from the ${PWD}/auto/Parse/Flex/ directory.

    * Otherwise, load the default Flex.so library installed by MakeMaker.

METHODS

yylex() Get the name of next token, and indirectly sets yytext . Returns undef for end of input.
yyin() Set the name of the input file.
yyout() Set the name of the output file.

EXPORT

yyin, yyout, yylex

AUTHOR

Ioannis Tambouras, <ioannis@earthlink.net>

SEE ALSO

flex(1), Parse::Lex

1 POD Error

The following errors were encountered while parsing the POD:

Around line 81:

Can't have a 0 in =over 0

You can't have =items (as at line 85) unless the first thing after the =over is an =item