help-bison
[Top][All Lists]
Advanced

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

Re: Not getting parse error


From: Hans Aberg
Subject: Re: Not getting parse error
Date: Sat, 2 Feb 2002 00:16:25 +0100

At 14:46 -0700 2002/02/01, Rich Yonts wrote:
>  The debug output shows that it detects an invalid
>token:
>
>Reading a token: Next token is 259 (FIELD)
>Shifting token 259 (FIELD), Entering state 22
>Reducing via rule 9 (line 44), FieldList ',' FIELD
>state stack now 0
>Entering state 6
>Reading a token: Next token is 46 ($undefined.)
>Reducing via rule 2 (line 26), FieldList  -> Query
>
>The parser returns a good condition, but shouldn't.  Can you direct me to
>some help or documentation that explains why invalid input can be
>tolerated?

Are you saying that you did not get any error at all, or are you bothered
over the reduction?

If you got an error after a couple of reductions:

Bison (currently) uses LALR(1) (only): In pure LR(1) an error is detected
immediately with no further shifts or reductions. Under LALR and some types
of table compressed LR(1), some additional reductions may be applied (but
no shifts), before the error is detected. See for example Aho et. al.,
"Compilers...", sec. 4.7.

  Hans Aberg





reply via email to

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