Mindaugas | 8 Mar 19:02
Picon

Bug

Hello,

I've found bug in bison 2.1. I'm using Windows and I can not test this 
with new version 2.3, because I can't find 2.3 executables for windows.
I've use bison for much larger file, but this is reduced sample to 
indicate a problem.

b.y:
--------------------------------
%%

Crlf       : '\n'          { }
            ;
--------------------------------

Command
    bison -v -d b.y -ob.c
produces b.c file, which fails to compile. The reason of failure is this 
part of code:
--------------------------------

/*----------.
| yyparse.  |
`----------*/

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
(Continue reading)

irwin | 8 Mar 02:23

[GNU Bison 2.3] testsuite: 103 104 failed

## ------------------------- ##
## GNU Bison 2.3 test suite. ##
## ------------------------- ##

testsuite: command line was:
  $ ./testsuite 

## ----------- ##
## ChangeLogs. ##
## ----------- ##

testsuite: ../ChangeLog:
| 2006-06-05  Paul Eggert  <eggert <at> cs.ucla.edu>
| 
| 	* NEWS: Version 2.3.
| 	* configure.ac (AC_INIT): Likewise.
| 
| 2006-05-30  Paul Eggert  <eggert <at> cs.ucla.edu>
| 
| 	* data/glr.c (YYRECOVERING): Define to be a function-like macro
| 	with no arguments, not as an object-like macro.  This is for
| 	compatibility with data/yacc.c.  Problem reported by John P. Hartmann in

## --------- ##
## Platform. ##
## --------- ##

hostname = tanew.taranto.com
uname -m = i686
uname -r = 2.4.20-28.7
(Continue reading)

Joel E. Denny | 10 Mar 21:41

Re: Bug

On Thu, 8 Mar 2007, Mindaugas wrote:

> Function declaration is invalid, because of extra ";":
> --------------------------------
> int
> yyparse ()
>     ;
> {
> --------------------------------

Thanks for the report.  This is fixed as of 2.2.

Joel E. Denny | 10 Mar 22:05

Re: %destructor doesn't destruct what can be destructed by user actions

On Tue, 27 Feb 2007, Setzer, Sebastian (ext) wrote:

> The bison-manual (for example
> http://www.gnu.org/software/bison/manual/html_mono/bison.html) states:
> "Right-hand size symbols of a rule that explicitly triggers a syntax
> error via YYERROR are not discarded automatically. As a rule of thumb,
> destructors are invoked only when user actions cannot manage the
> memory."
> 
> Should be "Right-hand side..."?

Thanks.  I committed the following to fix that and some other typos.

> In the Calc++ - example, this user-action doesn't free the memory:
>     | "identifier"  { $$ = driver.variables[*$1]; }
> so this example will leak?

Thanks.  That's already fixed in CVS.

Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1692
diff -p -u -r1.1692 ChangeLog
--- ChangeLog	9 Mar 2007 09:13:43 -0000	1.1692
+++ ChangeLog	10 Mar 2007 21:03:04 -0000
@@ -1,3 +1,10 @@
+2007-03-10  Joel E. Denny  <jdenny <at> ces.clemson.edu>
+
+	* doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
(Continue reading)

Frans Englich | 30 Mar 10:02
Picon

Bison C++ warnings


When compiling a Bison generated parser with some of gcc's warnings switched 
on, it produces quite some noise:

QueryTransformParser.cpp:1122:1: warning: macro "YYNNTS" is not used
QueryTransformParser.cpp:2094:1: warning: macro "yyerrok" is not used
QueryTransformParser.cpp:1126:1: warning: macro "YYNSTATES" is not used
QueryTransformParser.cpp:59:1: warning: macro "YYLSP_NEEDED" is not used
QueryTransformParser.cpp:2138:1: warning: macro "YYRHSLOC" is not used
QueryTransformParser.cpp:2110:1: warning: macro "YYRECOVERING" is not used
QueryTransformParser.cpp:47:1: warning: macro "YYBISON" is not used
QueryTransformParser.cpp:2108:1: warning: macro "YYFAIL" is not used
QueryTransformParser.cpp:50:1: warning: macro "YYBISON_VERSION" is not used
QueryTransformParser.cpp:56:1: warning: macro "YYPURE" is not used
QueryTransformParser.cpp:67:1: warning: macro "yydebug" is not used
QueryTransformParser.cpp:2101:1: warning: macro "YYERROR" is not used
QueryTransformParser.cpp:1124:1: warning: macro "YYNRULES" is not used
QueryTransformParser.cpp:2112:1: warning: macro "YYBACKUP" is not used
QueryTransformParser.cpp:2362:1: warning: macro "YYMAXDEPTH" is not used
QueryTransformParser.cpp:2095:1: warning: macro "yyclearin" is not used
QueryTransformParser.cpp:53:1: warning: macro "YYSKELETON_NAME" is not used
QueryTransformParser.cpp:2131:1: warning: macro "YYERRCODE" is not used
QueryTransformParser.cpp:2166:1: warning: macro "YY_LOCATION_PRINT" is not 
used
QueryTransformParser.cpp:2140:1: warning: macro "YYLLOC_DEFAULT" is not used
QueryTransformParser.cpp: In function 'unsigned int yysyntax_error(char*, int, 
int)':
QueryTransformParser.cpp:2484: warning: use of old-style cast
QueryTransformParser.cpp:2549: warning: use of old-style cast
QueryTransformParser.cpp: In function 'int 
(Continue reading)


Gmane