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. |
`---------------------*/
{
/* 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",
}
-/*----------------------.
-| --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. |
`-------------------------------------------*/
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
{
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_ */