Thanks, but it still seems to me that the first (“parser”) part is very much like a PEG.
It’s the “generator” part that matches on objects (AST), generated by the parser, but I’m not sure why that’s useful:
- in the toy example the evaluation could happen right in the parser,
- and if you decide to have an AST, why use a DSL that looks similar to the grammar definition to walk it?
It’s the “generator” part that matches on objects (AST), generated by the parser, but I’m not sure why that’s useful: - in the toy example the evaluation could happen right in the parser, - and if you decide to have an AST, why use a DSL that looks similar to the grammar definition to walk it?