PHP-Yacc
PHP-Yacc copied to clipboard
Running example code
If I want to see how code in examples
is working, what Lexer class should I use?
I tried to run 00-basic-usage example with Lexer from nikic/php-parser
, but I keep getting this error:
Fatal error: Uncaught RangeException: The lexer returned an invalid token (id=317, value=1) in /development/PHP-Yacc/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php:204
I think this package is too bugged (examples, at least, they are broken). If you want to rebuild exactly PhpParser, better clone https://github.com/nikic/PHP-Parser/tree/master/grammar, that one should work fine (rebuildParsers.php).