From: Akim Demaille Date: Mon, 11 Feb 2013 08:34:22 +0000 (+0100) Subject: options: no longer document warnings when diagnosing an invalid -W X-Git-Tag: v2.7.90~100 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/9a9130f26d8df2c1fe2051c5881e0da804ba8e9c?ds=sidebyside;hp=312d0d654f0143f6da1dc650f7419c15fd57f039 options: no longer document warnings when diagnosing an invalid -W The argmatch functions accept prefixes of the alternatives (like getopt does for long options). Bison uses this to document the warning categories. This is troublesome: it duplicates the --help documentation, it is not gettextized, it is displayed with ugly quotes (because argmatch uses it to display the list of possible answers), and it prevents straighforward uses of the tables of valid warning categories (for instance so that warning diagnostics end with the name of the warning). The "hidden" option --trace uses the same trick, but it does not need to be translated, nor to be described in --help. * src/getargs.c (warnings_args): Remove pseudo documentation. Comment changes. --- diff --git a/src/getargs.c b/src/getargs.c index 97191ef3..fe6c1d42 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -196,8 +196,6 @@ ARGMATCH_VERIFY (report_args, report_types); static const char * const trace_args[] = { - /* In a series of synonyms, present the most meaningful first, so - that argmatch_valid be more readable. */ "none - no traces", "scan - grammar scanner traces", "parse - grammar parser traces", @@ -244,18 +242,16 @@ ARGMATCH_VERIFY (trace_args, trace_types); static const char * const warnings_args[] = { - /* In a series of synonyms, present the most meaningful first, so - that argmatch_valid be more readable. */ - "none - no warnings", - "midrule-values - unset or unused midrule values", - "yacc - incompatibilities with POSIX Yacc", - "conflicts-sr - S/R conflicts", - "conflicts-rr - R/R conflicts", - "deprecated - obsolete constructs", - "precedence - useless precedence and associativity", - "other - all other warnings", - "all - all of the above", - "error - warnings are errors", + "none", + "midrule-values", + "yacc", + "conflicts-sr", + "conflicts-rr", + "deprecated", + "precedence", + "other", + "all", + "error", 0 };