[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/8] options: no longer document warnings when diagnosing an inva
From: |
Akim Demaille |
Subject: |
[PATCH 1/8] options: no longer document warnings when diagnosing an invalid -W |
Date: |
Thu, 14 Feb 2013 15:11:05 +0100 |
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.
---
src/getargs.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/src/getargs.c b/src/getargs.c
index 97191ef..fe6c1d4 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
};
--
1.8.1.3
- [PATCH 0/8] {master} revamp the handling of -W, Akim Demaille, 2013/02/14
- [PATCH 5/8] options: simplify the handling of -W, Akim Demaille, 2013/02/14
- [PATCH 8/8] getargs: minor simplification, Akim Demaille, 2013/02/14
- [PATCH 4/8] options: don't accept "error=" for -f and -r, Akim Demaille, 2013/02/14
- [PATCH 2/8] diagnostics: no longer pretty-print rules in error messages, carets suffice, Akim Demaille, 2013/02/14
- [PATCH 6/8] diagnostics: revamp the handling of -Werror, Akim Demaille, 2013/02/14
- [PATCH 7/8] style: more argument handling of -W into the diagnostics module, Akim Demaille, 2013/02/14
- [PATCH 3/8] diagnostics: factor the list of warning names, Akim Demaille, 2013/02/14
- [PATCH 1/8] options: no longer document warnings when diagnosing an invalid -W,
Akim Demaille <=
- Re: [PATCH 0/8] {master} revamp the handling of -W, Akim Demaille, 2013/02/16