From 434826c0e9d3e3b48d99a39b7ad7626a6f1ae2eb Mon Sep 17 00:00:00 2001 From: kazu Date: Wed, 31 Jul 2013 13:01:57 +0000 Subject: [PATCH] * parse.y: fix build error with bison-3.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ parse.y | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43781c7c08..5deae84b52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jul 31 22:01:24 2013 Kazuhiro NISHIYAMA + + * parse.y: fix build error with bison-3.0. + Wed Jul 31 21:58:53 2013 Kouhei Sutou * test/rexml/test_notationdecl_parsetest.rb: Split test patterns. diff --git a/parse.y b/parse.y index 7dc4b2e9e4..87029eb2aa 100644 --- a/parse.y +++ b/parse.y @@ -304,8 +304,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) @@ -349,7 +347,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 @@ -684,7 +686,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 {