[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [tools-dev] bison and rsc



On Fri, 2002-01-18 at 23:39, Ken Foskey wrote:
> 
> The bison saga continues.  I am using an unsupported version of bison
> but I cannot figure these errors from rsc:

This is what I understand the problem to be:

rsc uses bison to generate its parser.  Bison runs with 

	bison -d -o output input

The old bison would create

	output  (parser code)

	output.h (header for other programs).

Bison 1.31 (debian woody) creates

	output   (header code)

Work around is to run in solenv/inc/tg_yacc.mk duplicate the bison lines
and replace with:

	$(BISON) -o $(YACCOUT)$/$(YACCTARGET) $(YACCFILES)
	$(BISON) -d -o $(YACCOUT)$/$(YACCTARGET).h $(YACCFILES)

However there is now a lot of errors regarding size_t to fix.  I hand
hacked the output from bison to replace YYSIZE_T with size_t and it
worked fine.  I think this might be related to including stdio.h not
cstdio in the mainline code, could be entirely wrong though.

IMHO reading the man page the newer release of bison is broken (or the
man page and web manual are now incorrect with the current release and
they are creating incompatible command line options).  Both man and web
say '-d Write extra file'...   Also given that the mainline compile 
fails, broken again.

In the short term we will have to put into the configure script a check
for the release of bison until this issue is overcome.

KenF



Reply to: