Mail Archives: djgpp/2001/10/09/08:34:24
Thomas Hutto (huttothomas AT hotmail DOT com) wrote:
: I've RTFM'd till I sick. So maybe there is some help out there, pretty
: please?
: Need to implement YYPRINT.
: So in the C-section add
: #define YYDEBUG 1
: #define YYPRINT(a,b,c) yyprint(a,b,c)
: In the Bisson types section I must have
: %union
: {
: char rxch;
: int rxint
: str rxstr;
: } for the YYSTACK's type.
: Which yields a
: typedef union {
: char rxch;
: int rxint
: str rxstr;
: }YYSTYPE;
: in the parser code _AFTER_ the stuff from the C-Section.
: This means that when I prototype my
: stactic void yyprint(FILE *F, int type, YYSTYPE value);
: function the compiler complains because it has not yet seen the typedef for
: the union.
: Anyway to make Bisson behave other than directly editing the generated
: C-Code (y.tab.c)? Have a hunch that TFM left off a critical step and I'm
: not good enough at C-Code to figure what it is.
: I tried to cobble up a forward declaration for the union without success.
Try the "-d" option to bison and #include "y.tab.h" in the C section.
Right,
MartinS
- Raw text -