Language parser library written in PHP
问题 I am looking for a language parser written in PHP . The goal is to read a custom language , not read PHP code. Basically, I want to specify a language syntax, give a code snippet and get back a structure representing it. Then I can traverse that structure to execute the code snippet. I believe the structure will be an AST , but I don't know if this is the only option (I am not intimate with parsers and their vocabulary). I had a look at the Doctrine DQL parser but it doesn't seem like a