]>
Commit | Line | Data |
---|---|---|
ea7896a5 SS |
1 | From 35aba3d6e3c99fcd527c677bef8efeb59963fe8a Mon Sep 17 00:00:00 2001 |
2 | Message-Id: <35aba3d6e3c99fcd527c677bef8efeb59963fe8a.1397340102.git.srivasta@golden-gryphon.com> | |
3 | From: Manoj Srivastava <srivasta@golden-gryphon.com> | |
4 | Date: Wed, 9 Apr 2014 00:23:07 -0700 | |
5 | Subject: [PATCH 1/1] [bison-test-fixes] Do not use obsolete bison constructs in tests. | |
6 | ||
7 | In Bison 3.0, support for YYLEX_PARAM and YYPARSE_PARAM has been | |
8 | removed (deprecated in Bison 1.875): use %lex-param, %parse-param, or | |
9 | %param. This commit fixes the tests so they still work. | |
10 | ||
11 | Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com> | |
12 | --- | |
13 | tests/test-bison-yylloc/parser.y | 4 ++-- | |
14 | tests/test-bison-yylval/parser.y | 4 ++-- | |
15 | 2 files changed, 4 insertions(+), 4 deletions(-) | |
16 | 50.0% tests/test-bison-yylloc/ | |
17 | 50.0% tests/test-bison-yylval/ | |
18 | ||
19 | diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y | |
20 | index e8f4e56..224d252 100644 | |
21 | --- a/tests/test-bison-yylloc/parser.y | |
22 | +++ b/tests/test-bison-yylloc/parser.y | |
23 | @@ -22,6 +22,7 @@ | |
24 | */ | |
25 | ||
26 | %parse-param { void* scanner } | |
27 | +%lex-param { void* scanner } | |
28 | ||
29 | /* | |
30 | How to compile: | |
31 | @@ -34,7 +35,6 @@ | |
32 | #include "config.h" | |
33 | ||
34 | #define YYERROR_VERBOSE 1 | |
35 | -#define YYLEX_PARAM scanner | |
36 | ||
37 | extern int testget_lineno(void*); | |
38 | ||
39 | @@ -52,7 +52,7 @@ int process_text(char* s) { | |
40 | ||
41 | %} | |
42 | ||
43 | -%pure_parser | |
44 | +%pure-parser | |
45 | ||
46 | %union { | |
47 | int lineno; | |
48 | diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y | |
49 | index 0ffdb89..626c5e7 100644 | |
50 | --- a/tests/test-bison-yylval/parser.y | |
51 | +++ b/tests/test-bison-yylval/parser.y | |
52 | @@ -26,6 +26,7 @@ | |
53 | bison --defines --output-file="parser.c" --name-prefix="test" parser.y | |
54 | */ | |
55 | %parse-param { void* scanner } | |
56 | +%lex-param { void* scanner } | |
57 | %{ | |
58 | #include <stdio.h> | |
59 | #include <stdlib.h> | |
60 | @@ -33,7 +34,6 @@ | |
61 | #include "config.h" | |
62 | ||
63 | #define YYERROR_VERBOSE 1 | |
64 | -#define YYLEX_PARAM scanner | |
65 | ||
66 | ||
67 | /* A dummy function. A check against seg-faults in yylval->str. */ | |
68 | @@ -49,7 +49,7 @@ int process_text(char* s) { | |
69 | ||
70 | %} | |
71 | ||
72 | -%pure_parser | |
73 | +%pure-parser | |
74 | ||
75 | %union { | |
76 | long unused; | |
77 | -- | |
78 | 1.9.2 | |
79 |