- {
- j++;
- }
-
- obstack_fgrow1 (oout, "%6d", short_table[i]);
- }
-
- obstack_sgrow (oout, "\n};\n");
-}
-
-
-static inline void
-output_short_table (struct obstack *oout,
- const char *comment,
- const char *table_name,
- short *short_table,
- short first_value,
- short begin, short end)
-{
- output_short_or_char_table (oout, comment, "short", table_name, short_table,
- first_value, begin, end);
-}
-
-
-/*--------------------------------------------------------------.
-| output_headers -- Output constant strings to the beginning of |
-| certain files. |
-`--------------------------------------------------------------*/
-
-/* Don't put the `%s' insides quotes, since it quotearg puts them. */
-
-#define GUARDSTR \
-"\n\
-#include %s\n\
-extern int yyerror;\n\
-extern int yycost;\n\
-extern char * yymsg;\n\
-extern YYSTYPE yyval;\n\
-\n\
-yyguard(n, yyvsp, yylsp)\n\
-register int n;\n\
-register YYSTYPE *yyvsp;\n\
-register YYLTYPE *yylsp;\n\
-{\n\
- yyerror = 0;\n\
- yycost = 0;\n\
- yymsg = 0;\n\
- switch (n)\n\
- {"
-
-#define ACTSTR \
-"\n\
-#include %s\n\
-extern YYSTYPE yyval;\n\
-extern int yychar;\n\
-\n\
-yyaction(n, yyvsp, yylsp)\n\
-register int n;\n\
-register YYSTYPE *yyvsp;\n\
-register YYLTYPE *yylsp;\n\
-{\n\
- switch (n)\n\
- {"
-
-#define ACTSTR_SIMPLE "\n switch (yyn) {\n"
-
-void
-output_headers (void)
-{
- char *attrsfile_quoted = quotearg_style (c_quoting_style, attrsfile);
-
- if (semantic_parser)
- obstack_fgrow1 (&guard_obstack, GUARDSTR, attrsfile_quoted);
-
- if (no_parser_flag)
- return;
-
- if (semantic_parser)
- obstack_fgrow1 (&action_obstack, ACTSTR, attrsfile_quoted);
- else
- obstack_sgrow (&action_obstack, ACTSTR_SIMPLE);
-
- /* Rename certain symbols if -p was specified. */
- if (spec_name_prefix)
- {
- obstack_fgrow1 (&table_obstack,
- "#define yyparse %sparse\n", spec_name_prefix);
- obstack_fgrow1 (&table_obstack,
- "#define yylex %slex\n", spec_name_prefix);
- obstack_fgrow1 (&table_obstack,
- "#define yyerror %serror\n", spec_name_prefix);
- obstack_fgrow1 (&table_obstack,
- "#define yylval %slval\n", spec_name_prefix);
- obstack_fgrow1 (&table_obstack,
- "#define yychar %schar\n", spec_name_prefix);
- obstack_fgrow1 (&table_obstack,
- "#define yydebug %sdebug\n", spec_name_prefix);
- obstack_fgrow1 (&table_obstack,
- "#define yynerrs %snerrs\n", spec_name_prefix);