variables: use singular in %define variable names

See http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html

* doc/bison.texi, src/lalr.c, src/main.c, src/muscle-tab.c,
* src/print.c, src/reader.c, src/tables.c, tests/conflicts.at,
* tests/input.at, tests/reduce.at:
s/lr.default-reductions/lr.default-reduction/
s/lr.keep-unreachable-states/lr.keep-unreachable-state/.
* NEWS: Document.
This commit is contained in:
Akim Demaille
2012-10-16 13:57:31 +02:00
parent 2a6b66c5fd
commit f3bc338643
11 changed files with 62 additions and 50 deletions

View File

@@ -396,7 +396,7 @@ AT_TEST_LR_TYPE([[Single State Split]],
[[%left 'a'
// Conflict resolution renders state 12 unreachable for canonical LR(1). We
// keep it so that the paser table diff is easier to code.
%define lr.keep-unreachable-states]],
%define lr.keep-unreachable-state]],
[[
S: 'a' A 'a' /* rule 1 */
| 'b' A 'b' /* rule 2 */
@@ -629,7 +629,7 @@ AT_TEST_LR_TYPE([[Lane Split]],
[[%left 'a'
// Conflict resolution renders state 16 unreachable for canonical LR(1). We
// keep it so that the paser table diff is easier to code.
%define lr.keep-unreachable-states]],
%define lr.keep-unreachable-state]],
[[
/* Similar to the last test case set but two states must be split. */
S: 'a' A 'a' /* rule 1 */
@@ -873,7 +873,7 @@ AT_TEST_LR_TYPE([[Complex Lane Split]],
[[%left 'a'
// Conflict resolution renders state 16 unreachable for canonical LR(1). We
// keep it so that the paser table diff is easier to code.
%define lr.keep-unreachable-states]],
%define lr.keep-unreachable-state]],
[[
/* Similar to the last test case set but forseeing the S/R conflict from the
first state that must be split is becoming difficult. Imagine if B were
@@ -1139,7 +1139,7 @@ dnl PARSER-EXIT-VALUE, PARSER-STDOUT, PARSER-STDERR
]])])
AT_TEST_LR_TYPE([[Split During Added Lookahead Propagation]],
[[%define lr.keep-unreachable-states]],
[[%define lr.keep-unreachable-state]],
[[
/* The partial state chart diagram below is for LALR(1). State 0 is the start
state. States are iterated for successor construction in numerical order.
@@ -1443,28 +1443,28 @@ dnl PARSER-EXIT-VALUE, PARSER-STDOUT, PARSER-STDERR
## ------------------------------- ##
## %define lr.default-reductions. ##
## %define lr.default-reduction. ##
## ------------------------------- ##
# AT_TEST_LR_DEFAULT_REDUCTIONS(GRAMMAR, INPUT, TABLES)
# -----------------------------------------------------
m4_define([AT_TEST_LR_DEFAULT_REDUCTIONS],
[
AT_TEST_TABLES_AND_PARSE([[no %define lr.default-reductions]],
AT_TEST_TABLES_AND_PARSE([[no %define lr.default-reduction]],
[[most]], [[]],
[[]],
[$1], [$2], [[]], [$3])
AT_TEST_TABLES_AND_PARSE([[%define lr.default-reductions most]],
AT_TEST_TABLES_AND_PARSE([[%define lr.default-reduction most]],
[[most]], [[]],
[[%define lr.default-reductions most]],
[[%define lr.default-reduction most]],
[$1], [$2], [[]], [$3])
AT_TEST_TABLES_AND_PARSE([[%define lr.default-reductions consistent]],
AT_TEST_TABLES_AND_PARSE([[%define lr.default-reduction consistent]],
[[consistent]], [[]],
[[%define lr.default-reductions consistent]],
[[%define lr.default-reduction consistent]],
[$1], [$2], [[]], [$3])
AT_TEST_TABLES_AND_PARSE([[%define lr.default-reductions accepting]],
AT_TEST_TABLES_AND_PARSE([[%define lr.default-reduction accepting]],
[[accepting]], [[]],
[[%define lr.default-reductions accepting]],
[[%define lr.default-reduction accepting]],
[$1], [$2], [[]], [$3])
])