4 ms·
I too am a fan of PEG (Parsing Expression Grammar [1]), in particular I like that it is pretty easy to write a PEG parser, whereas there is a lot more work and
by pacaro 14y ago
I too am a fan of PEG (Parsing Expression Grammar [1]), in particular I like that it is pretty easy to write a PEG parser, whereas there is a lot more work and housekeeping (IMHO) in implementing an LALR[2] parser.
I find it interesting that the parser generators are so closely bound up with code generation. I like the model where you can specify at runtime: when this non-terminal is parsed, execute that function.
[1] http://en.wikipedia.org/wiki/Parsing_expression_grammar http://en.wikipedia.org/wiki/Parsing_expression_grammar
[2] http://en.wikipedia.org/wiki/LALR_parser http://en.wikipedia.org/wiki/LALR_parser