1 *** perly.c.orig Thu Sep 15 11:18:35 1994
2 --- perly.c Thu Sep 15 11:19:31 1994
5 deprecate("\"do\" to call subroutines");
18 - #define FUNCMETH 259
21 - #define PRIVATEREF 262
34 - #define CONTINUE 275
45 - #define DOLSHARP 286
48 - #define HASHBRACK 289
54 - #define ASSIGNOP 295
58 - #define BITANDOP 299
72 30, 0, 5, 3, 6, 6, 6, 7, 7, 7,
83 - short yyss[YYSTACKSIZE];
84 - YYSTYPE yyvs[YYSTACKSIZE];
85 - #define yystacksize YYSTACKSIZE
93 #define YYABORT goto yyabort
94 #define YYACCEPT goto yyaccept
95 #define YYERROR goto yyerrlab
112 + struct ysv* ysave = (struct ysv*)ptr;
113 + if (ysave->yyss) Safefree(ysave->yyss);
114 + if (ysave->yyvs) Safefree(ysave->yyvs);
115 + yydebug = ysave->oldyydebug;
116 + yynerrs = ysave->oldyynerrs;
117 + yyerrflag = ysave->oldyyerrflag;
118 + yychar = ysave->oldyychar;
119 + yyval = ysave->oldyyval;
120 + yylval = ysave->oldyylval;
127 register int yym, yyn, yystate;
128 + register short *yyssp;
129 + register YYSTYPE *yyvsp;
132 + unsigned yystacksize = YYSTACKSIZE;
136 extern char *getenv();
139 + struct ysv *ysave = (struct ysv*)safemalloc(sizeof(struct ysv));
140 + SAVEDESTRUCTOR(yydestruct, ysave);
141 + ysave->oldyydebug = yydebug;
142 + ysave->oldyynerrs = yynerrs;
143 + ysave->oldyyerrflag = yyerrflag;
144 + ysave->oldyychar = yychar;
145 + ysave->oldyyval = yyval;
146 + ysave->oldyylval = yylval;
149 if (yys = getenv("YYDEBUG"))
159 + ** Initialize private stacks (yyparse may be called from an action)
161 + ysave->yyss = yyss = (short*)safemalloc(yystacksize*sizeof(short));
162 + ysave->yyvs = yyvs = (YYSTYPE*)safemalloc(yystacksize*sizeof(YYSTYPE));
163 + if (!yyvs || !yyss)
168 *yyssp = yystate = 0;
172 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
173 if (!yys) yys = "illegal-symbol";
174 ! printf("yydebug: state %d, reading %d (%s)\n", yystate,
180 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
181 if (!yys) yys = "illegal-symbol";
182 ! fprintf(stderr, "yydebug: state %d, reading %d (%s)\n", yystate,
191 ! printf("yydebug: state %d, shifting to state %d\n",
192 yystate, yytable[yyn]);
194 if (yyssp >= yyss + yystacksize - 1)
198 *++yyssp = yystate = yytable[yyn];
204 ! fprintf(stderr, "yydebug: state %d, shifting to state %d\n",
205 yystate, yytable[yyn]);
207 if (yyssp >= yyss + yystacksize - 1)
210 ! ** reallocate and recover. Note that pointers
211 ! ** have to be reset, or bad things will happen
213 ! int yyps_index = (yyssp - yyss);
214 ! int yypv_index = (yyvsp - yyvs);
215 ! yystacksize += YYSTACKSIZE;
216 ! ysave->yyvs = yyvs =
217 ! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
218 ! ysave->yyss = yyss =
219 ! (short*)realloc((char*)yyss,yystacksize * sizeof(short));
220 ! if (!yyvs || !yyss)
222 ! yyssp = yyss + yyps_index;
223 ! yyvsp = yyvs + yypv_index;
225 *++yyssp = yystate = yytable[yyn];
232 ! printf("yydebug: state %d, error recovery shifting\
233 ! to state %d\n", *yyssp, yytable[yyn]);
235 if (yyssp >= yyss + yystacksize - 1)
239 *++yyssp = yystate = yytable[yyn];
246 ! "yydebug: state %d, error recovery shifting to state %d\n",
247 ! *yyssp, yytable[yyn]);
249 if (yyssp >= yyss + yystacksize - 1)
252 ! ** reallocate and recover. Note that pointers
253 ! ** have to be reset, or bad things will happen
255 ! int yyps_index = (yyssp - yyss);
256 ! int yypv_index = (yyvsp - yyvs);
257 ! yystacksize += YYSTACKSIZE;
258 ! ysave->yyvs = yyvs = (YYSTYPE*)realloc((char*)yyvs,
259 ! yystacksize * sizeof(YYSTYPE));
260 ! ysave->yyss = yyss = (short*)realloc((char*)yyss,
261 ! yystacksize * sizeof(short));
262 ! if (!yyvs || !yyss)
264 ! yyssp = yyss + yyps_index;
265 ! yyvsp = yyvs + yypv_index;
267 *++yyssp = yystate = yytable[yyn];
274 ! printf("yydebug: error recovery discarding state %d\n",
277 if (yyssp <= yyss) goto yyabort;
284 ! "yydebug: error recovery discarding state %d\n",
287 if (yyssp <= yyss) goto yyabort;
292 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
293 if (!yys) yys = "illegal-symbol";
294 ! printf("yydebug: state %d, error recovery discards token %d (%s)\n",
295 ! yystate, yychar, yys);
301 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
302 if (!yys) yys = "illegal-symbol";
304 ! "yydebug: state %d, error recovery discards token %d (%s)\n",
305 ! yystate, yychar, yys);
314 ! printf("yydebug: state %d, reducing by rule %d (%s)\n",
315 yystate, yyn, yyrule[yyn]);
322 ! fprintf(stderr, "yydebug: state %d, reducing by rule %d (%s)\n",
323 yystate, yyn, yyrule[yyn]);
331 ! printf("yydebug: after reduction, shifting from state 0 to\
332 ! state %d\n", YYFINAL);
341 ! "yydebug: after reduction, shifting from state 0 to state %d\n",
349 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
350 if (!yys) yys = "illegal-symbol";
351 ! printf("yydebug: state %d, reading %d (%s)\n",
352 YYFINAL, yychar, yys);
357 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
358 if (!yys) yys = "illegal-symbol";
359 ! fprintf(stderr, "yydebug: state %d, reading %d (%s)\n",
360 YYFINAL, yychar, yys);
365 yystate = yydgoto[yym];
368 ! printf("yydebug: after reduction, shifting from state %d \
369 ! to state %d\n", *yyssp, yystate);
371 if (yyssp >= yyss + yystacksize - 1)
379 ! yyerror("yacc stack overflow");
386 yystate = yydgoto[yym];
390 ! "yydebug: after reduction, shifting from state %d to state %d\n",
393 if (yyssp >= yyss + yystacksize - 1)
396 ! ** reallocate and recover. Note that pointers
397 ! ** have to be reset, or bad things will happen
399 ! int yyps_index = (yyssp - yyss);
400 ! int yypv_index = (yyvsp - yyvs);
401 ! yystacksize += YYSTACKSIZE;
402 ! ysave->yyvs = yyvs =
403 ! (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
404 ! ysave->yyss = yyss =
405 ! (short*)realloc((char*)yyss,yystacksize * sizeof(short));
406 ! if (!yyvs || !yyss)
408 ! yyssp = yyss + yyps_index;
409 ! yyvsp = yyvs + yypv_index;
415 ! yyerror("Out of memory for yacc stack");