help-bison
[Top][All Lists]
Advanced

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

Re: Includes


From: Hans Aberg
Subject: Re: Includes
Date: Fri, 13 Jan 2012 21:18:18 +0100

On 13 Jan 2012, at 16:03, Csaba Raduly wrote:

> 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

The current version is 2.5. The idea is to use the %code directives in later 
versions. It is normal in distributions to include the Bison generated files, 
so that only those that want to tweak the grammar file would need Bison.

Hans





reply via email to

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