Re: Parser generators which implemented Burke-Fisher error correction
- From: Stefan Monnier <monnier@xxxxxxxxxxxxxxxx>
- Date: 20 Apr 2007 10:25:46 -0400
I was interested on implementing the Burke-Fisher error
correction(http://portal.acm.org/citation.cfm?doid=22719.22720)
method in Bison. I want to know that is there any parser generators
implemented this feature? The one I only know is the ML-Yacc,
mentioned in the book "Modern Compiler Implementation in ML". If
there weren't much parser generators implemented it, is it means
that this feature is not useful or some other reasons?
Having used ml-yacc several times, I find the feature extremely
useful: it gives you reasonably good syntax error messages with no
effort whatsoever. I've heard people claim that its error messages
aren't very good, and that's probably true: hand written error
handling might get you further, just like assembly coding can give you
extra performance, but I find ml-yacc's error messages good enough,
and since you get it for free I find it really beneficial.
[Back when we punched our programs on cards, handed the decks to the
operator, and got printouts back an hour later, error correction was
very popular since it offered the chance to find more bugs per run and
decrease the number of runs until your program worked. Now that we do
everything interactively, I don't see much point in the compiler
guessing what you wanted to do rather than just point out where the
error is and letting you fix it. -John]
I don't think of it as a way to "keep parsing past the first error", but
just a way to get better error messages.
Stefan
.
- References:
- Prev by Date: SSA without phi
- Next by Date: rules to generate a context free grammar
- Previous by thread: Re: Parser generators which implemented Burke-Fisher error correction
- Next by thread: Basic parser grammar question
- Index(es):
Relevant Pages
|
|