%define lr.type: make values lowercase IDs.

That is, "LALR" => "lalr", "IELR" => "ielr", and
"canonical LR" => "canonical-lr".
* NEWS (2.5): Update documentation.
* doc/bison.texinfo (Decl Summary): Likewise.
* src/ielr.c (ielr): Use new values.
* src/ielr.h (ielr): Update documentation.
* src/reader.c (prepare_percent_define_front_end_variables): Use
and validate new values.
* tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
grammars.
* tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
(cherry picked from commit 6ba9640406)
This commit is contained in:
Joel E. Denny
2009-08-28 00:57:06 -04:00
parent 4bb975e1ad
commit 3a414bbfa0
10 changed files with 44 additions and 29 deletions

View File

@@ -42,18 +42,18 @@ AT_CHECK([[diff -u input-lalr.output input.output \
[[0]], [$1])])
AT_TEST_TABLES_AND_PARSE([$2[: LALR(1)]], [[LALR]], [[last-state]],
[[%define lr.type "LALR"
[[%define lr.type "lalr"
]$3],
[$4], [$5], [$6], [$7],
[AT_LALR1_DIFF_CHECK([$8])$9], [$10], [$11], [$12])
AT_TEST_TABLES_AND_PARSE([$2[: IELR(1)]], [[IELR]], [[last-state]],
[[%define lr.type "IELR"
[[%define lr.type "ielr"
]$3],
[$4], [$5], [$6], [$7],
[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"
[[%define lr.type "canonical-lr"
]$3],
[$4], [$5], [$6], [$7],
[$9], [$10], [$11], [$12])

View File

@@ -375,19 +375,19 @@ m4_define([AT_TEST_LR_TYPE],
AT_TEST_TABLES_AND_PARSE([[no %define lr.type: ]$1],
[[LALR]], [[]],
[$2], m4_shiftn(2, $@))
AT_TEST_TABLES_AND_PARSE([[%define lr.type "LALR": ]$1],
AT_TEST_TABLES_AND_PARSE([[%define lr.type "lalr": ]$1],
[[LALR]], [[]],
[[%define lr.type "LALR"
[[%define lr.type "lalr"
]$2],
m4_shiftn(2, $@))
AT_TEST_TABLES_AND_PARSE([[%define lr.type "IELR": ]$1],
AT_TEST_TABLES_AND_PARSE([[%define lr.type "ielr": ]$1],
[[IELR]], [[]],
[[%define lr.type "IELR"
[[%define lr.type "ielr"
]$2],
m4_shiftn(2, $@))
AT_TEST_TABLES_AND_PARSE([[%define lr.type "canonical LR": ]$1],
AT_TEST_TABLES_AND_PARSE([[%define lr.type "canonical-lr": ]$1],
[[canonical LR]], [[]],
[[%define lr.type "canonical LR"
[[%define lr.type "canonical-lr"
]$2],
m4_shiftn(2, $@))
])