mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
add -fsyntax-only
When debugging Bison itself, this is very handy, especially when tweaking the frontend badly enough to break the backends. It can also be used to check a grammar. * src/getargs.h, src/getargs.c (feature_syntax_only): New. (feature_args, feature_types): Adjust. * src/main.c (main): Use it.
This commit is contained in:
@@ -155,7 +155,10 @@ main (int argc, char *argv[])
|
||||
|
||||
print_precedence_warnings ();
|
||||
|
||||
if (!update_flag)
|
||||
/* Whether to generate output files. */
|
||||
bool generate = !(feature_flag & feature_syntax_only);
|
||||
|
||||
if (generate)
|
||||
{
|
||||
/* Output file names. */
|
||||
compute_output_file_names ();
|
||||
@@ -196,7 +199,7 @@ main (int argc, char *argv[])
|
||||
timevar_pop (tv_free);
|
||||
|
||||
/* Output the tables and the parser to ftable. In file output. */
|
||||
if (!update_flag)
|
||||
if (generate)
|
||||
{
|
||||
timevar_push (tv_parser);
|
||||
output ();
|
||||
|
||||
Reference in New Issue
Block a user