mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
traces: make closure() less verbose
* src/getargs.h, src/getargs.c (trace_closure): New. * src/closure.c (closure): Use it.
This commit is contained in:
@@ -184,7 +184,7 @@ closure_new (unsigned n)
|
||||
void
|
||||
closure (item_number const *core, size_t n)
|
||||
{
|
||||
if (trace_flag & trace_sets)
|
||||
if (trace_flag & trace_closure)
|
||||
closure_print ("input", core, n);
|
||||
|
||||
bitset_zero (ruleset);
|
||||
@@ -221,7 +221,7 @@ closure (item_number const *core, size_t n)
|
||||
c++;
|
||||
}
|
||||
|
||||
if (trace_flag & trace_sets)
|
||||
if (trace_flag & trace_closure)
|
||||
closure_print ("output", itemset, nitemset);
|
||||
}
|
||||
|
||||
|
||||
@@ -188,6 +188,7 @@ static const char * const trace_args[] =
|
||||
"parse - grammar parser traces",
|
||||
"automaton - construction of the automaton",
|
||||
"bitsets - use of bitsets",
|
||||
"closure - input/output of closure",
|
||||
"grammar - reading, reducing the grammar",
|
||||
"resource - memory consumption (where available)",
|
||||
"sets - grammar sets: firsts, nullable etc.",
|
||||
@@ -208,6 +209,7 @@ static const int trace_types[] =
|
||||
trace_parse,
|
||||
trace_automaton,
|
||||
trace_bitsets,
|
||||
trace_closure,
|
||||
trace_grammar,
|
||||
trace_resource,
|
||||
trace_sets,
|
||||
|
||||
@@ -103,6 +103,7 @@ enum trace
|
||||
trace_m4 = 1 << 10, /**< M4 traces. */
|
||||
trace_muscles = 1 << 11, /**< M4 definitions of the muscles. */
|
||||
trace_ielr = 1 << 12, /**< IELR conversion. */
|
||||
trace_closure = 1 << 13, /**< Input/output of closure(). */
|
||||
trace_all = ~0 /**< All of the above. */
|
||||
};
|
||||
/** What debug items bison displays during its run. */
|
||||
|
||||
Reference in New Issue
Block a user