help-bison
[Top][All Lists]
Advanced

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

Re: prologue not in y.tab.h with bison 2.4.1


From: Joel E. Denny
Subject: Re: prologue not in y.tab.h with bison 2.4.1
Date: Fri, 6 Nov 2009 10:38:19 -0500 (EST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Fri, 6 Nov 2009, address@hidden wrote:

> In short, the lexer uses definitions from the prologue of the parser
> file (lexical tie-ins and some macros). This used to work, as bison used
> to include the prologue section in the y.tab.h file. I noticed, that
> with bison 2.4.1 this is no longer the case and this broke my setup. I
> know that it can be fixed in several ways, but I thought I would first
> ask if this is intentional and will remain so in the future versions of
> bison.
> 
> I've looked at the changelogs but didn't find any warnings about this
> case, so is this the intended behavior?

What Bison release were you using previously?  What skeletons are you 
using?  If the answer is 2.3 or earlier with C++ or GLR skeletons, then 
see the 2.3a entry in NEWS.  This change is permanent and intentional.  
In hindsight, it has caused backward compatibility problems for too many 
users, but many users have now adjusted, so it's too late to revert.  I 
apologize for the trouble.

In any case, I recommend you switch to the %code directive.  For a 
discussion of why it's better, see the "Prologue Alternatives" section in 
the Bison manual.  Ignore the documentation that says it's an experimental 
feature.  For C/C++, we have already removed the experimental label for 
the coming 2.4.2 release.




reply via email to

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