|Is there an error correcting parser generator out there? email@example.com (1994-09-26)|
|Re: Is there an error correcting parser generator out there? firstname.lastname@example.org (Terence Parr) (1994-09-30)|
|Re: Re: Is there an error correcting parser generator out there? email@example.com (Raul Deluth Miller) (1994-10-03)|
|Re: Re: Is there an error correcting parser generator out there? firstname.lastname@example.org (Boris Burshteyn) (1994-10-04)|
|Re: Re: Is there an error correcting parser generator out there? email@example.com (1994-10-05)|
|From:||Raul Deluth Miller <firstname.lastname@example.org>|
|Keywords:||errors, parse, tools|
|Date:||Mon, 3 Oct 1994 12:45:49 GMT|
: Let's consider a simple example. Assuming an input of
: if 3+* then ...
: for some rule:
: stat: IF expr THEN stat | ... ;
: we would like to see a nice error message like:
: file(line): error at "*": bad conditional of IF
: I argue that, while an automatic mechanism might be able to recover
: from this error, the error reporting facility could only generate
: something like
: file(line): error at "*" in expression
To generate the "nice" error message using yacc, the error recovery
could be structured like this:
 Build error recovery into your expression syntax.
 Keep a data structure to record the details of the form of the
 Defer reporting of error recovery to the statement level.
Basically, at each significant production, begin by checking for
errors which would have occurred during the text which lead to
recognition of that production.
Then again, perhaps the use of programmer defined data structures
implies that this is "outside the scope of yacc"?
Raul D. Miller
Return to the
Search the comp.compilers archives again.