help-bison
[Top][All Lists]
Advanced

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

prologue not in y.tab.h with bison 2.4.1


From: sandori
Subject: prologue not in y.tab.h with bison 2.4.1
Date: Fri, 6 Nov 2009 16:06:55 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Dear All!

I have a small project, with the following setup:

parser.y:
%{
        #define THIS    foo
        #define THAT    bar
%}

%%
/* ... snip ... */

lexer.c:
#include "y.tab.h"

int yylex(void) {
        THIS;
        THAT;
}

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?

regards
Istvan Sandor




reply via email to

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