[Top][All Lists]

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

Re: undefining YYRHSLOC in the GLR parser

From: Frank Heckenbach
Subject: Re: undefining YYRHSLOC in the GLR parser
Date: Tue, 14 Dec 2004 11:38:34 +0100
User-agent: semail 20041018

Paul Eggert wrote:

> Frank Heckenbach <address@hidden> writes:
> > I wrote a test for it (below), though I could test it only manually,
> > because I don't have autom4te installed, so I hope the test suite
> > format is ok.
> Can you please remind me about this after the next official release
> is out?  We can integrate the test then.


> > I don't know the context exactly, so I can't tell if it's possibly
> > to copy the complete structure, or to use YYLLOC_DEFAULT in some
> > way. Otherwise one might need another macro there ...
> I think we need another macro.  Perhaps a macro that says "copy the
> trailing edge of a location"?

AFAICT from the comment, the code is there to merge the location of
an error token with that of a discarded look-ahead. So perhaps one
could reuse YYLLOC_DEFAULT like this:

- call YYLLOC_DEFAULT with N=2 (this might involve creating a
  temporary array of these two locations)

- copy the result entirely to the error location

But I'm not sure if this could have any unwanted side-effects ...


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

reply via email to

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