3 ms·
I'm currently working on a parser generator with easy of use and performance in mind. https://github.com/dragostis/pest https://github.com/dragostis/pest
by dragostis 10y ago
I'm currently working on a parser generator with easy of use and performance in mind.
https://github.com/dragostis/pest https://github.com/dragostis/pest
- ThePhysicist 10y agoLooks interesting! Have you implemented any more complex grammars with this, e.g. Python or Javascript? Would be interested to see how they perform. Also, does it support multi-stage parsing, i.e. generation of a token tree and then a parse tree from it?
- dragostis 10y agoThere is a WIP php parser developed by the community: https://github.com/steffengy/pesty-php/blob/master/src/parser.rs https://github.com/steffengy/pesty-php/blob/master/src/parse... And, yes, it does support multi-stage parsing. After the tokens are generated, there is a process! macro which handles them. This is where you can produce an AST.