From 2f086f0aa11d55fa2c03d4bd55bafff5bd51ed9a Mon Sep 17 00:00:00 2001
From: kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Wed, 31 Jul 2013 13:01:57 +0000
Subject: [PATCH] parse.y: fix build error with bison-3.0
---
parse.y | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/parse.y b/parse.y
index 3f05fd5..f438920 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 {
--
1.8.4-fc