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: Akim Demaille
Subject: Re: glr: include the created header
Date: Tue, 03 Jan 2006 16:12:46 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

>>> "Joel" == Joel E Denny <address@hidden> writes:

 > On Mon, 19 Dec 2005, Joel E. Denny wrote:
 >> Another possibility is to require the user to handle %union dependencies 
 >> himself.  I often #define YYSTYPE in a YYSTYPE.h that contains its 
 >> dependencies.  I then #include YYSTYPE.h in a literal block.  In the 
 >> scanner, I #include YYSTYPE.h and parser.tab.h.  This is the only way to 
 >> handle non-trivial YYLTYPE definitions right now anyway, right?

 > To clarify that last sentence: I think you agreed that the absence of a 
 > %union should mean that no literal blocks are placed in the header.  This 
 > would mean that a user could not specify that his own YYLTYPE definition 
 > be placed in the header.

 > 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 fact, I don't like parsers without headers :(

Can this wait after 2.2?





reply via email to

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