]> git.saurik.com Git - bison.git/blobdiff - src/main.c
If conflict resolution makes states unreachable, remove those states,
[bison.git] / src / main.c
index d64f92194d6e14aad00126130bd75c3f42d1d4c3..84b2566f48945001c3252c055b58c1d7a7ab0913 100644 (file)
@@ -115,6 +115,13 @@ main (int argc, char *argv[])
      declarations.  */
   timevar_push (TV_CONFLICTS);
   conflicts_solve ();
+  {
+    state_number old_to_new[nstates];
+    state_number nstates_old = nstates;
+    state_remove_unreachable_states (old_to_new);
+    lalr_update_state_numbers (old_to_new, nstates_old);
+    conflicts_update_state_numbers (old_to_new, nstates_old);
+  }
   conflicts_print ();
   timevar_pop (TV_CONFLICTS);