summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/flex/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/flex/files')
-rw-r--r--meta/recipes-devtools/flex/files/0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/meta/recipes-devtools/flex/files/0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch b/meta/recipes-devtools/flex/files/0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch
new file mode 100644
index 0000000000..3504f546d3
--- /dev/null
+++ b/meta/recipes-devtools/flex/files/0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch
@@ -0,0 +1,80 @@
1From 7fbc074901129ffaff9e18fadacae62d8053ad95 Mon Sep 17 00:00:00 2001
2From: Manoj Srivastava <srivasta@golden-gryphon.com>
3Date: Wed, 9 Apr 2014 00:23:07 -0700
4Subject: [PATCH] Do not use obsolete bison constructs in tests.
5
6In Bison 3.0, support for YYLEX_PARAM and YYPARSE_PARAM has been
7removed (deprecated in Bison 1.875): use %lex-param, %parse-param, or
8%param. This commit fixes the tests so they still work.
9
10Signed-off-by: Manoj Srivastava <srivasta@golden-gryphon.com>
11
12Upstream-Status: Backport [from http://sourceforge.net/p/flex/bugs/169/]
13
14Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
15---
16 tests/test-bison-yylloc/parser.y | 4 ++--
17 tests/test-bison-yylval/parser.y | 4 ++--
18 2 files changed, 4 insertions(+), 4 deletions(-)
19
20diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y
21index e8f4e56..224d252 100644
22--- a/tests/test-bison-yylloc/parser.y
23+++ b/tests/test-bison-yylloc/parser.y
24@@ -22,6 +22,7 @@
25 */
26
27 %parse-param { void* scanner }
28+%lex-param { void* scanner }
29
30 /*
31 How to compile:
32@@ -34,7 +35,6 @@
33 #include "config.h"
34
35 #define YYERROR_VERBOSE 1
36-#define YYLEX_PARAM scanner
37
38 extern int testget_lineno(void*);
39
40@@ -52,7 +52,7 @@ int process_text(char* s) {
41
42 %}
43
44-%pure_parser
45+%pure-parser
46
47 %union {
48 int lineno;
49diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y
50index 0ffdb89..626c5e7 100644
51--- a/tests/test-bison-yylval/parser.y
52+++ b/tests/test-bison-yylval/parser.y
53@@ -26,6 +26,7 @@
54 bison --defines --output-file="parser.c" --name-prefix="test" parser.y
55 */
56 %parse-param { void* scanner }
57+%lex-param { void* scanner }
58 %{
59 #include <stdio.h>
60 #include <stdlib.h>
61@@ -33,7 +34,6 @@
62 #include "config.h"
63
64 #define YYERROR_VERBOSE 1
65-#define YYLEX_PARAM scanner
66
67
68 /* A dummy function. A check against seg-faults in yylval->str. */
69@@ -49,7 +49,7 @@ int process_text(char* s) {
70
71 %}
72
73-%pure_parser
74+%pure-parser
75
76 %union {
77 long unused;
78--
791.9.1
80