mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
Some M4 cleanup in the testsuite.
Suggested by Eric Blake at <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>. * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not complicate the code by distinguishing between a missing value and an empty string value for an optional argument. This fix is allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below. * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into... (AT_TEST_TABLES_AND_PARSE): ... this now that the special arguments are not needed because of the following changes. Fix stale comments. Bison developers should use GNU M4 and should not use POSIXLY_CORRECT when building the test suite, so do not complicate the code by avoiding $10 and above. Do not quote an empty string value for an optional argument, and do not distinguish between a missing value and an empty string value.
This commit is contained in:
@@ -45,24 +45,18 @@ AT_TEST_TABLES_AND_PARSE([$2[: LALR(1)]], [[LALR]], [[last-state]],
|
||||
[[%define lr.type "LALR"
|
||||
]$3],
|
||||
[$4], [$5], [$6], [$7],
|
||||
[AT_LALR1_DIFF_CHECK([$8])$9]m4_if($#, 8, [],
|
||||
$#, 9, [],
|
||||
[, m4_shiftn(9,
|
||||
$@)]))
|
||||
[AT_LALR1_DIFF_CHECK([$8])$9], [$10], [$11], [$12])
|
||||
AT_TEST_TABLES_AND_PARSE([$2[: IELR(1)]], [[IELR]], [[last-state]],
|
||||
[[%define lr.type "IELR"
|
||||
]$3],
|
||||
[$4], [$5], [$6], [$7],
|
||||
[AT_LALR1_DIFF_CHECK([$8])$9]m4_if($#, 8, [],
|
||||
$#, 9, [],
|
||||
[, m4_shiftn(9,
|
||||
$@)]))
|
||||
[AT_LALR1_DIFF_CHECK([$8])$9], [$10], [$11], [$12])
|
||||
AT_TEST_TABLES_AND_PARSE([$2[: Canonical LR(1)]], [[canonical LR]],
|
||||
[[last-state,no-xml]],
|
||||
[[%define lr.type "canonical LR"
|
||||
]$3],
|
||||
[$4], [$5], [$6], [$7],
|
||||
[$9]m4_if($#, 8, [], $#, 9, [], [, m4_shiftn(9, $@)]))
|
||||
[$9], [$10], [$11], [$12])
|
||||
|
||||
m4_popdef([AT_LALR1_DIFF_CHECK])
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user