From 37cdb7c147fc8189b21f309b022cbf3ecdc4c62b Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 19 Aug 2013 09:32:32 +0000 Subject: merge revision(s) 42282: [Backport #8785] * parse.y: fix build error with bison-3.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@42621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 66034f2e3c..671f333275 100644 --- a/parse.y +++ b/parse.y @@ -277,8 +277,6 @@ struct parser_params { static int parser_yyerror(struct parser_params*, const char*); #define yyerror(msg) parser_yyerror(parser, (msg)) -#define YYLEX_PARAM parser - #define lex_strterm (parser->parser_lex_strterm) #define lex_state (parser->parser_lex_state) #define cond_stack (parser->parser_cond_stack) @@ -319,7 +317,11 @@ static int parser_yyerror(struct parser_params*, const char*); #define ruby_coverage (parser->coverage) #endif +#if YYPURE static int yylex(void*, void*); +#else +static int yylex(void*); +#endif #ifndef RIPPER #define yyparse ruby_yyparse @@ -610,7 +612,8 @@ static void token_info_pop(struct parser_params*, const char *token); #endif %} -%pure_parser +%pure-parser +%lex-param {struct parser_params *parser} %parse-param {struct parser_params *parser} %union { -- cgit v1.2.3