Le 25 août 09 à 13:53, Rui Maciel a écrit :
Akim Demaille wrote:
AFAIK, Flex does not generate a header file with its definitions such
as start conditions, so you probably need to write a small wrapper
around flex that extracts it from the generated scanner *.c file.
Then, from the grammar file, just include that extracted file from
like any other.
Flex does generate a header file, which also holds the definitions
for the start
conditions. You can try it out by running the following:
flex --header-file=lex.yy.h test.l
If you defined starting conditions on your test.l file then the
lex.yy.h will
hold the definitions. Unfortunately they are enclosed in a #define
statement.
Can you show the content of this file? Can you also show where you
include it in your Bison file? Maybe you include the flex header from
the bison and vice versa, which probably does not work as expected.
Usually you include the Bison header from the Flex scanner (to get the
token definitions and so forth). I have no experience with the
converse.
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison