From 66fb016e1d51afdb767f24e5818b083bc73a8827 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 28 Jan 2013 15:37:49 +0100 Subject: [PATCH] tests: remove useless %defines Many tests were using %defines because C++ skeletons used to require it. * tests/actions.at, tests/c++.at, tests/input.at, tests/regression.at: Remove useless %defines. --- tests/actions.at | 6 ++---- tests/c++.at | 6 ------ tests/input.at | 8 ++++---- tests/regression.at | 5 +---- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/tests/actions.at b/tests/actions.at index 80b5239e..302c1bbb 100644 --- a/tests/actions.at +++ b/tests/actions.at @@ -77,8 +77,7 @@ m4_pushdef([AT_TEST], AT_BISON_OPTION_PUSHDEFS([%locations %skeleton "$1" $2]) AT_DATA_GRAMMAR([[input.y]], -[[%defines /* FIXME: Required by lalr1.cc in Bison 2.6. */ -%locations +[[%locations %debug %skeleton "$1" ]$2[ @@ -182,8 +181,7 @@ m4_pushdef([AT_TEST], AT_BISON_OPTION_PUSHDEFS([%locations %skeleton "$1" $2]) AT_DATA_GRAMMAR([[input.y]], -[[%defines /* FIXME: Required by lalr1.cc in Bison 2.6. */ -%locations +[[%locations %debug %skeleton "$1" ]$2[ diff --git a/tests/c++.at b/tests/c++.at index 0f3d2354..21f567f9 100644 --- a/tests/c++.at +++ b/tests/c++.at @@ -118,7 +118,6 @@ AT_BISON_OPTION_PUSHDEFS([%skeleton "lalr1.cc" %debug $1]) AT_DATA_GRAMMAR([list.yy], [[%debug %skeleton "lalr1.cc" -%defines %define api.value.type variant ]m4_bpatsubst([$1], [\\n], [ ])[ @@ -288,7 +287,6 @@ AT_DATA([input.yy], [[%skeleton "lalr1.cc" %locations %debug -%defines %% exp: /* empty */; %% @@ -368,7 +366,6 @@ m4_pushdef([AT_TEST], [AT_BISON_OPTION_PUSHDEFS([%language "C++" %define api.namespace "$1"]) AT_DATA_GRAMMAR([[input.y]], [[%language "C++" -%defines %define api.namespace "]$1[" %union { int i; } %define global_tokens_and_yystype @@ -454,7 +451,6 @@ AT_DATA_GRAMMAR([[input.yy]], #define USE(Args) } -%defines %define parse.error verbose %nonassoc 'a' ; @@ -529,7 +525,6 @@ AT_DATA_GRAMMAR([[input.yy]], int yylex (yy::parser::semantic_type *); } -%defines %define api.value.type variant %define parse.error verbose %define parse.trace @@ -600,7 +595,6 @@ AT_BISON_OPTION_PUSHDEFS([%skeleton "lalr1.cc"]) AT_DATA_GRAMMAR([[input.yy]], [[%skeleton "lalr1.cc" -%defines // FIXME: Mandated in 2.6. %debug %error-verbose diff --git a/tests/input.at b/tests/input.at index b46f8fab..8184b03e 100644 --- a/tests/input.at +++ b/tests/input.at @@ -1477,10 +1477,10 @@ AT_BISON_CHECK([[input.y]], [[1]], [], ]]) ]) -AT_CHECK_API_PURE([[%language "c++" %defines]], [[]]) -AT_CHECK_API_PURE([[%language "c++" %defines]], [[false]]) -AT_CHECK_API_PURE([[%language "c++" %defines %glr-parser]], [[""]]) -AT_CHECK_API_PURE([[%language "c++" %defines %glr-parser]], [[false]]) +AT_CHECK_API_PURE([[%language "c++"]], [[]]) +AT_CHECK_API_PURE([[%language "c++"]], [[false]]) +AT_CHECK_API_PURE([[%language "c++" %glr-parser]], [[""]]) +AT_CHECK_API_PURE([[%language "c++" %glr-parser]], [[false]]) AT_CHECK_API_PURE([[%language "java"]], [[true]]) AT_CHECK_API_PURE([[%language "java"]], [[false]]) diff --git a/tests/regression.at b/tests/regression.at index 26df108f..418faf05 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -837,7 +837,6 @@ m4_define([_AT_DATA_DANCER_Y], } $1 %token ARROW INVALID NUMBER STRING DATA -%defines %verbose %error-verbose /* Grammar follows */ @@ -922,7 +921,6 @@ AT_LALR1_CC_IF([[#include ]], ]AT_YYERROR_DECLARE])[ %} $1 -%defines %error-verbose %token A 1000 %token B @@ -1541,8 +1539,7 @@ m4_pushdef([AT_TEST], AT_BISON_OPTION_PUSHDEFS([%locations %skeleton "$1" %parse-param { int x } %parse-param { int y }]) AT_DATA_GRAMMAR([input.y], -[[%defines -%locations +[[%locations %skeleton "$1" %union { int ival; } %parse-param { int x } -- 2.45.2