You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

73 lines
1.8 KiB

From c376be574e99b5f64a7dad71cfc7c0b1f71b747b Mon Sep 17 00:00:00 2001
From: Manoj Srivastava <srivasta@golden-gryphon.com>
Date: Wed, 9 Apr 2014 00:23:07 -0700
Subject: [PATCH] Do not use obsolete bison constructs in tests.
In Bison 3.0, support for YYLEX_PARAM and YYPARSE_PARAM has been
removed (deprecated in Bison 1.875): use %lex-param, %parse-param, or
%param. This commit fixes the tests so they still work.
Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
---
tests/test-bison-yylloc/parser.y | 4 ++--
tests/test-bison-yylval/parser.y | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Index: b/tests/test-bison-yylloc/parser.y
===================================================================
--- a/tests/test-bison-yylloc/parser.y
+++ b/tests/test-bison-yylloc/parser.y
@@ -22,6 +22,7 @@
*/
%parse-param { void* scanner }
+%lex-param { void* scanner }
/*
How to compile:
@@ -34,7 +35,6 @@
#include "config.h"
#define YYERROR_VERBOSE 1
-#define YYLEX_PARAM scanner
extern int testget_lineno(void*);
@@ -52,7 +52,7 @@ int process_text(char* s) {
%}
-%pure_parser
+%pure-parser
%union {
int lineno;
Index: b/tests/test-bison-yylval/parser.y
===================================================================
--- a/tests/test-bison-yylval/parser.y
+++ b/tests/test-bison-yylval/parser.y
@@ -26,6 +26,7 @@
bison --defines --output-file="parser.c" --name-prefix="test" parser.y
*/
%parse-param { void* scanner }
+%lex-param { void* scanner }
%{
#include <stdio.h>
#include <stdlib.h>
@@ -33,7 +34,6 @@
#include "config.h"
#define YYERROR_VERBOSE 1
-#define YYLEX_PARAM scanner
/* A dummy function. A check against seg-faults in yylval->str. */
@@ -49,7 +49,7 @@ int process_text(char* s) {
%}
-%pure_parser
+%pure-parser
%union {
long unused;