[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: re-entrant parser scanner "%pure-parser g++
From: |
David Fang |
Subject: |
RE: re-entrant parser scanner "%pure-parser g++ |
Date: |
Thu, 28 Dec 2006 13:45:04 -0500 (EST) |
> I tried before your solution using a common .h file for .lex and .yacc,
> however since I'm using "%pure-parser" in my .yacc, the YYSTYPE used in
> "yylex" proto is not visible to the .h itself.
Hi,
If you pass '-d' to bison, it should produce a header file with
enumerations and the definition of YYSTYPE. It's called y.tab.h or
parse.tab.h or maybe even x.tab.h (depending on how you invoked
bison/yacc). #include that too.
> Any help (more verbose please) ?
>
> Here is the yylex proto:
>
> #define YY_DECL int yt_unique_datalog_lex ( YYSTYPE * lvalp, char *
> xUnique_File_Name, int xIdentification )
Fang
(David)