16 - #define FUNCMETH 259
19 - #define PRIVATEREF 262
20 - #define FUNC0SUB 263
21 - #define UNIOPSUB 264
22 - #define LSTOPSUB 265
35 - #define CONTINUE 278
46 - #define DOLSHARP 289
48 - #define HASHBRACK 291
56 - #define ASSIGNOP 299
60 - #define BITANDOP 303
83 - short yyss[YYSTACKSIZE];
84 - YYSTYPE yyvs[YYSTACKSIZE];
85 - #define yystacksize YYSTACKSIZE
92 #define YYACCEPT goto yyaccept
93 #define YYERROR goto yyerrlab
110 + struct ysv* ysave = (struct ysv*)ptr;
111 + if (ysave->yyss) Safefree(ysave->yyss);
112 + if (ysave->yyvs) Safefree(ysave->yyvs);
113 + yydebug = ysave->oldyydebug;
114 + yynerrs = ysave->oldyynerrs;
115 + yyerrflag = ysave->oldyyerrflag;
116 + yychar = ysave->oldyychar;
117 + yyval = ysave->oldyyval;
118 + yylval = ysave->oldyylval;
125 register int yym, yyn, yystate;
126 + register short *yyssp;
127 + register YYSTYPE *yyvsp;
130 + unsigned yystacksize = YYSTACKSIZE;
134 extern char *getenv();
137 + struct ysv *ysave = (struct ysv*)safemalloc(sizeof(struct ysv));
138 + SAVEDESTRUCTOR(yydestruct, ysave);
139 + ysave->oldyydebug = yydebug;
140 + ysave->oldyynerrs = yynerrs;
141 + ysave->oldyyerrflag = yyerrflag;
142 + ysave->oldyychar = yychar;
143 + ysave->oldyyval = yyval;
144 + ysave->oldyylval = yylval;
147 if (yys = getenv("YYDEBUG"))
155 + ** Initialize private stacks (yyparse may be called from an action)
157 + ysave->yyss = yyss = (short*)safemalloc(yystacksize*sizeof(short));
158 + ysave->yyvs = yyvs = (YYSTYPE*)safemalloc(yystacksize*sizeof(YYSTYPE));
159 + if (!yyvs || !yyss)
166 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
167 if (!yys) yys = "illegal-symbol";
168 ! printf("yydebug: state %d, reading %d (%s)\n", yystate,
172 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
173 if (!yys) yys = "illegal-symbol";
174 ! fprintf(stderr, "yydebug: state %d, reading %d (%s)\n", yystate,
181 ! printf("yydebug: state %d, shifting to state %d\n",
182 yystate, yytable[yyn]);
184 if (yyssp >= yyss + yystacksize - 1)
188 *++yyssp = yystate = yytable[yyn];
192 ! fprintf(stderr, "yydebug: state %d, shifting to state %d\n",
193 yystate, yytable[yyn]);
195 if (yyssp >= yyss + yystacksize - 1)
198 ! ** reallocate and recover. Note that pointers
199 ! ** have to be reset, or bad things will happen
201 ! int yyps_index = (yyssp - yyss);
202 ! int yypv_index = (yyvsp - yyvs);
203 ! yystacksize += YYSTACKSIZE;
204 ! ysave->yyvs = yyvs =
205 ! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
206 ! ysave->yyss = yyss =
207 ! (short*)realloc((char*)yyss,yystacksize * sizeof(short));
208 ! if (!yyvs || !yyss)
210 ! yyssp = yyss + yyps_index;
211 ! yyvsp = yyvs + yypv_index;
213 *++yyssp = yystate = yytable[yyn];
218 ! printf("yydebug: state %d, error recovery shifting\
219 ! to state %d\n", *yyssp, yytable[yyn]);
221 if (yyssp >= yyss + yystacksize - 1)
225 *++yyssp = yystate = yytable[yyn];
230 ! "yydebug: state %d, error recovery shifting to state %d\n",
231 ! *yyssp, yytable[yyn]);
233 if (yyssp >= yyss + yystacksize - 1)
236 ! ** reallocate and recover. Note that pointers
237 ! ** have to be reset, or bad things will happen
239 ! int yyps_index = (yyssp - yyss);
240 ! int yypv_index = (yyvsp - yyvs);
241 ! yystacksize += YYSTACKSIZE;
242 ! ysave->yyvs = yyvs = (YYSTYPE*)realloc((char*)yyvs,
243 ! yystacksize * sizeof(YYSTYPE));
244 ! ysave->yyss = yyss = (short*)realloc((char*)yyss,
245 ! yystacksize * sizeof(short));
246 ! if (!yyvs || !yyss)
248 ! yyssp = yyss + yyps_index;
249 ! yyvsp = yyvs + yypv_index;
251 *++yyssp = yystate = yytable[yyn];
256 ! printf("yydebug: error recovery discarding state %d\n",
259 if (yyssp <= yyss) goto yyabort;
264 ! "yydebug: error recovery discarding state %d\n",
267 if (yyssp <= yyss) goto yyabort;
270 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
271 if (!yys) yys = "illegal-symbol";
272 ! printf("yydebug: state %d, error recovery discards token %d (%s)\n",
273 ! yystate, yychar, yys);
277 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
278 if (!yys) yys = "illegal-symbol";
280 ! "yydebug: state %d, error recovery discards token %d (%s)\n",
281 ! yystate, yychar, yys);
288 ! printf("yydebug: state %d, reducing by rule %d (%s)\n",
289 yystate, yyn, yyrule[yyn]);
294 ! fprintf(stderr, "yydebug: state %d, reducing by rule %d (%s)\n",
295 yystate, yyn, yyrule[yyn]);
301 ! printf("yydebug: after reduction, shifting from state 0 to\
302 ! state %d\n", YYFINAL);
309 ! "yydebug: after reduction, shifting from state 0 to state %d\n",
315 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
316 if (!yys) yys = "illegal-symbol";
317 ! printf("yydebug: state %d, reading %d (%s)\n",
318 YYFINAL, yychar, yys);
321 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
322 if (!yys) yys = "illegal-symbol";
323 ! fprintf(stderr, "yydebug: state %d, reading %d (%s)\n",
324 YYFINAL, yychar, yys);
330 ! printf("yydebug: after reduction, shifting from state %d \
331 ! to state %d\n", *yyssp, yystate);
333 if (yyssp >= yyss + yystacksize - 1)
342 ! "yydebug: after reduction, shifting from state %d to state %d\n",
345 if (yyssp >= yyss + yystacksize - 1)
348 ! ** reallocate and recover. Note that pointers
349 ! ** have to be reset, or bad things will happen
351 ! int yyps_index = (yyssp - yyss);
352 ! int yypv_index = (yyvsp - yyvs);
353 ! yystacksize += YYSTACKSIZE;
354 ! ysave->yyvs = yyvs =
355 ! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
356 ! ysave->yyss = yyss =
357 ! (short*)realloc((char*)yyss,yystacksize * sizeof(short));
358 ! if (!yyvs || !yyss)
360 ! yyssp = yyss + yyps_index;
361 ! yyvsp = yyvs + yypv_index;
368 ! yyerror("yacc stack overflow");
377 ! yyerror("Out of memory for yacc stack");