* doc/bison.texinfo (Debugging): Split into...

(Tracing): this new section, its former contents, and...
(Understanding): this new section.
* src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
by...
(report_flag): this.
Adjust all dependencies.
(report_args, report_types, report_argmatch): New.
(usage, getargs): Report/support -r, --report.
* src/options.h
(struct option_table_struct): Rename as..,
(struct option_table_s): this.
Rename the `set_flag' member to `flag' to match with getopt_long's
struct.
* src/options.c (option_table): Split verbose into an entry for
%verbose, and another for --verbose.
Support --report/-r, so remove -r from the obsolete --raw.
* src/print.c: Attach full item sets and lookaheads reports to
report_flag instead of trace_flag.
* lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
This commit is contained in:
Akim Demaille
2002-05-25 16:12:40 +00:00
parent 78df825093
commit ec3bc3961d
25 changed files with 735 additions and 304 deletions

View File

@@ -1,5 +1,5 @@
/* Concentrate all options use in bison,
Copyright 2001 Free Software Foundation, Inc.
Copyright 2001, 2002 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -34,7 +34,7 @@ typedef enum opt_access_e
/* This is the general struct, which contains user's options from
command line or in grammar with percent flag. */
struct option_table_struct
struct option_table_s
{
/* Set the accessibility. */
opt_access_t access;
@@ -42,8 +42,8 @@ struct option_table_struct
const char *name;
/* Use for command line. */
int has_arg;
/* A set_flag value causes the named flag to be set. */
void *set_flag;
/* An optional lvalue to be set. */
void *flag;
/* A retval action returns the code. */
int ret_val;
/* The short option value, frequently a letter. */
@@ -53,9 +53,9 @@ struct option_table_struct
extern const char *shortopts;
/* Table which contain all options. */
extern const struct option_table_struct option_table[];
extern const struct option_table_s option_table[];
/* Set the longopts variable from option_table. */
/* Return a malloc'd list of the options for getopt_long. */
struct option *long_option_table_new PARAMS ((void));
#endif /* !OPTIONS_H_ */