X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/82b6d266fdd393132bf7073acaea31f4f624b223..1239777d4f4f96a23e5cd177121f16f0d9e71c68:/src/getargs.c diff --git a/src/getargs.c b/src/getargs.c index 7b0046a4..ed76626a 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -34,11 +34,12 @@ int no_lines_flag = 0; int no_parser_flag = 0; int token_table_flag = 0; int verbose_flag = 0; -int statistics_flag = 0; int yacc_flag = 0; /* for -y */ int graph_flag = 0; +int trace_flag = 0; const char *skeleton = NULL; +const char *include = NULL; extern char *program_name; @@ -89,7 +90,9 @@ Output:\n\ -d, --defines also produce a header file\n\ -v, --verbose also produce an explanation of the automaton\n\ -b, --file-prefix=PREFIX specify a PREFIX for output files\n\ - -o, --output-file=FILE leave output to FILE\n"), stream); + -o, --output=FILE leave output to FILE\n\ + -g, --graph also produce a VCG description of the automaton\n\ +"), stream); putc ('\n', stream); fputs (_("\ @@ -132,7 +135,7 @@ getargs (int argc, char *argv[]) { int c; - create_long_option_table (); + struct option *longopts = long_option_table_new (); while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != EOF) switch (c) { @@ -153,7 +156,9 @@ getargs (int argc, char *argv[]) exit (0); case 'g': + /* Here, the -g and --graph=FILE options are differentiated. */ graph_flag = 1; + spec_graph_file = optarg; break; case 'v': @@ -164,8 +169,14 @@ getargs (int argc, char *argv[]) skeleton = optarg; break; + case 'I': + include = optarg; + break; + case 'd': + /* Here, the -d and --defines options are differentiated. */ defines_flag = 1; + spec_defines_file = optarg; break; case 'l': @@ -206,7 +217,8 @@ getargs (int argc, char *argv[]) exit (1); } - XFREE (longopts); + free (longopts); + if (optind == argc) { fprintf (stderr, _("%s: no grammar file given\n"), program_name);