]> git.saurik.com Git - bison.git/blobdiff - src/main.c
Get rid of broken %no-parser, -n, and --no-parser implementation and
[bison.git] / src / main.c
index 610d2c4e46bdf2baf303dcd168b79588e5fcaa6c..8463608360f942697834a705786417934f624472 100644 (file)
@@ -1,7 +1,7 @@
 /* Top level entry point of Bison.
 
    Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000, 2001, 2002, 2004,
-   2005, 2006 Free Software Foundation, Inc.
+   2005, 2006, 2007 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -46,6 +46,7 @@
 #include "reduce.h"
 #include "scan-code.h"
 #include "scan-gram.h"
+#include "scan-skel.h"
 #include "symtab.h"
 #include "tables.h"
 #include "uniqstr.h"
@@ -114,6 +115,14 @@ main (int argc, char *argv[])
      declarations.  */
   timevar_push (TV_CONFLICTS);
   conflicts_solve ();
+  {
+    state_number *old_to_new = xnmalloc (nstates, sizeof *old_to_new);
+    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);
+    free (old_to_new);
+  }
   conflicts_print ();
   timevar_pop (TV_CONFLICTS);
 
@@ -175,6 +184,7 @@ main (int argc, char *argv[])
   muscle_free ();
   uniqstrs_free ();
   code_scanner_free ();
+  skel_scanner_free ();
   quotearg_free ();
   timevar_pop (TV_FREE);