summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-19 09:32:32 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-19 09:32:32 +0000
commit37cdb7c147fc8189b21f309b022cbf3ecdc4c62b (patch)
tree17852f2e53c2313e897da457e31e515eae35db0d /parse.y
parent768cfdd50bf53bbb10498906a7aa49a91ca008db (diff)
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
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y9
1 files changed, 6 insertions, 3 deletions
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 {