%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

@@ -608,9 +608,9 @@ prepare_percent_define_front_end_variables (void)
char *lr_type;
/* IELR would be a better default, but LALR is historically the
default. */
muscle_percent_define_default ("lr.type", "LALR");
muscle_percent_define_default ("lr.type", "lalr");
lr_type = muscle_percent_define_get ("lr.type");
if (0 != strcmp (lr_type, "canonical LR"))
if (0 != strcmp (lr_type, "canonical-lr"))
muscle_percent_define_default ("lr.default-reductions", "all");
else
muscle_percent_define_default ("lr.default-reductions", "accepting");
@@ -620,7 +620,7 @@ prepare_percent_define_front_end_variables (void)
/* Check %define front-end variables. */
{
static char const * const values[] = {
"lr.type", "LALR", "IELR", "canonical LR", NULL,
"lr.type", "lalr", "ielr", "canonical-lr", NULL,
"lr.default-reductions", "all", "consistent", "accepting", NULL,
NULL
};