bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Set all front-end %define defaults in one place.


From: Joel E. Denny
Subject: [PATCH] Set all front-end %define defaults in one place.
Date: Thu, 30 Apr 2009 03:34:03 -0400 (EDT)

I pushed this to branch-2.5 and master.

>From 1c4aa81df1fd11e2be5b2af78b4375f85bb2e59e Mon Sep 17 00:00:00 2001
From: Joel E. Denny <address@hidden>
Date: Thu, 30 Apr 2009 00:31:12 -0400
Subject: [PATCH] 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.

diff --git a/src/main.c b/src/main.c
index 6c93a4e..5769693 100644
--- a/src/main.c
+++ b/src/main.c
@@ -114,7 +114,6 @@ main (int argc, char *argv[])
      declarations.  */
   timevar_push (TV_CONFLICTS);
   conflicts_solve ();
-  muscle_percent_define_default ("lr.keep_unreachable_states", "false");
   if (!muscle_percent_define_flag_if ("lr.keep_unreachable_states"))
     {
       state_number *old_to_new = xnmalloc (nstates, sizeof *old_to_new);
diff --git a/src/reader.c b/src/reader.c
index 76e379f..2f3cd82 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -555,9 +555,12 @@ reader (void)
   gram_scanner_initialize ();
   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;
+    /* IELR would be a better default, but LALR is historically the
+       default.  */
     muscle_percent_define_default ("lr.type", "LALR");
     lr_type = muscle_percent_define_get ("lr.type");
     if (0 != strcmp (lr_type, "canonical LR"))
@@ -567,7 +570,7 @@ reader (void)
     free (lr_type);
   }
 
-  /* Check front-end %define variable values.  */
+  /* Check front-end %define variables.  */
   {
     static char const * const values[] = {
       "lr.type", "LALR", "IELR", "canonical LR", NULL,
-- 
1.5.4.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]