On Mon, Jul 20, 2009 at 07:42:49PM +0200, Bill Allombert wrote: > On Tue, Apr 03, 2007 at 11:57:48PM +0200, Bill Allombert wrote: > > Package: bison-doc > > Version: 1:2.3.dfsg-4 > > Severity: wishlist > > > > Hello Chuan-kai, > > > > The documentation of YYLLOC_DEFAULT states that: > > When defining `YYLLOC_DEFAULT', you should consider that: > > > > * For consistency with semantic actions, valid indexes within the > > right hand side range from 1 to N. When N is zero, only 0 is a > > valid index, and it refers to the symbol just before the reduction. > > During error processing N is always positive. > > > > But it does not state what happens if N=0 for the first symbol, > > and how YYLLOC_DEFAULT can deal with that. > > I got a partial answer: > http://lists.gnu.org/archive/html/help-bison/2009-07/msg00004.html > It is possible to initialize yylloc in initial-action: > For example: > %initial-action{ @$.start=0;@$.end=0;} > The documentation should mention that possibility.
Upstream added this documentation in commit d59e456dbf5d9747e2fe0c0539f2ec670ce6f9c4 Cheers, -- Bill. <ballo...@debian.org> Imagine a large red swirl here. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org