Better error recovery

Colin Paul Gloster <>
14 Aug 2006 15:10:14 -0400

          From comp.compilers

Related articles
Parser validation/test suites ? (Kenn Heinrich) (2006-08-09)
Re: Parser validation/test suites ? (Karsten Nyblad) (2006-08-10)
Better error recovery (Chris F Clark) (2006-08-12)
Better error recovery (Colin Paul Gloster) (2006-08-14)
Re: Better error recovery (Karsten Nyblad) (2006-08-18)
| List of all articles for this month |

From: Colin Paul Gloster <>
Newsgroups: comp.compilers
Date: 14 Aug 2006 15:10:14 -0400
Organization: Compilers Central
References: 06-08-043 06-08-050
Keywords: parse, errors
Posted-Date: 14 Aug 2006 15:10:14 EDT

On Thu, 10 Aug 2006, Karsten Nyblad wrote:


At last, I would avoid parser generators that use the error recovery of
yacc. That error recovery was fine in the early seventies where parser
generators and parsers had to be squeezed down in 16 bit computers, but
it has been outdated for at least 20 years. Today you should expect an
error recovery to be better at guessing the intentions of the programmer
and/or be easier to work with for the compiler writer. I would suggest
that you go hunting for at parser generator with a better error
recovery. Modern parser generators may also have a more powerful
language for describing the language accepted by the generated parser.
These advantages could end up saving you money even if you have to buy
the parser generator."

It is the responsibility of the programmer to provide the compiler
with the intended input. Hand-coded second-guessing of mistakes can
provide much more helpful error messages, but may be issued in
response to more types of mistakes than those they provide helpful
suggestions for.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.