This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bison bug

The latest version of bison appears to be broken.

Regardless of the grammar input file, the generated file contains a syntax error in the definition of yyparse when __STDC__ and YYPARSE_PARAM are not defined. Specifically, the generated code looks like:

int yyparse () ; { int yystate; ...

That first ; should not be there.

I'm not a bison internals expert, but I see that it's using m4 to do most of its work. I'm no m4 expert either, so I can't tell if the problem is in the bison input file, or a bug in m4.

~ [518] $ bison --version bison (GNU Bison) 2.1 Written by Robert Corbett and Richard Stallman.

~ [519] $ m4 --version
GNU M4 1.4.4
Written by Rene' Seindal.

I used the following trivial grammar file, grammar.y, to reproduce the bug:

%{ #define YYMAXDEPTH 1024 %}

%token A B


C: A B { } ;

Then, the command line bison -y -d grammar.y produces a file with the offending error on line 828.

Stefan Vorkoetter

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]