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: Antonio Rus
Subject: Re: Problems with bison 1.875
Date: Mon, 20 Jan 2003 21:15:07 +0200


First  of all I must tell yout that in my previous mail was 2 wrong bug
reports.
There was problems with make in "data" directory . This was a bug of Linux .
The file tree was in a Windows partition .
When I mounted it in Linux , the file "README" was seen like "readme" .
The problem with "unresolved external symbol "int __cdecl yylex("
it hapens when I move into project the files obtained in Linux , but when
I "Rebuild all" ( with exclude from build *.l and *.y files ) all work fine.
I think it's a bug in VC++ .  I am sorry for this two wrong bug reports.


Now let's see the others problems.
Whith your bison patch , the .y source was compiled fine in Linux.

With the resulted files into MS VC++ project there was 2 warnings :

/* The version whithout %destructor element */
Calculator.tab.cpp(1163) : warning C4065: switch statement contains
'default' but no 'case' labels
Calculator.tab.cpp(2174) : warning C4102: 'yyerrlab1' : unreferenced label

/* The version whith %destructor element */
Calculator.tab.cpp(2179) : warning C4102: 'yyerrlab1' : unreferenced label

These warnings are not problems but maybe these informations are usefull
for you.

I attached the sources to this mail , but they still contain
specific Windows code .


Regards
A.R.


----- Original Message -----
From: "Paul Eggert" <address@hidden>
To: "Antonio Rus" <address@hidden>
Cc: <address@hidden>
Sent: Thursday, January 16, 2003 11:32 PM
Subject: Re: Problems with bison 1.875


> 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.
>

Attachment: calculator.tar.gz
Description: Binary data


reply via email to

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