bug-bison
[Top][All Lists]
Advanced

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

Problems with bison 1.875


From: Antonio Rus
Subject: Problems with bison 1.875
Date: Mon, 13 Jan 2003 16:40:00 +0200

I used bison for developing a tiny parser in Windows envinronment . The versions used was 1.24 and 1.35 ( I think the latest release for Windows ). But because a had problems with deallocating the memory in case of parse error I decided to try
the new option "%destructor" available in 1.875 version.
 
I am not too familliar with Linux .
For this version I used RedHat 7.2 and after uninstalling the old bison i began to install the new one.
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.
make[2]: Leaving directory `/bison-1.875/data'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/bison-1.875'
make: *** [all] Error 2
>
 
I searched the word "README" in the data directory and I deleted it from the files : Makefile, Makefile.am , Makefile.in.
After that a new make command didn't report any error . After "make install" I verified the version ( for avoiding mistakes )
and it was the expected version 1.875.
 
I compiled my  .y  file with bison and it didn't report any error . 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"
 
I tried to use in Windows (  VC++ 6.0 ) the files .cpp and .hpp porduced without "%destructor" and there was errors and warnings
 
 
--------------------Configuration: CalcObj - Win32 Debug--------------------
.................
Compiling...
calculator.tab.cpp
Calculator.tab.cpp(1140) : warning C4065: switch statement contains 'default' but no 'case' labels
Calculator.tab.cpp(2106) : warning C4102: 'yyerrlab1' : unreferenced label
...............
Linking...
calculator.tab.obj : error LNK2001: unresolved external symbol "int __cdecl yylex(union YYSTYPE *,void *)" (?yylex  @ @ YAHPATYYSTYPE@@address@hidden )
Debug/CalcObj.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
 
CalcObj.dll - 2 error(s), 2 warning(s)
--------------------------------------------------------------
 
I replaced  "YYSTYPE*" with "union YYSTYPE *" in the other sources and it did't produced erros any more but the warning
persisted.
 
 
I tried the same operations with bison 1.75 , and it wasn't errors at command "make" , no errors at runing bison against my .y file , ( with  "%destructor" element in file ) . I inserted .cpp and .hpp files in my Windows project and all worked fine with no errors
and no warnings . Unfortunally  I noticed that "%destructor" was not fully implmented in this version.
 
 
I attached my  .y file  ( with  "%destructor" element in file )
 
Regards
A.R.
 
 
 
 

Attachment: Calculator.rar
Description: Binary data


reply via email to

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