From 193a0c21d580fbbcca6612c2e7b5977cc909436c Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 5 Oct 2006 06:07:59 +0000 Subject: [PATCH] re2c-parser.y: Work around a bug in Bison 2.1; Bison 2.1 generates bad code if both YYPARSE_PARAM and __STDC__ are undefined. svn path=/trunk/yasm/; revision=1641 --- tools/re2c/re2c-parser.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/re2c/re2c-parser.y b/tools/re2c/re2c-parser.y index a00279c3..998cdb05 100644 --- a/tools/re2c/re2c-parser.y +++ b/tools/re2c/re2c-parser.y @@ -5,6 +5,10 @@ #include #include "tools/re2c/globals.h" #include "tools/re2c/parse.h" + +/* Work around bug in Bison 2.1 */ +#define YYPARSE_PARAM unused + int yylex(void); void yyerror(const char*); @@ -169,7 +173,7 @@ void parse(FILE *i, FILE *o){ line_source(o, Scanner_line(in)); while(Scanner_echo(in, o)){ - yyparse(); + yyparse(NULL); if(spec) genCode(o, spec); line_source(o, Scanner_line(in)); -- 2.40.0