From 4175f6bba2da4050e268523d396ee446dc4d7655 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 12 Aug 2008 21:11:53 +0200 Subject: [PATCH] muscles_output. * src/output.c (muscles_output): New, extracted from... (output_skeleton): here. Adjust. --- ChangeLog | 7 +++++++ src/output.c | 33 +++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef5d3b9e..f9db6f4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-10 Akim Demaille + + muscles_output. + * src/output.c (muscles_output): New, extracted from... + (output_skeleton): here. + Adjust. + 2008-11-10 Akim Demaille Formatting changes. diff --git a/src/output.c b/src/output.c index d59429b0..6e6da2e6 100644 --- a/src/output.c +++ b/src/output.c @@ -485,6 +485,26 @@ prepare_actions (void) muscle_insert_unsigned_int_table ("conflicting_rules", conflict_list, 0, 1, conflict_list_cnt); } + + +/*--------------------------------------------. +| Output the definitions of all the muscles. | +`--------------------------------------------*/ + +static void +muscles_output (FILE *out) +{ + fputs ("m4_init()\n", out); + + type_names_output (out); + user_actions_output (out); + merger_output (out); + token_definitions_output (out); + symbol_code_props_output (out, "destructors", &symbol_destructor_get); + symbol_code_props_output (out, "printers", &symbol_printer_get); + + muscles_m4_output (out); +} /*---------------------------. | Call the skeleton parser. | @@ -586,18 +606,7 @@ output_skeleton (void) if (! out) error (EXIT_FAILURE, get_errno (), "fdopen"); - - /* Output the definitions of all the muscles. */ - fputs ("m4_init()\n", out); - - type_names_output (out); - user_actions_output (out); - merger_output (out); - token_definitions_output (out); - symbol_code_props_output (out, "destructors", &symbol_destructor_get); - symbol_code_props_output (out, "printers", &symbol_printer_get); - - muscles_m4_output (out); + muscles_output (out); xfclose (out); /* Read and process m4's output. */ -- 2.45.2