|Reentrant Flex and Bison firstname.lastname@example.org (2000-06-03)|
|Re: Reentrant Flex and Bison email@example.com (Randall Hyde) (2000-06-06)|
|Reentrant Flex and Bison firstname.lastname@example.org (1999-11-16)|
|Re: Reentrant Flex and Bison email@example.com (Burkhard Perkens-Golomb) (1999-12-07)|
|From:||firstname.lastname@example.org (Richard Lanyon)|
|Date:||16 Nov 1999 23:53:13 -0500|
|Keywords:||lex, yacc, parse, comment|
I'm trying to get a lexer + parser combination going using flex and bison.
The problem is that I seem to have to declare yylex (as int yylex()) in
the C declarations section of the bison grammar file.
This wouldn't necessarily be a problem (except that I'm sure I shouldn't
/have/ to) except that if I then want to make a re-entrant (aka "pure")
parser, yylex needs to be declared as
int yylex(YYSTYPE *lvalp)
and YYSTYPE isn't defined in the C declarations section of the Bison
grammar file - it only comes into being in the Bison declaration section.
[I took a look, didn't see any very satisfactory approaches other than
declaring yylex() without a prototype. -John]
Return to the
Search the comp.compilers archives again.