mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
--trace=muscles
* src/getargs.h, src/getargs.c (trace_muscle): New.
(trace_types, trace_args): Support it.
* src/output.c (output_skeleton): Use it.
(cherry picked from commit 5263bea9f7)
This commit is contained in:
committed by
Joel E. Denny
parent
96002de2e1
commit
c65e529237
@@ -1,3 +1,10 @@
|
||||
2008-11-10 Akim Demaille <demaille@gostai.com>
|
||||
|
||||
--trace=muscles
|
||||
* src/getargs.h, src/getargs.c (trace_muscle): New.
|
||||
(trace_types, trace_args): Support it.
|
||||
* src/output.c (output_skeleton): Use it.
|
||||
|
||||
2008-11-10 Akim Demaille <demaille@gostai.com>
|
||||
|
||||
muscles_output.
|
||||
|
||||
@@ -176,6 +176,7 @@ static const char * const trace_args[] =
|
||||
"grammar - reading, reducing the grammar",
|
||||
"resource - memory consumption (where available)",
|
||||
"sets - grammar sets: firsts, nullable etc.",
|
||||
"muscles - m4 definitions passed to the skeleton",
|
||||
"tools - m4 invocation",
|
||||
"m4 - m4 traces",
|
||||
"skeleton - skeleton postprocessing",
|
||||
@@ -194,6 +195,7 @@ static const int trace_types[] =
|
||||
trace_grammar,
|
||||
trace_resource,
|
||||
trace_sets,
|
||||
trace_muscles,
|
||||
trace_tools,
|
||||
trace_m4,
|
||||
trace_skeleton,
|
||||
|
||||
@@ -106,6 +106,7 @@ enum trace
|
||||
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_all = ~0 /**< All of the above. */
|
||||
};
|
||||
/** What debug items bison displays during its run. */
|
||||
|
||||
18
src/output.c
18
src/output.c
@@ -488,7 +488,6 @@ static void
|
||||
output_skeleton (void)
|
||||
{
|
||||
FILE *in;
|
||||
FILE *out;
|
||||
int filter_fd[2];
|
||||
char const *argv[9];
|
||||
pid_t pid;
|
||||
@@ -576,12 +575,17 @@ output_skeleton (void)
|
||||
free (full_m4bison);
|
||||
free (full_skeleton);
|
||||
|
||||
out = fdopen (filter_fd[0], "w");
|
||||
if (! out)
|
||||
error (EXIT_FAILURE, get_errno (),
|
||||
"fdopen");
|
||||
muscles_output (out);
|
||||
xfclose (out);
|
||||
|
||||
if (trace_flag & trace_muscles)
|
||||
muscles_output (stderr);
|
||||
{
|
||||
FILE *out = fdopen (filter_fd[0], "w");
|
||||
if (! out)
|
||||
error (EXIT_FAILURE, get_errno (),
|
||||
"fdopen");
|
||||
muscles_output (out);
|
||||
xfclose (out);
|
||||
}
|
||||
|
||||
/* Read and process m4's output. */
|
||||
timevar_push (TV_M4);
|
||||
|
||||
Reference in New Issue
Block a user