Hacker News new | ask | show | jobs
by chipdart 742 days ago
> I think it all depends on the language, but I found it (usually) easier to implement the recursive-descending parsers just manually.

I think that packrat parsers are even easier to implement by hand, and even troubleshoot.

It's all procedural code, and you just call the next routine to figure out if you have a token match or not.

More importantly, PEGs promise to be easier to maintain in smaller custom parsers. To support an enum, all you need to do is add a function call, and that's it. One line of code. Can't beat that.