bug-bison
[Top][All Lists]
Advanced

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

Re: Problems with bison 1.875


From: Paul Eggert
Subject: Re: Problems with bison 1.875
Date: 16 Jan 2003 13:32:27 -0800

Antonio Rus <address@hidden> writes:

> After "./configure" I typed "make" and at the last lines of listing =
> there was some errors:
> 
> ................................
> make[2]: Leaving directory `/bison-1.875/lib'
> Making all in data
> make[2]: Entering directory `/bison-1.875/data'
> make[2]: *** No rule to make target `README', needed by `all-am'.  Stop.

That's odd; it sounds like data/README got removed somehow after you
extracted the Bison source from the tarball.  Do you know how that
might have happened?

> After that I added a line
> 
> "%destructor {free($$);} fnc_exprg" and I compiled again and
> bison crached with the message :
> "NONE:0: /usr/bin/m4: ERROR: EOF in string"=20

destructors are still experimental, but dumping core is too much of
an experiment!  Please try this trivial patch:

diff -pur bison-1.875/src/output.c bison-1.875-fix/src/output.c
--- bison-1.875/src/output.c    Thu Dec 26 00:25:56 2002
+++ bison-1.875-fix/src/output.c        Thu Jan 16 13:05:08 2003
@@ -432,7 +432,7 @@ symbol_printers_output (FILE *out)
 
   fputs ("m4_define([b4_symbol_printers], \n[", out);
   for (i = 0; i < nsyms; ++i)
-    if (symbols[i]->destructor)
+    if (symbols[i]->printer)
       {
        symbol *sym = symbols[i];
 

> Calculator.tab.cpp(1140) : warning C4065: switch statement contains =
> 'default' but no 'case' labels

Perhaps the above patch fixes this; can you please try it?

> Calculator.tab.cpp(2106) : warning C4102: 'yyerrlab1' : unreferenced =
> label

This is just a warning.  But it is annoying.  Is there any easy way to
disable it with the C compiler that you're using, by slightly
modifying the source code in Calculator.tab.cpp?

> calculator.tab.obj : error LNK2001: unresolved external symbol "int __cdecl 
> yylex(union YYSTYPE *,void *)" (?yylex  @ @ YAHPATYYSTYPE@@address@hidden )

Hmm, perhaps this happened because calculator.y used YYSTYPE before
the %union declaration.  But I can't see from your code how this could
work with Bison 1.75 either.  I don't have your other source code.
Perhaps main.h defines YYSTYPE? but why would that differ between 1.75
and 1.875?

Can you send to <address@hidden> a self-contained example that
generates the above bug?  That might help us better diagnose the
problem.  Please send us the text files that contain the source code,
as we don't use the Microsoft build tools.  Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]