Index: ChangeLog
from  Akim Demaille  <[EMAIL PROTECTED]>

        * src/getargs.h, src/getargs.c: Swap --report and --trace handling
        to be in alphabetical order.
        (trace_args): Spelling fixes.

Index: src/getargs.c
===================================================================
RCS file: /cvsroot/bison/bison/src/getargs.c,v
retrieving revision 1.74
diff -u -r1.74 getargs.c
--- src/getargs.c 11 Jun 2006 18:27:44 -0000 1.74
+++ src/getargs.c 9 Jul 2006 15:36:48 -0000
@@ -69,6 +69,54 @@
 extern char *program_name;
 
 
+/*----------------------.
+| --report's handling.  |
+`----------------------*/
+
+static const char * const report_args[] =
+{
+  /* In a series of synonyms, present the most meaningful first, so
+     that argmatch_valid be more readable.  */
+  "none",
+  "state", "states",
+  "itemset", "itemsets",
+  "lookahead", "lookaheads", "look-ahead",
+  "solved",
+  "all",
+  0
+};
+
+static const int report_types[] =
+{
+  report_none,
+  report_states, report_states,
+  report_states | report_itemsets, report_states | report_itemsets,
+  report_states | report_lookahead_tokens,
+  report_states | report_lookahead_tokens,
+  report_states | report_lookahead_tokens,
+  report_states | report_solved_conflicts,
+  report_all
+};
+
+ARGMATCH_VERIFY (report_args, report_types);
+
+static void
+report_argmatch (char *args)
+{
+  args = strtok (args, ",");
+  do
+    {
+      int report = XARGMATCH ("--report", args,
+                             report_args, report_types);
+      if (report == report_none)
+       report_flag = report_none;
+      else
+       report_flag |= report;
+    }
+  while ((args = strtok (NULL, ",")));
+}
+
+
 /*---------------------.
 | --trace's handling.  |
 `---------------------*/
@@ -77,12 +125,12 @@
 {
   /* In a series of synonyms, present the most meaningful first, so
      that argmatch_valid be more readable.  */
-  "none       - no report",
+  "none       - no traces",
   "scan       - grammar scanner traces",
   "parse      - grammar parser traces",
-  "automaton  - contruction of the automaton",
+  "automaton  - construction of the automaton",
   "bitsets    - use of bitsets",
-  "grammar    - reading, reducing of the grammar",
+  "grammar    - reading, reducing the grammar",
   "resource   - memory consumption (where available)",
   "sets       - grammar sets: firsts, nullable etc.",
   "tools      - m4 invocation",
@@ -134,54 +182,6 @@
 }
 
 
-/*----------------------.
-| --report's handling.  |
-`----------------------*/
-
-static const char * const report_args[] =
-{
-  /* In a series of synonyms, present the most meaningful first, so
-     that argmatch_valid be more readable.  */
-  "none",
-  "state", "states",
-  "itemset", "itemsets",
-  "lookahead", "lookaheads", "look-ahead",
-  "solved",
-  "all",
-  0
-};
-
-static const int report_types[] =
-{
-  report_none,
-  report_states, report_states,
-  report_states | report_itemsets, report_states | report_itemsets,
-  report_states | report_lookahead_tokens,
-  report_states | report_lookahead_tokens,
-  report_states | report_lookahead_tokens,
-  report_states | report_solved_conflicts,
-  report_all
-};
-
-ARGMATCH_VERIFY (report_args, report_types);
-
-static void
-report_argmatch (char *args)
-{
-  args = strtok (args, ",");
-  do
-    {
-      int report = XARGMATCH ("--report", args,
-                             report_args, report_types);
-      if (report == report_none)
-       report_flag = report_none;
-      else
-       report_flag |= report;
-    }
-  while ((args = strtok (NULL, ",")));
-}
-
-
 /*-------------------------------------------.
 | Display the help message and exit STATUS.  |
 `-------------------------------------------*/
Index: src/getargs.h
===================================================================
RCS file: /cvsroot/bison/bison/src/getargs.h,v
retrieving revision 1.31
diff -u -r1.31 getargs.h
--- src/getargs.h 10 Jun 2006 03:02:23 -0000 1.31
+++ src/getargs.h 9 Jul 2006 15:36:48 -0000
@@ -59,25 +59,6 @@
 
 extern bool nondeterministic_parser;
 
-/* --trace.  */
-enum trace
-  {
-    trace_none      = 0,
-    trace_scan      = 1 << 0,
-    trace_parse     = 1 << 1,
-    trace_resource  = 1 << 2,
-    trace_sets      = 1 << 3,
-    trace_bitsets   = 1 << 4,
-    trace_tools     = 1 << 5,
-    trace_automaton = 1 << 6,
-    trace_grammar   = 1 << 7,
-    trace_time      = 1 << 8,
-    trace_skeleton  = 1 << 9,
-    trace_m4        = 1 << 10,
-    trace_all       = ~0
-  };
-extern int trace_flag;
-
 /* --report.  */
 enum report
   {
@@ -88,8 +69,29 @@
     report_solved_conflicts = 1 << 3,
     report_all              = ~0
   };
+/** What appears in the *.output file.  */
 extern int report_flag;
 
+/* --trace.  */
+enum trace
+  {
+    trace_none      = 0,       /**< No traces. */
+    trace_scan      = 1 << 0,  /**< Grammar scanner traces. */
+    trace_parse     = 1 << 1,  /**< Grammar parser traces. */
+    trace_resource  = 1 << 2,  /**< Memory allocation. */
+    trace_sets      = 1 << 3,  /**< Grammar sets: firsts, nullable etc. */
+    trace_bitsets   = 1 << 4,  /**< Use of bitsets. */
+    trace_tools     = 1 << 5,  /**< m4 invocation. */
+    trace_automaton = 1 << 6,  /**< Construction of the automaton. */
+    trace_grammar   = 1 << 7,  /**< Reading, reducing the grammar. */
+    trace_time      = 1 << 8,  /**< Time consumption. */
+    trace_skeleton  = 1 << 9,  /**< Skeleton postprocessing. */
+    trace_m4        = 1 << 10, /**< M4 traces. */
+    trace_all       = ~0       /**< All of the above.  */
+  };
+/** What debug items bison displays during its run.  */
+extern int trace_flag;
+
 void getargs (int argc, char *argv[]);
 
 #endif /* !GETARGS_H_ */

Reply via email to