X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d4bd22956952464408f6d1c7aa3f82fd60f9f17d..9ca7f077a0a5ecdd00c5945c7a7bd3cf46e23c13:/src/getargs.c?ds=sidebyside diff --git a/src/getargs.c b/src/getargs.c index ff0aa3bc..c030db80 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -59,7 +59,6 @@ bool error_verbose = false; bool nondeterministic_parser = false; bool glr_parser = false; -bool pure_parser = false; int report_flag = report_none; int trace_flag = trace_none; @@ -264,6 +263,7 @@ Operation modes:\n\ --print-localedir output directory containing locale-dependent data\n\ --print-datadir output directory containing skeletons and XSLT\n\ -y, --yacc emulate POSIX Yacc\n\ + -W, --warnings=[CATEGORY] report the warnings falling in CATEGORY\n\ \n\ "), stdout); @@ -280,13 +280,25 @@ Parser:\n\ fputs (_("\ Output:\n\ - -d, --defines also produce a header file\n\ + -d, --defines[=FILE] also produce a header file\n\ -r, --report=THINGS also produce details on the automaton\n\ + --report-file=FILE write report to FILE\n\ -v, --verbose same as `--report=state'\n\ -b, --file-prefix=PREFIX specify a PREFIX for output files\n\ -o, --output=FILE leave output to FILE\n\ - -g, --graph also output a graph of the automaton\n\ - -x, --xml also output an xml of the automaton\n\ + -g, --graph[=FILE] also output a graph of the automaton\n\ + -x, --xml[=FILE] also output an XML report of the automaton\n\ +\n\ +"), stdout); + + fputs (_("\ +Warning categories include:\n\ + `midrule-values' unset or unused midrule values\n\ + `yacc' incompatibilities with POSIX YACC\n\ + `all' all the warnings\n\ + `no-CATEGORY' turn off warnings in CATEGORY\n\ + `none' turn off all the warnings\n\ + `error' treat warnings as errors\n\ \n\ "), stdout); @@ -323,7 +335,8 @@ version (void) putc ('\n', stdout); fprintf (stdout, - _("Copyright (C) %d Free Software Foundation, Inc.\n"), 2006); + _("Copyright (C) %d Free Software Foundation, Inc.\n"), + PACKAGE_COPYRIGHT_YEAR); fputs (_("\ This is free software; see the source for copying conditions. There is NO\n\ @@ -396,7 +409,8 @@ enum { LOCATIONS_OPTION = CHAR_MAX + 1, PRINT_LOCALEDIR_OPTION, - PRINT_DATADIR_OPTION + PRINT_DATADIR_OPTION, + REPORT_FILE_OPTION }; static struct option const long_options[] = @@ -419,6 +433,7 @@ static struct option const long_options[] = { "graph", optional_argument, 0, 'g' }, { "xml", optional_argument, 0, 'x' }, { "report", required_argument, 0, 'r' }, + { "report-file", required_argument, 0, REPORT_FILE_OPTION }, { "verbose", no_argument, 0, 'v' }, /* Hidden. */ @@ -524,6 +539,10 @@ getargs (int argc, char *argv[]) FLAGS_ARGMATCH (report, optarg); break; + case REPORT_FILE_OPTION: + spec_verbose_file = xstrdup (AS_FILE_NAME (optarg)); + break; + case 'T': FLAGS_ARGMATCH (trace, optarg); break;