datto / php-parser
Define and parse a context-free grammar
Installs: 118
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 7
Forks: 0
Open Issues: 1
pkg:composer/datto/php-parser
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: ~3.7
This package is not auto-updated.
Last update: 2021-06-26 00:16:02 UTC
README
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.
Features
- Powerful recursive-descent parser
- 100% unit-test coverage
- Ultra-lightweight (just one small file)
Requirements
- PHP >= 5.3
License
This package is released under an open-source license: LGPL-3.0
Installation
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"
Unit tests
You can run the suite of unit tests from the project directory like this:
./vendor/bin/phpunit