archives

Error reporting strategies during parsing

Although I've seen lots of great papers on error recovery during parsing, I haven't been able to find much describing how parse errors are reported.

A couple of the problems I'm having:

  1. if the grammar requires lots of lookahead and backtracking to parse, there's potentially *tons* of possible errors to report if the input is invalid. But reporting all of them might be overwhelming/confusing and probably unhelpful
  2. the position reported for an error often doesn't correspond with the actual position at which the user made the mistake
  3. reporting errors inside nested structure

Are there any papers describing error reporting strategies, or parser generators or combinator libraries implementing simple but effective strategies?