+2001-09-25 Pascal Bart <pascal.bart@epita.fr>
+
+ * src/output.c (output_master_parser): Don't finish action_obstack.
+ (output_parser): Don't care about the muscle action, here.
+ (prepare): Copy the action_obstack in the action muscle.
+ (output): Free action_obstack.
+
2001-09-23 Pascal Bart <pascal.bart@epita.fr>
* src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
obstack_fgrow1 (oout, "%d", line + 1);
else if (!strcmp (muscle_key, "input_line"))
obstack_fgrow1 (oout, "%d", lineno);
- else if (!strcmp (muscle_key, "action"))
- {
- size_t size = obstack_object_size (&action_obstack);
- obstack_grow (oout, obstack_base (&action_obstack), size);
- }
/* FIXME: Insert the code to recognize %%sub-skeleton for exemple. */
else
{
else
skeleton = skeleton_find ("BISON_SIMPLE", BISON_SIMPLE);
}
-
- obstack_finish (&action_obstack);
output_parser (skeleton, &table_obstack);
}
MUSCLE_INSERT_INT ("locations_flag", locations_flag);
+ /* We need to save the actions in the muscle %%action. */
+ muscle_insert ("action", obstack_finish (&action_obstack));
+
if (spec_name_prefix)
MUSCLE_INSERT_STRING ("prefix", spec_name_prefix);
}
obstack_free (&muscle_obstack, 0);
obstack_free (&output_obstack, 0);
+ obstack_free (&action_obstack, 0);
}