4 ms·
"Parsing expression grammars (PEGs) are an alternative to context free grammars for formally specifying syntax" [1] Basically, you have tools for context free
by jmcomets 9y ago
"Parsing expression grammars (PEGs) are an alternative to context free grammars for formally specifying syntax" [1]
Basically, you have tools for context free grammars such as GNU Bison or Yacc. This is an alternative, but with PEG.
For more in-depth info, there's the original PEG paper. [2]
[1]: http://bford.info/packrat http://bford.info/packrat
[2]: http://bford.info/pub/lang/peg http://bford.info/pub/lang/peg
- yellowapple 9y agoThat's the grammar, not the parser resulting from the grammar. The README doesn't say, but most PEGs in the wild (AFAICT) compile down to / are implemented by packrat parsers.