bison-patches
[Top][All Lists]
Advanced

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

Re: `YYERROR;' should not discard lookahead token


From: Paul Eggert
Subject: Re: `YYERROR;' should not discard lookahead token
Date: 26 Feb 2003 02:43:30 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3

Akim Demaille <address@hidden> writes:

> Am I missing something?

I think so, but I still don't have a test case that illustrates that
(subtle) bug.

While trying to write a test case I found a more serious bug.  A
Bison-generated parser can go into an infinite loop shifting and
reducing error tokens, in a case where a Yacc-generated parser does
just fine.  The basic problem is that the Bison-generated parser
reduces after doing the user actions.  It should reduce before doing
the actions, because the actions might invoke YYERROR, and YYERROR
should apply after the reduction and not before.  I'll look into this
more-important case first.

If it's any consolation, Bison 1.28 has the same bug.




reply via email to

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