flex: fix test-bison-yylval and test-bison-yylloc failed
The tests in flex test-bison-yylval and test-bison-yylloc failed, so we backport a patch from upstream to fix it. (From OE-Core rev: 04810bf36720240cf0e1b8ba2cb1bba16b2ccac8) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c54540e5f7
commit
5056581b16
|
@ -0,0 +1,80 @@
|
|||
From 7fbc074901129ffaff9e18fadacae62d8053ad95 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>
|
||||
|
||||
Upstream-Status: Backport [from http://sourceforge.net/p/flex/bugs/169/]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.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;
|
||||
--
|
||||
1.9.1
|
||||
|
|
@ -8,6 +8,7 @@ LICENSE = "BSD"
|
|||
DEPENDS += "${@'bison-native flex-native' if '${PTEST_ENABLED}' == '1' else ''}"
|
||||
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
|
||||
file://0001-bison-test-fixes-Do-not-use-obsolete-bison-construct.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
|
|
Loading…
Reference in New Issue