summaryrefslogtreecommitdiff
path: root/debian/patches/0004-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch
blob: 729571fd413262c7a6e0dbd0eaa39d514c5c0b07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From d3d8bc98898f2b917062d8ef935de9bb0a50b540 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 4/5] [bison-test-fixes] 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(-)

diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y
index e8f4e56..224d252 100644
--- 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;
diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y
index 0ffdb89..626c5e7 100644
--- 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;
-- 
2.0.0.rc0