2 *** perly.c.orig Sun Mar 1 21:44:24 1998
3 --- perly.c Sun Mar 1 21:46:32 1998
18 ! #define FUNCMETH 259
21 ! #define PRIVATEREF 262
22 ! #define FUNC0SUB 263
23 ! #define UNIOPSUB 264
24 ! #define LSTOPSUB 265
37 ! #define CONTINUE 278
50 ! #define DOLSHARP 291
52 ! #define HASHBRACK 293
59 ! #define ASSIGNOP 300
63 ! #define BITANDOP 304
90 - short yyss[YYSTACKSIZE];
91 - YYSTYPE yyvs[YYSTACKSIZE];
92 - #define yystacksize YYSTACKSIZE
98 #define YYACCEPT goto yyaccept
99 #define YYERROR goto yyerrlab
103 register int yym, yyn, yystate;
106 extern char *getenv();
108 if (yys = getenv("YYDEBUG"))
111 #define YYACCEPT goto yyaccept
112 #define YYERROR goto yyerrlab
126 + yydestruct(void *ptr)
128 + struct ysv* ysave = (struct ysv*)ptr;
129 + if (ysave->yyss) Safefree(ysave->yyss);
130 + if (ysave->yyvs) Safefree(ysave->yyvs);
131 + yydebug = ysave->oldyydebug;
132 + yynerrs = ysave->oldyynerrs;
133 + yyerrflag = ysave->oldyyerrflag;
134 + yychar = ysave->oldyychar;
135 + yyval = ysave->oldyyval;
136 + yylval = ysave->oldyylval;
143 register int yym, yyn, yystate;
144 + register short *yyssp;
145 + register YYSTYPE *yyvsp;
148 + unsigned yystacksize = YYSTACKSIZE;
152 + #ifndef __cplusplus
153 extern char *getenv();
158 + New(73, ysave, 1, struct ysv);
159 + SAVEDESTRUCTOR(yydestruct, ysave);
160 + ysave->oldyydebug = yydebug;
161 + ysave->oldyynerrs = yynerrs;
162 + ysave->oldyyerrflag = yyerrflag;
163 + ysave->oldyychar = yychar;
164 + ysave->oldyyval = yyval;
165 + ysave->oldyylval = yylval;
168 if (yys = getenv("YYDEBUG"))
176 + ** Initialize private stacks (yyparse may be called from an action)
178 + New(73, yyss, yystacksize, short);
179 + New(73, yyvs, yystacksize, YYSTYPE);
180 + ysave->yyss = yyss;
181 + ysave->yyvs = yyvs;
182 + if (!yyvs || !yyss)
189 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
190 if (!yys) yys = "illegal-symbol";
191 ! printf("yydebug: state %d, reading %d (%s)\n", yystate,
195 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
196 if (!yys) yys = "illegal-symbol";
197 ! fprintf(stderr, "yydebug: state %d, reading %d (%s)\n", yystate,
204 ! printf("yydebug: state %d, shifting to state %d\n",
205 yystate, yytable[yyn]);
207 if (yyssp >= yyss + yystacksize - 1)
211 *++yyssp = yystate = yytable[yyn];
215 ! fprintf(stderr, "yydebug: state %d, shifting to state %d\n",
216 yystate, yytable[yyn]);
218 if (yyssp >= yyss + yystacksize - 1)
221 ! ** reallocate and recover. Note that pointers
222 ! ** have to be reset, or bad things will happen
224 ! int yyps_index = (yyssp - yyss);
225 ! int yypv_index = (yyvsp - yyvs);
226 ! yystacksize += YYSTACKSIZE;
227 ! ysave->yyvs = yyvs =
228 ! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
229 ! ysave->yyss = yyss =
230 ! (short*)realloc((char*)yyss,yystacksize * sizeof(short));
231 ! if (!yyvs || !yyss)
233 ! yyssp = yyss + yyps_index;
234 ! yyvsp = yyvs + yypv_index;
236 *++yyssp = yystate = yytable[yyn];
241 ! printf("yydebug: state %d, error recovery shifting\
242 ! to state %d\n", *yyssp, yytable[yyn]);
244 if (yyssp >= yyss + yystacksize - 1)
248 *++yyssp = yystate = yytable[yyn];
253 ! "yydebug: state %d, error recovery shifting to state %d\n",
254 ! *yyssp, yytable[yyn]);
256 if (yyssp >= yyss + yystacksize - 1)
259 ! ** reallocate and recover. Note that pointers
260 ! ** have to be reset, or bad things will happen
262 ! int yyps_index = (yyssp - yyss);
263 ! int yypv_index = (yyvsp - yyvs);
264 ! yystacksize += YYSTACKSIZE;
265 ! ysave->yyvs = yyvs = (YYSTYPE*)realloc((char*)yyvs,
266 ! yystacksize * sizeof(YYSTYPE));
267 ! ysave->yyss = yyss = (short*)realloc((char*)yyss,
268 ! yystacksize * sizeof(short));
269 ! if (!yyvs || !yyss)
271 ! yyssp = yyss + yyps_index;
272 ! yyvsp = yyvs + yypv_index;
274 *++yyssp = yystate = yytable[yyn];
279 ! printf("yydebug: error recovery discarding state %d\n",
282 if (yyssp <= yyss) goto yyabort;
287 ! "yydebug: error recovery discarding state %d\n",
290 if (yyssp <= yyss) goto yyabort;
293 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
294 if (!yys) yys = "illegal-symbol";
295 ! printf("yydebug: state %d, error recovery discards token %d (%s)\n",
296 ! yystate, yychar, yys);
300 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
301 if (!yys) yys = "illegal-symbol";
303 ! "yydebug: state %d, error recovery discards token %d (%s)\n",
304 ! yystate, yychar, yys);
311 ! printf("yydebug: state %d, reducing by rule %d (%s)\n",
312 yystate, yyn, yyrule[yyn]);
317 ! fprintf(stderr, "yydebug: state %d, reducing by rule %d (%s)\n",
318 yystate, yyn, yyrule[yyn]);
324 ! printf("yydebug: after reduction, shifting from state 0 to\
325 ! state %d\n", YYFINAL);
332 ! "yydebug: after reduction, shifting from state 0 to state %d\n",
338 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
339 if (!yys) yys = "illegal-symbol";
340 ! printf("yydebug: state %d, reading %d (%s)\n",
341 YYFINAL, yychar, yys);
344 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
345 if (!yys) yys = "illegal-symbol";
346 ! fprintf(stderr, "yydebug: state %d, reading %d (%s)\n",
347 YYFINAL, yychar, yys);
353 ! printf("yydebug: after reduction, shifting from state %d \
354 ! to state %d\n", *yyssp, yystate);
356 if (yyssp >= yyss + yystacksize - 1)
365 ! "yydebug: after reduction, shifting from state %d to state %d\n",
368 if (yyssp >= yyss + yystacksize - 1)
371 ! ** reallocate and recover. Note that pointers
372 ! ** have to be reset, or bad things will happen
374 ! int yyps_index = (yyssp - yyss);
375 ! int yypv_index = (yyvsp - yyvs);
376 ! yystacksize += YYSTACKSIZE;
377 ! ysave->yyvs = yyvs =
378 ! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
379 ! ysave->yyss = yyss =
380 ! (short*)realloc((char*)yyss,yystacksize * sizeof(short));
381 ! if (!yyvs || !yyss)
383 ! yyssp = yyss + yyps_index;
384 ! yyvsp = yyvs + yypv_index;
391 ! yyerror("yacc stack overflow");
400 ! yyerror("Out of memory for yacc stack");