help-bison
[Top][All Lists]
Advanced

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

tokens in header file


From: Maarten Marien
Subject: tokens in header file
Date: Tue, 4 Nov 2003 17:32:20 +0100

Hello,

the sysadmins here seem to have changed the bison version to bison++:
$ bison --version
bison++ Version 1.21-8, adapted from GNU bison by address@hidden

The header file it now creates (when I invoke bison with "-d" option) is not 
what I expected it to be...

$ bison -d parse.yy
$ flex -++ lex.ll
$ g++ -c -o lex.yy.o lex.yy.cc
lex.ll: In method `int yyFlexLexer::yylex()':
lex.ll:20: `DEF' undeclared (first use this function)
etc...

None of the tokens I used in "parse.yy" seem to be declared now, though I 
included "parse.yy.tab.h" in my "lex.ll" specification. The definitions seem 
to be in the generated header file though. (In all possible ways: with 
#define, with "static const" and in an enum.) But with all those #ifdef 's in 
the file, it's a little hard seeing what it actually does.

So what options should I use with bison to make the compiler recognize the 
definitions of the header file?
(btw, I tried both g++-2.95.4 and g++-3.0. flex version is 2.5.4.)

Thanks,
Maarten.




reply via email to

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