bison-patches
[Top][All Lists]
Advanced

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

Re: glr: include the created header


From: Joel E. Denny
Subject: Re: glr: include the created header
Date: Sun, 11 Jun 2006 15:30:12 -0400 (EDT)

On Tue, 3 Jan 2006, Joel E. Denny wrote:

> On Tue, 3 Jan 2006, Akim Demaille wrote:
> 
> > >>> "Joel" == Joel E Denny <address@hidden> writes:
> > 
> >  > To accommodate YYSTYPE dependencies, YYLTYPE dependencies, a non-%union 
> >  > YYSTYPE definition, a user YYLTYPE definition, or anything else the user 
> >  > might wish to place in the header, perhaps there should be some sort of 
> >  > general `header' qualifier for any literal block:
> > 
> >  >   %header{
> >  >     /* C code */
> >  >   %}
> > 
> > I dislike the difference that it introduces between a parser with
> > %defines, and another without.  That's another thing I enjoy with the
> > current scheme: there's nothing to change.
> 
> In the current scheme, adding %defines means you should rearrange your 
> bison spec so that no inappropriate code appears in the pre-prologue.  If 
> you forget, you may unknowingly pollute the header.
> 
> In the scheme I'm proposing, adding %defines means you have to rearrange 
> so that appropriate code appears in %header literal blocks.  If you 
> forget, the compiler will complain about missing dependencies from the 
> header, so you'll be sure to find out.
> 
> In either scheme, removing %defines requires no extra work.
> 
> > In fact, I don't like parsers without headers :(
> 
> Neither do I.
> 
> > Can this wait after 2.2?
> 
> Absolutely.

Are we ready to address this now?

The discussion starts here:

  http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html

and continues here:

  http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html

Joel




reply via email to

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