summaryrefslogtreecommitdiff
path: root/src/getargs.h
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-05-21 18:02:17 +0200
committerAkim Demaille <akim.demaille@gmail.com>2020-05-21 20:13:04 +0200
commit1ebc2ac55c8dfe22711a349ba1e591b5ac4e93c5 (patch)
tree20b75293ab7be48e4c5992ea29a76533d2ac253b /src/getargs.h
parent94952779b68adb835238de12d780b64172e45548 (diff)
downloadbison-1ebc2ac55c8dfe22711a349ba1e591b5ac4e93c5.tar.gz
traces: provide a means to get short m4 traces
Let --trace=m4-early dump all the logs from the start (as --trace=m4 used to do), and have --trace=m4 now start traces only when actually working of the user's grammar. Can make a big difference in the case of small inputs. E.g. $ bison -S tests/testsuite.dir/001/input.m4 tests/testsuite.dir/001/input.y --trace=m4 |& wc 3952 19446 251068 $ bison -S tests/testsuite.dir/001/input.m4 tests/testsuite.dir/001/input.y --trace=m4-early |& wc 19491 131904 1830495 * data/skeletons/traceon.m4: New. * src/getargs.h, src/getargs.c: Introduce --trace=m4-early. * src/output.c (output_skeleton): Adjust for --trace=m4 and --trace=m4-early.
Diffstat (limited to 'src/getargs.h')
-rw-r--r--src/getargs.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/getargs.h b/src/getargs.h
index 39741926..c1629ab5 100644
--- a/src/getargs.h
+++ b/src/getargs.h
@@ -100,11 +100,12 @@ enum trace
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_muscles = 1 << 11, /**< M4 definitions of the muscles. */
- trace_ielr = 1 << 12, /**< IELR conversion. */
- trace_closure = 1 << 13, /**< Input/output of closure(). */
- trace_locations = 1 << 14, /**< Full display of locations. */
+ trace_m4_early = 1 << 10, /**< M4 early traces. */
+ trace_m4 = 1 << 11, /**< M4 traces. */
+ trace_muscles = 1 << 12, /**< M4 definitions of the muscles. */
+ trace_ielr = 1 << 13, /**< IELR conversion. */
+ trace_closure = 1 << 14, /**< Input/output of closure(). */
+ trace_locations = 1 << 15, /**< Full display of locations. */
trace_all = ~0 /**< All of the above. */
};
/** What debug items bison displays during its run. */