|bison reentrant parser with yyFlexLexer::yylex() email@example.com (2003-01-07)|
|Date:||7 Jan 2003 23:30:24 -0500|
|Keywords:||yacc, lex, question|
|Posted-Date:||07 Jan 2003 23:30:24 EST|
I am trying to develope a reentrant parser with bison using c++
scanner(flex with -+ option).I am getting some problems while
integrating c++ object with yyparse().i have no idea how to integrate
c++ scanner with yyparse(). i have following questions,
1) for reentrant parser,yylex is parameterised(such as yylex(YYSTYPE
*lvalp,..)),but in FlexLexer.h "yylex" is declared as pure virtual
how can i manage to overload "yylex" with parameters.pls explain me
with an example.
2)i want scanner to read input from a file.type of yyin is istream.i
did as follows to as assign input file to yyin
suppose "x.txt" is the file, which is to be read by scanner.
is this the correct way?
pls provide an example program which uses reentrant parser with c++
Any help would be greatly appreciated.
Return to the
Search the comp.compilers archives again.