bug-bison
[Top][All Lists]
Advanced

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

Re: Locations and mid-rule actions


From: Frank Heckenbach
Subject: Re: Locations and mid-rule actions
Date: Wed, 22 Dec 2004 13:10:55 +0100
User-agent: semail 20041018

Paul Eggert wrote:

> > BTW, the documentation (changes of 12 Dec, sorry if it's been
> > updated meanwhile) seems a bit unclear on whether or not it is only
> > defined if N = 0:
> >
> > : where @code{YYRHSLOC (rhs, k)} is the location of the @var{k}th symbol
> > : in @var{rhs} when @var{k} is positive, and the location of the symbol
> > : just before the reduction when @var{k} is zero.
> >
> > This doesn't say that N = 0 is required.
> >
> > : For consistency with semantic actions, valid indexes within the
> > : right hand side range from 1 to @var{n}.  When @var{n} is zero, only 0 is 
> > a
> > : valid index, and it refers to the symbol just before the reduction.
> >
> > But this would imply so. So which one is true?
> 
> They're both true.  The first one doesn't state the implication (it
> states something else), and the second one does.

So YYRHSLOC(yyRhs, 0) is *not* valid for if N > 0, right? (Because
the 2nd paragraph says the range is from 1 to N.)

Then I'd suggest to put this restriction in the first paragraph as
well because by reading just this paragraph one would assume it's
always available.

< just before the reduction when @var{k} is zero.
> just before the reduction when @var{k} is zero and @var{n} is zero.

Frank

-- 
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)




reply via email to

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