mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: fix AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS pairs
* tests/glr-regression.at, tests/java.at, tests/javapush.at: Close properly what is opened. Do not nest.
This commit is contained in:
@@ -1700,7 +1700,6 @@ d: /* nada. */;
|
|||||||
]AT_YYLEX_DEFINE(["abc"])[
|
]AT_YYLEX_DEFINE(["abc"])[
|
||||||
]AT_MAIN_DEFINE[
|
]AT_MAIN_DEFINE[
|
||||||
]])
|
]])
|
||||||
AT_BISON_OPTION_POPDEFS
|
|
||||||
|
|
||||||
AT_BISON_CHECK([[-o input.c input.y]], 0, [],
|
AT_BISON_CHECK([[-o input.c input.y]], 0, [],
|
||||||
[[input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
[[input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
||||||
@@ -1765,6 +1764,7 @@ Cleanup: popping nterm b ()
|
|||||||
Cleanup: popping token 'a' ()
|
Cleanup: popping token 'a' ()
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AT_BISON_OPTION_POPDEFS
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
|
|
||||||
|
|
||||||
@@ -1777,6 +1777,7 @@ AT_CLEANUP
|
|||||||
|
|
||||||
AT_SETUP([Predicates])
|
AT_SETUP([Predicates])
|
||||||
|
|
||||||
|
AT_BISON_OPTION_PUSHDEFS
|
||||||
AT_DATA_GRAMMAR([input.y],
|
AT_DATA_GRAMMAR([input.y],
|
||||||
[[%define parse.assert
|
[[%define parse.assert
|
||||||
%glr-parser
|
%glr-parser
|
||||||
@@ -1829,4 +1830,5 @@ AT_PARSER_CHECK([[input Owio]], [0], [old])
|
|||||||
AT_PARSER_CHECK([[input Nwio]], [1], [], [[syntax error, unexpected 'o', expecting 'n'
|
AT_PARSER_CHECK([[input Nwio]], [1], [], [[syntax error, unexpected 'o', expecting 'n'
|
||||||
]])
|
]])
|
||||||
|
|
||||||
|
AT_BISON_OPTION_POPDEFS
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ AT_CLEANUP
|
|||||||
m4_define([_AT_DATA_JAVA_CALC_Y],
|
m4_define([_AT_DATA_JAVA_CALC_Y],
|
||||||
[m4_if([$1$2$3], $[1]$[2]$[3], [],
|
[m4_if([$1$2$3], $[1]$[2]$[3], [],
|
||||||
[m4_fatal([$0: Invalid arguments: $@])])dnl
|
[m4_fatal([$0: Invalid arguments: $@])])dnl
|
||||||
AT_BISON_OPTION_PUSHDEFS([%language "Java" $4])
|
|
||||||
AT_DATA_GRAMMAR([Calc.y],
|
AT_DATA_GRAMMAR([Calc.y],
|
||||||
[[/* Infix notation calculator--calc */
|
[[/* Infix notation calculator--calc */
|
||||||
%language "Java"
|
%language "Java"
|
||||||
@@ -183,8 +182,6 @@ class CalcLexer implements Calc.Lexer {
|
|||||||
}]])[
|
}]])[
|
||||||
]AT_JAVA_POSITION_DEFINE[
|
]AT_JAVA_POSITION_DEFINE[
|
||||||
]])
|
]])
|
||||||
|
|
||||||
AT_BISON_OPTION_POPDEFS
|
|
||||||
])# _AT_DATA_JAVA_CALC_Y
|
])# _AT_DATA_JAVA_CALC_Y
|
||||||
|
|
||||||
|
|
||||||
@@ -240,7 +237,7 @@ m4_define([_AT_CHECK_JAVA_CALC],
|
|||||||
[# We use integers to avoid dependencies upon the precision of doubles.
|
[# We use integers to avoid dependencies upon the precision of doubles.
|
||||||
AT_SETUP([Calculator $1])
|
AT_SETUP([Calculator $1])
|
||||||
|
|
||||||
AT_BISON_OPTION_PUSHDEFS([$1])
|
AT_BISON_OPTION_PUSHDEFS([%language "Java" $1])
|
||||||
|
|
||||||
AT_DATA_JAVA_CALC_Y([$1
|
AT_DATA_JAVA_CALC_Y([$1
|
||||||
%code {
|
%code {
|
||||||
@@ -318,6 +315,7 @@ _AT_CHECK_JAVA_CALC_ERROR([$1], [(- *) + (0 0) = 1],
|
|||||||
[1.3: syntax error, unexpected '*', expecting number or '-' or '(' or '!'
|
[1.3: syntax error, unexpected '*', expecting number or '-' or '(' or '!'
|
||||||
1.8: syntax error, unexpected number
|
1.8: syntax error, unexpected number
|
||||||
1.1-1.11: calc: error: 2222 != 1])
|
1.1-1.11: calc: error: 2222 != 1])
|
||||||
|
|
||||||
AT_BISON_OPTION_POPDEFS
|
AT_BISON_OPTION_POPDEFS
|
||||||
|
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
|
|||||||
@@ -864,4 +864,7 @@ AT_CHECK([[sed -e '/^Next token.*$/p' -e d ./stderr]],[ignore],[expout],[ignore-
|
|||||||
# 2. Check that the calculator output matches that of a pull parser
|
# 2. Check that the calculator output matches that of a pull parser
|
||||||
AT_CHECK([[rm -f ./expout; cp -f ./output ./expout]],[ignore],[ignore-nolog],[ignore-nolog])
|
AT_CHECK([[rm -f ./expout; cp -f ./output ./expout]],[ignore],[ignore-nolog],[ignore-nolog])
|
||||||
AT_CHECK([[cat ./stdout]],[ignore],[expout],[ignore-nolog])
|
AT_CHECK([[cat ./stdout]],[ignore],[expout],[ignore-nolog])
|
||||||
|
|
||||||
|
|
||||||
|
AT_BISON_OPTION_POPDEFS
|
||||||
AT_CLEANUP
|
AT_CLEANUP
|
||||||
|
|||||||
Reference in New Issue
Block a user