[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re-entrant parser scanner "%pure-parser g++
From: |
Anouar LACHHEB |
Subject: |
re-entrant parser scanner "%pure-parser g++ |
Date: |
Thu, 28 Dec 2006 16:59:08 +0100 |
Hi,
I'm using flex 2.5.4a, bison 2.3 & g++ 3.4.5.
I added "%pure-parser" directive to my .yacc in order to produce a re-entrant
parser and I compile my .lex.c with g++ in order to get a re-entrant scanner
(as written in flex manual).
I defined YY_DECL as follow (in .lex prelude):
%{
//Header files declarations ...
#define YY_DECL int yylex ( YYSTYPE * lvalp, char * xUnique_File_Name, int
xIdentification )
%}
Now when I tried to compile the parser/scanner:
flex -I -ox_lex.c -Px x.lex
g++ -c -o x_lex.o x_lex.c
bison --debug -px -o x.c -dv x_yacc.c
g++ -c -o x_yacc.o x_yacc.c
I got a compilation error:
x_yacc.c: In function `int x_parse(char*, char*, int)':
x_yacc.c:1382: error: `x_lex' was not declared in this scope
make: *** [linux32/x_yacc.o] Error 1
Thanks for any help/suggestion.
Best regards,
AnL.
- re-entrant parser scanner "%pure-parser g++,
Anouar LACHHEB <=