24 "#define yyclearin (yychar=(-1))",
25 "#define yyerrok (yyerrflag=0)",
26 "#define YYRECOVERING (yyerrflag!=0)",
27 "static int yyparse(void);",
34 "static short yylhs[];",
35 "static short yylen[];",
36 "static short yydefred[];",
37 "static short yydgoto[];",
38 "static short yysindex[];",
39 "static short yyrindex[];",
40 "static short yygindex[];",
41 "static short yytable[];",
42 "static short yycheck[];",
44 "static char *yyname[];",
45 "static char *yyrule[];",
55 "#define YYMAXDEPTH YYSTACKSIZE",
58 "#define YYSTACKSIZE YYMAXDEPTH",
60 "#define YYSTACKSIZE 500",
61 "#define YYMAXDEPTH 500",
65 "static int yydebug;",
67 "static int yynerrs;",
68 "static int yyerrflag;",
70 "static short *yyssp;",
71 "static YYSTYPE *yyvsp;",
72 "static YYSTYPE yyval;",
73 "static YYSTYPE yylval;",
74 "static short yyss[YYSTACKSIZE];",
75 "static YYSTYPE yyvs[YYSTACKSIZE];",
76 "#define yystacksize YYSTACKSIZE",
83 "#define YYABORT goto yyabort",
84 "#define YYREJECT goto yyabort",
85 "#define YYACCEPT goto yyaccept",
86 "#define YYERROR goto yyerrlab",
90 " int yym, yyn, yystate;",
93 " extern char *getenv();",
95 " if ((yys = getenv(\"YYDEBUG\")))",
98 " if (yyn >= '0' && yyn <= '9')",
99 " yydebug = yyn - '0';",
109 " *yyssp = yystate = 0;",
112 " if ((yyn = yydefred[yystate])) goto yyreduce;",
115 " if ((yychar = yylex()) < 0) yychar = 0;",
120 " if (yychar <= YYMAXTOKEN) yys = yyname[yychar];",
121 " if (!yys) yys = \"illegal-symbol\";",
122 " printf(\"%sdebug: state %d, reading %d (%s)\\n\",",
123 " YYPREFIX, yystate, yychar, yys);",
127 " if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&",
128 " yyn <= YYTABLESIZE && yycheck[yyn] == yychar)",
132 " printf(\"%sdebug: state %d, shifting to state %d\\n\",",
133 " YYPREFIX, yystate, yytable[yyn]);",
135 " if (yyssp >= yyss + yystacksize - 1)",
139 " *++yyssp = yystate = yytable[yyn];",
140 " *++yyvsp = yylval;",
142 " if (yyerrflag > 0) --yyerrflag;",
145 " if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&",
146 " yyn <= YYTABLESIZE && yycheck[yyn] == yychar)",
148 " yyn = yytable[yyn];",
151 " if (yyerrflag) goto yyinrecovery;",
152 " yyerror(\"syntax error\");",
155 " if (yyerrflag < 3)",
160 " if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&",
161 " yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)",
165 " printf(\"%sdebug: state %d, error recovery shifting\\",
166 " to state %d\\n\", YYPREFIX, *yyssp, yytable[yyn]);",
168 " if (yyssp >= yyss + yystacksize - 1)",
172 " *++yyssp = yystate = yytable[yyn];",
173 " *++yyvsp = yylval;",
180 " printf(\"%sdebug: error recovery discarding state %d\ 182 " YYPREFIX, *yyssp);",
184 " if (yyssp <= yyss) goto yyabort;",
192 " if (yychar == 0) goto yyabort;",
197 " if (yychar <= YYMAXTOKEN) yys = yyname[yychar];",
198 " if (!yys) yys = \"illegal-symbol\";",
199 " printf(\"%sdebug: state %d, error recovery discards token %d\ 201 " YYPREFIX, yystate, yychar, yys);",
210 " printf(\"%sdebug: state %d, reducing by rule %d (%s)\\n\",",
211 " YYPREFIX, yystate, yyn, yyrule[yyn]);",
213 " yym = yylen[yyn];",
214 " yyval = yyvsp[1-yym];",
225 " yystate = *yyssp;",
227 " yym = yylhs[yyn];",
228 " if (yystate == 0 && yym == 0)",
232 " printf(\"%sdebug: after reduction, shifting from state 0 to\\",
233 " state %d\\n\", YYPREFIX, YYFINAL);",
235 " yystate = YYFINAL;",
236 " *++yyssp = YYFINAL;",
237 " *++yyvsp = yyval;",
240 " if ((yychar = yylex()) < 0) yychar = 0;",
245 " if (yychar <= YYMAXTOKEN) yys = yyname[yychar];",
246 " if (!yys) yys = \"illegal-symbol\";",
247 " printf(\"%sdebug: state %d, reading %d (%s)\\n\",",
248 " YYPREFIX, YYFINAL, yychar, yys);",
252 " if (yychar == 0) goto yyaccept;",
255 " if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&",
256 " yyn <= YYTABLESIZE && yycheck[yyn] == yystate)",
257 " yystate = yytable[yyn];",
259 " yystate = yydgoto[yym];",
262 " printf(\"%sdebug: after reduction, shifting from state %d \\",
263 "to state %d\\n\", YYPREFIX, *yyssp, yystate);",
265 " if (yyssp >= yyss + yystacksize - 1)",
269 " *++yyssp = yystate;",
270 " *++yyvsp = yyval;",
273 " yyerror(\"yacc stack overflow\");",
292 for (i = 0; (s = section[
i]); ++
i)
void write_section(char *section[])