1 *** perly.c.orig Wed Feb 14 15:29:04 1996
2 --- perly.c Wed Feb 14 15:29:05 1996
5 deprecate("\"do\" to call subroutines");
18 - #define FUNCMETH 259
21 - #define PRIVATEREF 262
22 - #define FUNC0SUB 263
23 - #define UNIOPSUB 264
24 - #define LSTOPSUB 265
37 - #define CONTINUE 278
48 - #define DOLSHARP 289
51 - #define HASHBRACK 292
57 - #define ASSIGNOP 298
61 - #define BITANDOP 302
75 31, 0, 5, 3, 6, 6, 6, 7, 7, 7,
86 - short yyss[YYSTACKSIZE];
87 - YYSTYPE yyvs[YYSTACKSIZE];
88 - #define yystacksize YYSTACKSIZE
96 #define YYABORT goto yyabort
97 #define YYACCEPT goto yyaccept
98 #define YYERROR goto yyerrlab
115 + struct ysv* ysave = (struct ysv*)ptr;
116 + if (ysave->yyss) Safefree(ysave->yyss);
117 + if (ysave->yyvs) Safefree(ysave->yyvs);
118 + yydebug = ysave->oldyydebug;
119 + yynerrs = ysave->oldyynerrs;
120 + yyerrflag = ysave->oldyyerrflag;
121 + yychar = ysave->oldyychar;
122 + yyval = ysave->oldyyval;
123 + yylval = ysave->oldyylval;
130 register int yym, yyn, yystate;
131 + register short *yyssp;
132 + register YYSTYPE *yyvsp;
135 + unsigned yystacksize = YYSTACKSIZE;
139 extern char *getenv();
142 + struct ysv *ysave = (struct ysv*)safemalloc(sizeof(struct ysv));
143 + SAVEDESTRUCTOR(yydestruct, ysave);
144 + ysave->oldyydebug = yydebug;
145 + ysave->oldyynerrs = yynerrs;
146 + ysave->oldyyerrflag = yyerrflag;
147 + ysave->oldyychar = yychar;
148 + ysave->oldyyval = yyval;
149 + ysave->oldyylval = yylval;
152 if (yys = getenv("YYDEBUG"))
162 + ** Initialize private stacks (yyparse may be called from an action)
164 + ysave->yyss = yyss = (short*)safemalloc(yystacksize*sizeof(short));
165 + ysave->yyvs = yyvs = (YYSTYPE*)safemalloc(yystacksize*sizeof(YYSTYPE));
166 + if (!yyvs || !yyss)
171 *yyssp = yystate = 0;
175 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
176 if (!yys) yys = "illegal-symbol";
177 ! printf("yydebug: state %d, reading %d (%s)\n", yystate,
183 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
184 if (!yys) yys = "illegal-symbol";
185 ! fprintf(stderr, "yydebug: state %d, reading %d (%s)\n", yystate,
194 ! printf("yydebug: state %d, shifting to state %d\n",
195 yystate, yytable[yyn]);
197 if (yyssp >= yyss + yystacksize - 1)
201 *++yyssp = yystate = yytable[yyn];
207 ! fprintf(stderr, "yydebug: state %d, shifting to state %d\n",
208 yystate, yytable[yyn]);
210 if (yyssp >= yyss + yystacksize - 1)
213 ! ** reallocate and recover. Note that pointers
214 ! ** have to be reset, or bad things will happen
216 ! int yyps_index = (yyssp - yyss);
217 ! int yypv_index = (yyvsp - yyvs);
218 ! yystacksize += YYSTACKSIZE;
219 ! ysave->yyvs = yyvs =
220 ! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
221 ! ysave->yyss = yyss =
222 ! (short*)realloc((char*)yyss,yystacksize * sizeof(short));
223 ! if (!yyvs || !yyss)
225 ! yyssp = yyss + yyps_index;
226 ! yyvsp = yyvs + yypv_index;
228 *++yyssp = yystate = yytable[yyn];
235 ! printf("yydebug: state %d, error recovery shifting\
236 ! to state %d\n", *yyssp, yytable[yyn]);
238 if (yyssp >= yyss + yystacksize - 1)
242 *++yyssp = yystate = yytable[yyn];
249 ! "yydebug: state %d, error recovery shifting to state %d\n",
250 ! *yyssp, yytable[yyn]);
252 if (yyssp >= yyss + yystacksize - 1)
255 ! ** reallocate and recover. Note that pointers
256 ! ** have to be reset, or bad things will happen
258 ! int yyps_index = (yyssp - yyss);
259 ! int yypv_index = (yyvsp - yyvs);
260 ! yystacksize += YYSTACKSIZE;
261 ! ysave->yyvs = yyvs = (YYSTYPE*)realloc((char*)yyvs,
262 ! yystacksize * sizeof(YYSTYPE));
263 ! ysave->yyss = yyss = (short*)realloc((char*)yyss,
264 ! yystacksize * sizeof(short));
265 ! if (!yyvs || !yyss)
267 ! yyssp = yyss + yyps_index;
268 ! yyvsp = yyvs + yypv_index;
270 *++yyssp = yystate = yytable[yyn];
277 ! printf("yydebug: error recovery discarding state %d\n",
280 if (yyssp <= yyss) goto yyabort;
287 ! "yydebug: error recovery discarding state %d\n",
290 if (yyssp <= yyss) goto yyabort;
295 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
296 if (!yys) yys = "illegal-symbol";
297 ! printf("yydebug: state %d, error recovery discards token %d (%s)\n",
298 ! yystate, yychar, yys);
304 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
305 if (!yys) yys = "illegal-symbol";
307 ! "yydebug: state %d, error recovery discards token %d (%s)\n",
308 ! yystate, yychar, yys);
317 ! printf("yydebug: state %d, reducing by rule %d (%s)\n",
318 yystate, yyn, yyrule[yyn]);
325 ! fprintf(stderr, "yydebug: state %d, reducing by rule %d (%s)\n",
326 yystate, yyn, yyrule[yyn]);
334 ! printf("yydebug: after reduction, shifting from state 0 to\
335 ! state %d\n", YYFINAL);
344 ! "yydebug: after reduction, shifting from state 0 to state %d\n",
352 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
353 if (!yys) yys = "illegal-symbol";
354 ! printf("yydebug: state %d, reading %d (%s)\n",
355 YYFINAL, yychar, yys);
360 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
361 if (!yys) yys = "illegal-symbol";
362 ! fprintf(stderr, "yydebug: state %d, reading %d (%s)\n",
363 YYFINAL, yychar, yys);
368 yystate = yydgoto[yym];
371 ! printf("yydebug: after reduction, shifting from state %d \
372 ! to state %d\n", *yyssp, yystate);
374 if (yyssp >= yyss + yystacksize - 1)
382 ! yyerror("yacc stack overflow");
389 yystate = yydgoto[yym];
393 ! "yydebug: after reduction, shifting from state %d to state %d\n",
396 if (yyssp >= yyss + yystacksize - 1)
399 ! ** reallocate and recover. Note that pointers
400 ! ** have to be reset, or bad things will happen
402 ! int yyps_index = (yyssp - yyss);
403 ! int yypv_index = (yyvsp - yyvs);
404 ! yystacksize += YYSTACKSIZE;
405 ! ysave->yyvs = yyvs =
406 ! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
407 ! ysave->yyss = yyss =
408 ! (short*)realloc((char*)yyss,yystacksize * sizeof(short));
409 ! if (!yyvs || !yyss)
411 ! yyssp = yyss + yyps_index;
412 ! yyvsp = yyvs + yypv_index;
418 ! yyerror("Out of memory for yacc stack");