www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/09/11:04:14

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Newbie needs Bison help
Date: 9 Oct 2001 14:51:54 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 25
Message-ID: <9pv2ua$312$1@antares.lu.erisoft.se>
References: <F196ot0OUIHNkjgJKVA0000098a AT hotmail DOT com>
NNTP-Posting-Host: lws256.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thomas Hutto (huttothomas AT hotmail DOT com) wrote:
: See below for original question and a reasonable attempt to answer it.

Bad habit. Why should I need to jump up and down in the message to get
the context?

: bison -l -d -t -v -oreg.parser.c reg.y
: I had the -d option turned on originally.

: When I #include reg.parser.h I get a compiler error complaining about 
: YYSTYPE being defined twice.  And sure enough *.h has a definition for 
: YYSTYPE and so does *.c.

Well, you don't need to #define YYPRINT in the C section. You only
need the prototype for yyprint, right?

If this is so you can put #define YYPRINT in a global header file.

If this isn't so perhaps #undef YYPRINT before #define YYPRINT can
help? (Not perfect but better than changing an auto-generated file.)


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019