4 ms·
This should probably be titled "why I like LR parsers". There was basically no discussion of PEGs or parser combinators, just a footnote that he doesn't care f
by samatman 6y ago
This should probably be titled "why I like LR parsers".
There was basically no discussion of PEGs or parser combinators, just a footnote that he doesn't care for them.
Which is fine! LR parsing is a great approach, he's committed significant amounts of his life energy to working with them.
I think PEGs are great, though, I'd recommend them to any developer as the default tool for munging structured data. Nearly any mess of regular expressions can be improved with PEGs.
There are unsolved problems in the PEG world, particularly with error recovery. But not insoluble problems by any means.
I'm not quite ready to show my work on PEGs but I can say I've gotten pretty far with the approach. It's noteworthy that he starts with recursive descent, notes that PEGs and combinators (same same basically) generalize recursive descent, and then just kinda walks away from that whole line of inquiry!
But hey, I'm a parsing nerd. I'm glad Laurence Tratt has pushed the state of the art in LR, just like I'm glad Terrence Parr has done the same for LL. I'm working in a similar space with PEG, and have a long way to go.