bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another error handling (Was: Reductions during Bison error handling)


From: Paul Hilfinger
Subject: Re: Another error handling (Was: Reductions during Bison error handling)
Date: Sun, 26 May 2002 15:05:28 -0700

> If we were to try to reimplement the somewhat more powerful scheme
> that was (almost) implemented before, and to fix it, doesn't your
> example demonstrate that we simply need to ``yyunlex'' the lookahead
> when we find an error, and pretend the current lookahead is error?  It
> seems to answer this scenario.  But maybe it's too naive.

I don't quite understand what the "more powerful scheme" is supposed
to be.  That is, I don't know if allowing additional reductions in the
midst of error recovery is "more powerful" or just "more confusing". 

That aside, the answer is "not exactly". The effect of the recent
error-recovery changes to bison.simple is same as interpolating
'error' before the next token, EXCEPT that we never take a reduction
with the error token as lookahead.

Paul H.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]