JLexPHP: a Lexical Analyzer Generator for PHP, based on JLex. For copyright and licensing information, see the COPYING file.
This is an adaptation of some Java code that generates lexers from lex style input files.
The porting effort was pretty trivial, with the hardest part being the buffer management.
Usage is fairly typical of lexers; you'll want to create a lexer file like this:
The syntax is described here.
Parser that extends AbstractLexer
requires lexer generated by JLexPHP.
Via Composer:
composer require rnapoles/jlex-php-library
Some examples is contained in the link-demos directory in root of repo.
- Reinier Nápoles Martínez
- Eridan Domoratskiy
- Wez Furlong is author of original
JLexPHP
- Elliot Joel Berk and C. Scott Ananian is authors of
JLex
The MIT License (MIT). Please see License File for more information.