-#define GUARDSTR "\n#include \"%s\"\nextern int yyerror;\n\
-extern int yycost;\nextern char * yymsg;\nextern YYSTYPE yyval;\n\n\
-yyguard(n, yyvsp, yylsp)\nregister int n;\nregister YYSTYPE *yyvsp;\n\
-register YYLTYPE *yylsp;\n\
-{\n yyerror = 0;\nyycost = 0;\n yymsg = 0;\nswitch (n)\n {"
-
-#define ACTSTR "\n#include \"%s\"\nextern YYSTYPE yyval;\
-\nextern int yychar;\
-yyaction(n, yyvsp, yylsp)\nregister int n;\nregister YYSTYPE *yyvsp;\n\
-register YYLTYPE *yylsp;\n{\n switch (n)\n{"
-
-#define ACTSTR_SIMPLE "\n switch (yyn) {\n"
-
-
-void
-output_headers (void)
-{
- if (semantic_parser)
- fprintf(fguard, GUARDSTR, attrsfile);
-
- if (noparserflag)
- return;
-
- fprintf(faction, (semantic_parser ? ACTSTR : ACTSTR_SIMPLE), attrsfile);
-/* if (semantic_parser) JF moved this below
- fprintf(ftable, "#include \"%s\"\n", attrsfile);
- fprintf(ftable, "#include <stdio.h>\n\n");
-*/
-
- /* Rename certain symbols if -p was specified. */
- if (spec_name_prefix)
- {
- fprintf(ftable, "#define yyparse %sparse\n", spec_name_prefix);
- fprintf(ftable, "#define yylex %slex\n", spec_name_prefix);
- fprintf(ftable, "#define yyerror %serror\n", spec_name_prefix);
- fprintf(ftable, "#define yylval %slval\n", spec_name_prefix);
- fprintf(ftable, "#define yychar %schar\n", spec_name_prefix);
- fprintf(ftable, "#define yydebug %sdebug\n", spec_name_prefix);
- fprintf(ftable, "#define yynerrs %snerrs\n", spec_name_prefix);
- }
-}
-
-
-void
-output_trailers (void)
-{
- if (semantic_parser)
- fprintf(fguard, "\n }\n}\n");
-
- fprintf(faction, "\n");
-
- if (noparserflag)
- return;
-
- if (semantic_parser)
- fprintf(faction, " }\n");
- fprintf(faction, "}\n");
-}
-