bug-bison
[Top][All Lists]
Advanced

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

Re: $<out of range>


From: Paul Eggert
Subject: Re: $<out of range>
Date: Thu, 25 Apr 2002 16:25:49 -0700 (PDT)

> Cc: address@hidden
> From: Akim Demaille <address@hidden>
> Date: 25 Apr 2002 22:36:02 +0200
> User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)
> 
> 
> Paul> No, it's allowed.  POSIX says of `$number':
> 
> Paul>   If number refers to an element past the current point in the
> Paul> rule, or beyond the bottom of the stack, the result is
> Paul> undefined.
> 
> Paul> Here the "current point in the rule" is 3, so $3 is allowed.
> 
> Are you sure the current point is not 2?

I suppose one could argue that, yes, but it's a bit odd to say that
the "current point" is 2 when we're in the middle of analyzing the 3rd
component.

I think it's just a minor wording bug in the standard.  Wouldn't be
the first time.  As mentioned earlier it's OK for Bison to reject $3,
given that yacc etc. do.



reply via email to

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