|Problem with Flex/Bison and C/C++ email@example.com (Christoph B.) (2006-03-22)|
|Re: Problem with Flex/Bison and C/C++ firstname.lastname@example.org (John Millaway) (2006-03-27)|
|Re: Problem with Flex/Bison and C/C++ cfc@shell01.TheWorld.com (Chris F Clark) (2006-03-27)|
|Re: Problem with Flex/Bison and C/C++ email@example.com (2006-03-27)|
|From:||John Millaway <firstname.lastname@example.org>|
|Date:||27 Mar 2006 01:17:10 -0500|
|Posted-Date:||27 Mar 2006 01:17:10 EST|
> Is there a way to define the data format for nonterminals
> outside from YYSTYPE? There is no need for the lexer to know about these
> data types, structures using these types are created by the yacc file,
> lex doesn't need to know anything about these nonterminals...
> If there is no other solution, can't I compile the lexer output using
You can compile your flex "C" scanner using g++ just fine. The only
compatibility issue we know of will be the memory management (malloc vs.
new), which, in practice, is not a problem. Just keep 'em separate.
AFAIK, there is no way to separate non-terminal types from terminal types in
bison. If you absolutely need your scanner to be compiled as C, you can trick
it, as in:
And in the scanner,
typedef void* Foo;
Return to the
Search the comp.compilers archives again.