datto/php-parser

This package is abandoned and no longer maintained. No replacement package was suggested.

Define and parse a context-free grammar

3.1.0 2015-08-13 01:58 UTC

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

Author

Spencer Mortensen