Specifies the rules that define your context-free grammar, and then gain the ability to parse any text source. The output is an abstract syntax tree ready for semantic analysis.
- Powerful recursive-descent parser
- 100% unit-test coverage
- Ultra-lightweight (just one small file)
- PHP >= 5.3
This package is released under an open-source license: LGPL-3.0
If you're using Composer, you can use this package (datto/php-parser) by inserting a line into the "require" section of your "composer.json" file:
"datto/php-parser": "~3.0"
You can run the suite of unit tests from the project directory like this:
./vendor/bin/phpunit