static inline void
output_table_data (struct obstack* oout,
- short* table,
+ short* table_data,
short first,
short begin,
short end)
}
else
++j;
- obstack_fgrow1 (oout, "%6d", table[i]);
+ obstack_fgrow1 (oout, "%6d", table_data[i]);
}
obstack_1grow (oout, 0);
}
XFREE (yyrhs);
}
- /* if (!semantic_parser && !no_parser_flag)
- obstack_sgrow (&table_obstack, "\n#endif\n"); */
+#if 0
+ if (!semantic_parser && !no_parser_flag)
+ obstack_sgrow (&table_obstack, "\n#endif\n");
+#endif
}
sort_actions ();
pack_table ();
- /* FIXME: See if this is useful. */
- /* obstack_1grow (&table_obstack, '\n'); */
+
output_base ();
output_table ();
- /* FIXME: See if this is useful. */
- /* obstack_1grow (&table_obstack, '\n'); */
+
output_check ();
}
else if ((c = getc (fskel)) == '%')
{
/* Read the macro. */
- char* macro_key = 0;
- char* macro_value = 0;
+ const char* macro_key = 0;
+ const char* macro_value = 0;
while (isalnum (c = getc (fskel)) || c == '_')
obstack_1grow (¯o_obstack, c);
obstack_1grow (¯o_obstack, 0);
xfclose (fskel);
}
-static void
-output_program (void)
-{
- int c;
-
- while ((c = getc (finput)) != EOF)
- obstack_1grow (&table_obstack, c);
-}
-
-
static void
free_itemsets (void)
{
void
output (void)
{
- obstack_init (¯o_obstack);
obstack_init (&output_obstack);
#if 0
- /* If using a simple parser the definition of YYSTYPE are put into
- TABLE_OBSTACK. */
- if (!semantic_parser)
- {
- size_t size = obstack_object_size (&attrs_obstack);
- obstack_grow (&table_obstack, obstack_finish (&attrs_obstack), size);
- }
+ reader_output_yylsp (&table_obstack); */
#endif
-
- /* reader_output_yylsp (&table_obstack); */
free_itemsets ();
output_token_translations ();
output_stos ();
output_rule_data ();
output_actions ();
-
- /* if (!no_parser_flag) */
+
+#if 0
+ if (!no_parser_flag) */
+#endif
prepare ();
+ /* Copy definitions in directive. */
+ macro_insert ("prologue", obstack_finish (&attrs_obstack));
output_parser ();
- output_program ();
obstack_free (¯o_obstack, 0);
obstack_free (&output_obstack, 0);