X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/bb0027a9aca454a80f737e0c49df0a231c50b996..c97011bfc1cabd3f7aa8e263f83d9e8a18a262bf:/src/main.c diff --git a/src/main.c b/src/main.c index c695ae5f..b5a8e001 100644 --- a/src/main.c +++ b/src/main.c @@ -51,8 +51,8 @@ main (int argc, char *argv[]) { program_name = argv[0]; setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); + (void) bindtextdomain (PACKAGE, LOCALEDIR); + (void) textdomain (PACKAGE); getargs (argc, argv); @@ -99,11 +99,6 @@ main (int argc, char *argv[]) lalr (); timevar_pop (TV_LALR); - timevar_push (TV_FREE); - nullable_free (); - derives_free (); - timevar_pop (TV_FREE); - /* Find and record any conflicts: places where one token of lookahead is not enough to disambiguate the parsing. In file conflicts. Also resolve s/r conflicts based on precedence @@ -113,6 +108,14 @@ main (int argc, char *argv[]) conflicts_print (); timevar_pop (TV_CONFLICTS); + /* Compute the parser tables. */ + timevar_push (TV_ACTIONS); + tables_generate (); + timevar_pop (TV_ACTIONS); + + grammar_rules_never_reduced_report + (_("rule never reduced because of conflicts")); + /* Output file names. */ compute_output_file_names (); @@ -124,11 +127,6 @@ main (int argc, char *argv[]) timevar_pop (TV_REPORT); } - /* Stop if there were errors, to avoid trashing previous output - files. */ - if (complain_message_count) - exit (1); - /* Output the VCG graph. */ if (graph_flag) { @@ -137,10 +135,10 @@ main (int argc, char *argv[]) timevar_pop (TV_GRAPH); } - /* Compute the parser tables. */ - timevar_push (TV_ACTIONS); - tables_generate (); - timevar_pop (TV_ACTIONS); + /* Stop if there were errors, to avoid trashing previous output + files. */ + if (complain_message_count) + exit (1); /* Lookaheads are no longer needed. */ timevar_push (TV_FREE); @@ -153,6 +151,8 @@ main (int argc, char *argv[]) timevar_pop (TV_PARSER); timevar_push (TV_FREE); + nullable_free (); + derives_free (); tables_free (); states_free (); reduce_free ();