|Type-checking in bison, C++ firstname.lastname@example.org (Tim Converse) (1998-06-11)|
|Re: Type-checking in bison, C++ email@example.com (1998-06-18)|
|Re: Type-checking in bison, C++ firstname.lastname@example.org (1998-06-18)|
|From:||Tim Converse <email@example.com>|
|Date:||11 Jun 1998 16:14:05 -0400|
|Organization:||Univ. of Chicago, Computer Science|
|Keywords:||yacc, C++, types|
I'm new to flex and bison, and am using them to generate code that will
be compiled as C++. The forms I will be parsing correspond to instances
of a complex C++ class, and the ideal thing for me would be to use all
the bison machinery to build up a parse tree where some of the
non-terminals correspond to constructed data members of the class.
However, I doubt that a simple %union declaration,
with some of the alternative types being my C++ classes,
will let me compose classes using the bison type machinery.
Before I go down the road of trying to make that work, does anyone out
there have any experience with this kind of problem? Is there any way
to disable type-checking in bison? is it smart enough to be
reassured by explicit casts? Or am I better off declaring all the
tokens and non-terminals to be integers, and doing the parse-tree
construction "behind the scenes"?
thanks for any suggestions,
Return to the
Search the comp.compilers archives again.