* Copyright (c) 1989 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)skeleton.c 5.2 (Berkeley) %G%";
/* The three line banner used here should be replaced with a one line */
/* #ident directive if the target C compiler supports #ident */
/* If the skeleton is changed, the banner should be changed so that */
/* the altered version can easily be distinguished from the original. */
"char yysccsid[] = \"@(#)yaccpar 1.1 (Berkeley) 12/10/89\";",
"#define yyclearin (yychar=(-1))",
"#define yyerrok (yyerrflag=0)",
"#define YYSTACKSIZE YYMAXDEPTH",
"#define YYSTACKSIZE 300",
"#define yystacksize YYSTACKSIZE",
"short yyss[YYSTACKSIZE];",
"YYSTYPE yyvs[YYSTACKSIZE];",
"#define YYABORT goto yyabort",
"#define YYACCEPT goto yyaccept",
"#define YYERROR goto yyerrlab",
" register int yym, yyn, yystate;",
" extern char *getenv();",
" if (yys = getenv(\"YYDEBUG\"))",
" else if (yyn >= '1' && yyn <= '9')",
" *yyssp = yystate = 0;",
" if (yyn = yydefred[yystate]) goto yyreduce;",
" if ((yychar = yylex()) < 0) yychar = 0;",
" if (yychar <= YYMAXTOKEN) yys = yyname[yychar];",
" if (!yys) yys = \"illegal-symbol\";",
" printf(\"yydebug: state %d, reading %d (%s)\\n\", yystate,",
" if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&",
" yyn <= YYTABLESIZE && yycheck[yyn] == yychar)",
" printf(\"yydebug: state %d, shifting to state %d\\n\",",
" yystate, yytable[yyn]);",
" if (yyssp >= yyss + yystacksize - 1)",
" *++yyssp = yystate = yytable[yyn];",
" if (yyerrflag > 0) --yyerrflag;",
" if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&",
" yyn <= YYTABLESIZE && yycheck[yyn] == yychar)",
" if (yyerrflag) goto yyinrecovery;",
" yyerror(\"syntax error\");",
" if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&",
" yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)",
" printf(\"yydebug: state %d, error recovery shifting\\",
" to state %d\\n\", *yyssp, yytable[yyn]);",
" if (yyssp >= yyss + yystacksize - 1)",
" *++yyssp = yystate = yytable[yyn];",
" printf(\"yydebug: error recovery discarding state %d\
" if (yyssp <= yyss) goto yyabort;",
" if (yychar == 0) goto yyabort;",
" if (yychar <= YYMAXTOKEN) yys = yyname[yychar];",
" if (!yys) yys = \"illegal-symbol\";",
" printf(\"yydebug: state %d, error recovery discards token %d\
" yystate, yychar, yys);",
" printf(\"yydebug: state %d, reducing by rule %d (%s)\\n\",",
" yystate, yyn, yyrule[yyn]);",
" yyval = yyvsp[1-yym];",
" if (yystate == 0 && yym == 0)",
" printf(\"yydebug: after reduction, shifting from state 0 to\\",
" state %d\\n\", YYFINAL);",
" if ((yychar = yylex()) < 0) yychar = 0;",
" if (yychar <= YYMAXTOKEN) yys = yyname[yychar];",
" if (!yys) yys = \"illegal-symbol\";",
" printf(\"yydebug: state %d, reading %d (%s)\\n\",",
" YYFINAL, yychar, yys);",
" if (yychar == 0) goto yyaccept;",
" if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&",
" yyn <= YYTABLESIZE && yycheck[yyn] == yystate)",
" yystate = yytable[yyn];",
" yystate = yydgoto[yym];",
" printf(\"yydebug: after reduction, shifting from state %d \\",
"to state %d\\n\", *yyssp, yystate);",
" if (yyssp >= yyss + yystacksize - 1)",
" yyerror(\"yacc stack overflow\");",
for (i
= 0; section
[i
]; ++i
)
fprintf(output_file
, "%s\n", section
[i
]);