X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/08af01c2fc26eeb77afe3a667dded68c52ea3c37..eb1b07409f0ccad9970c8a60ded9f2a56d205b9c:/src/main.c diff --git a/src/main.c b/src/main.c index 50827098..84636083 100644 --- a/src/main.c +++ b/src/main.c @@ -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. @@ -115,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);