[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
traces: make closure() less verbose
From: |
Akim Demaille |
Subject: |
traces: make closure() less verbose |
Date: |
Thu, 18 Apr 2019 06:44:53 +0200 |
commit 9ad7524659a340d3c8968eaa6c7ebe7e29d46031
Author: Akim Demaille <address@hidden>
Date: Sun Apr 14 18:08:39 2019 +0200
traces: make closure() less verbose
* src/getargs.h, src/getargs.c (trace_closure): New.
* src/closure.c (closure): Use it.
diff --git a/src/closure.c b/src/closure.c
index 385f35c4..0f46f834 100644
--- a/src/closure.c
+++ b/src/closure.c
@@ -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);
}
diff --git a/src/getargs.c b/src/getargs.c
index 9cd07014..8673d41c 100644
--- a/src/getargs.c
+++ b/src/getargs.c
@@ -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,
diff --git a/src/getargs.h b/src/getargs.h
index f630d0f5..2037c00a 100644
--- a/src/getargs.h
+++ b/src/getargs.h
@@ -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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- traces: make closure() less verbose,
Akim Demaille <=