mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 13:53:03 +00:00
%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.
This commit is contained in:
@@ -1095,11 +1095,11 @@ ielr (void)
|
||||
/* Examine user options. */
|
||||
{
|
||||
char *type = muscle_percent_define_get ("lr.type");
|
||||
if (0 == strcmp (type, "LALR"))
|
||||
if (0 == strcmp (type, "lalr"))
|
||||
lr_type = LR_TYPE__LALR;
|
||||
else if (0 == strcmp (type, "IELR"))
|
||||
else if (0 == strcmp (type, "ielr"))
|
||||
lr_type = LR_TYPE__IELR;
|
||||
else if (0 == strcmp (type, "canonical LR"))
|
||||
else if (0 == strcmp (type, "canonical-lr"))
|
||||
lr_type = LR_TYPE__CANONICAL_LR;
|
||||
else
|
||||
aver (false);
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
* - \c ::states is of size \c ::nstates (which might be greater than
|
||||
* <tt>::nstates \@pre</tt>) and defines the type of parser specified by
|
||||
* the value of the \c \%define variable \c lr.type. Its value can be:
|
||||
* - \c "LALR".
|
||||
* - \c "IELR".
|
||||
* - \c "canonical LR".
|
||||
* - \c "lalr".
|
||||
* - \c "ielr".
|
||||
* - \c "canonical-lr".
|
||||
*/
|
||||
void ielr (void);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.390-0aaa. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.394-10e5b80-dirty. */
|
||||
|
||||
/* Implementation for Bison's Yacc-like parsers in C
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
#define YYBISON_VERSION "2.4.390-0aaa"
|
||||
#define YYBISON_VERSION "2.4.394-10e5b80-dirty"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.390-0aaa. */
|
||||
/* A Bison parser, made by GNU Bison 2.4.394-10e5b80-dirty. */
|
||||
|
||||
/* Interface for Bison's Yacc-like parsers in C
|
||||
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user