mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
Set all front-end %define defaults in one place.
* src/main.c (main): Move lr.keep_unreachable_states default... * src/reader.c (reader): ... to here.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
|
Set all front-end %define defaults in one place.
|
||||||
|
* src/main.c (main): Move lr.keep_unreachable_states default...
|
||||||
|
* src/reader.c (reader): ... to here.
|
||||||
|
|
||||||
2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
|
2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
Rename lr.default_reductions to lr.default-reductions.
|
Rename lr.default_reductions to lr.default-reductions.
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ main (int argc, char *argv[])
|
|||||||
declarations. */
|
declarations. */
|
||||||
timevar_push (TV_CONFLICTS);
|
timevar_push (TV_CONFLICTS);
|
||||||
conflicts_solve ();
|
conflicts_solve ();
|
||||||
muscle_percent_define_default ("lr.keep_unreachable_states", "false");
|
|
||||||
if (!muscle_percent_define_flag_if ("lr.keep_unreachable_states"))
|
if (!muscle_percent_define_flag_if ("lr.keep_unreachable_states"))
|
||||||
{
|
{
|
||||||
state_number *old_to_new = xnmalloc (nstates, sizeof *old_to_new);
|
state_number *old_to_new = xnmalloc (nstates, sizeof *old_to_new);
|
||||||
|
|||||||
@@ -555,9 +555,12 @@ reader (void)
|
|||||||
gram_scanner_initialize ();
|
gram_scanner_initialize ();
|
||||||
gram_parse ();
|
gram_parse ();
|
||||||
|
|
||||||
/* IELR would be a better default, but LALR is historically the default. */
|
/* Set front-end %define variable defaults. */
|
||||||
|
muscle_percent_define_default ("lr.keep_unreachable_states", "false");
|
||||||
{
|
{
|
||||||
char *lr_type;
|
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");
|
lr_type = muscle_percent_define_get ("lr.type");
|
||||||
if (0 != strcmp (lr_type, "canonical LR"))
|
if (0 != strcmp (lr_type, "canonical LR"))
|
||||||
@@ -567,7 +570,7 @@ reader (void)
|
|||||||
free (lr_type);
|
free (lr_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check front-end %define variable values. */
|
/* Check front-end %define variables. */
|
||||||
{
|
{
|
||||||
static char const * const values[] = {
|
static char const * const values[] = {
|
||||||
"lr.type", "LALR", "IELR", "canonical LR", NULL,
|
"lr.type", "LALR", "IELR", "canonical LR", NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user