help-bison
[Top][All Lists]
Advanced

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

Re: Includes


From: Csaba Raduly
Subject: Re: Includes
Date: Sun, 15 Jan 2012 22:20:21 +0100

On Sun, Jan 15, 2012 at 10:29 AM, Akim Demaille <address@hidden> wrote:
>
> Le 13 janv. 2012 à 16:03, Csaba Raduly a écrit :
>> Bison 2.3 used to write the prologue into the definitions file (the header)
>>
>> Bison 2.4 seems to have changed this and now writes the prologue into
>> the parser implementation file. This has created a problem for me
>> because the %union contains pointers to various user-defined types,
>> but the #includes containing their definitions are no longer written
>> into the bison-generated header file. Manually updating the list of
>> includes in every file that uses the bison-generated header is a pain.
>>
>> %code appears to provide the needed flexibility, but of course it's
>> not recognized by bison 2.3 and I need my code to be compatible with
>> both 2.3 and 2.4.x
>>
>> Is this (i.e. putting #includes into the generated header) possible?
>
> This area was really messy, and as Hans pointed out, %code is really
> the safest way to go.  Is there some reason that prevents you from
> deploying Bison 2.5 instead?

The thing is, it's a corporate software built on corporate machines
(Ubuntu 10, SLES 11) which have either 2.3 or 2.4 installed.
I'll try to lobby my colleagues to ditch 2.3 :)

Csaba
Please CC me, I'm not on the list.
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds



reply via email to

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