mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 21:33:04 +00:00
diagnostics: update the grammar file
Let's use the fixits to actually update the grammar files. * src/getargs.h, src/getargs.c (update_flag): New. * src/fixits.h, src/fixits.c (fixits_run): New. * src/main.c (main): Invoke fixits_run when --update is passed. * tests/input.at (Deprecated directives): Check --update.
This commit is contained in:
@@ -103,6 +103,12 @@ main (int argc, char *argv[])
|
||||
reader ();
|
||||
timevar_pop (tv_reader);
|
||||
|
||||
/* Fix input file now, even if there are errors: that's less
|
||||
warnings in the following runs. */
|
||||
if (update_flag)
|
||||
fixits_run ();
|
||||
fixits_free ();
|
||||
|
||||
if (complaint_status == status_complaint)
|
||||
goto finish;
|
||||
|
||||
@@ -206,7 +212,6 @@ main (int argc, char *argv[])
|
||||
conflicts_free ();
|
||||
grammar_free ();
|
||||
output_file_names_free ();
|
||||
fixits_free ();
|
||||
|
||||
/* The scanner memory cannot be released right after parsing, as it
|
||||
contains things such as user actions, prologue, epilogue etc. */
|
||||
|
||||
Reference in New Issue
Block a user