Design overview - mattacosta/php-parser GitHub Wiki

This package uses concepts initially designed for Roslyn to produce a fully-representative syntax tree. This means that the syntax tree describes every character in a source file. Additionally, the parser is also designed to gracefully handle errors and create helpful diagnostics that can be reported back to the user.

For more information see the following topics:

Data structures

Parsing