Top Level :: PHP

Package Information: PHP_ParserGenerator

» Summary» License
translate grammar files in Lemon Parser Generator format into a PHP 5 parserNew BSD License
» Current Release» Bug Summary
0.1.5 (alpha) was released on 2007-03-05 (Changelog)
  • Package Maintenance Rank: 94 of 162 packages with open bugs
  • Number of open bugs: 3 (12 total bugs)
  • Average age of open bugs: 317 days
  • Oldest open bug: 416 days
» Description
Translate a grammar file in the lemon parser generator format
into a PHP 5-based parser

There are a few PHP-specific changes to the lemon parser generator.

- %extra_argument is removed, as class constructor can be used to
pass in extra information
- %token_type and company are irrelevant in PHP, and so are removed
- %declare_class is added to define the parser class name and any
implements/extends information
- %include_class is added to allow insertion of extra class information
such as constants, a class constructor, etc.

Other changes make the parser more robust, and also make reporting
syntax errors simpler. Detection of expected tokens eliminates some
problematic edge cases where an unexpected token could cause the parser
to simply accept input.

Otherwise, the file format is identical to the Lemon parser generator
» Maintainers» More Information