News for hackers. Stuff that matters.
Re:GHC Parser Principles by tom_mellior on Tuesday May 15, 2018 @09:48AM (#17073867)
> A hand-written parser can have better error recovery and more helpful error messages.

That depends on what you're comparing to. The Menhir parser generator can generate a file with all possible "error states" in the parser in which you can specify very nice and friendly error messages for each one.

I've posted this before: http://gallium.inria.fr/~fpottier/slides/fpottier-2015-11-ou... (ignore the French title, the rest is in English). The examples for a C grammar in Menhir show much better error messages than the hand-written GCC ones.

There are no comments on this comment yet.