}
-/*----------------------------.
-| Output the guards to OOUT. |
-`----------------------------*/
-
-void
-guards_output (FILE *out)
-{
- int rule;
- for (rule = 1; rule < nrules + 1; ++rule)
- if (rules[rule].guard)
- {
- fprintf (out, " case %d:\n", rule);
-
- if (!no_lines_flag)
- fprintf (out, muscle_find ("linef"),
- rules[rule].guard_line,
- quotearg_style (c_quoting_style,
- muscle_find ("filename")));
- fprintf (out, "{ %s; }\n break;\n\n",
- rules[rule].guard);
- }
-}
-
-
/*---------------------------------------.
| Output the tokens definition to OOUT. |
`---------------------------------------*/
fprintf (out, "%s [[[%s]], [%d]]",
first ? "" : ",\n", symbol->tag, number);
- if (semantic_parser)
- /* FIXME: This is probably wrong, and should be just as
- above. --akim. */
- fprintf (out, "# define T%s\t%d\n", symbol->tag, symbol->number);
first = 0;
}
}
actions_output (out);
fputs ("]])\n\n", out);
- fputs ("m4_define([b4_guards], \n[[", out);
- guards_output (out);
- fputs ("]])\n\n", out);
-
fputs ("m4_define([b4_tokens], \n[", out);
token_definitions_output (out);
fputs ("])\n\n", out);
MUSCLE_INSERT_INT ("defines_flag", defines_flag);
/* Copy definitions in directive. */
- obstack_1grow (&attrs_obstack, 0);
- muscle_insert ("prologue", obstack_finish (&attrs_obstack));
+ obstack_1grow (&pre_prologue_obstack, 0);
+ obstack_1grow (&post_prologue_obstack, 0);
+ muscle_insert ("pre_prologue", obstack_finish (&pre_prologue_obstack));
+ muscle_insert ("post_prologue", obstack_finish (&post_prologue_obstack));
/* Find the right skeleton file. */
if (!skeleton)
- {
- if (semantic_parser)
- skeleton = "bison.hairy";
- else
- skeleton = "bison.simple";
- }
+ skeleton = "bison.simple";
/* Parse the skeleton file and output the needed parsers. */
muscle_insert ("skeleton", skeleton);
obstack_free (&muscle_obstack, NULL);
obstack_free (&format_obstack, NULL);
obstack_free (&action_obstack, NULL);
- obstack_free (&attrs_obstack, NULL);
+ obstack_free (&pre_prologue_obstack, NULL);
+ obstack_free (&post_prologue_obstack, NULL);
}