1 *** perly.c.orig Tue Mar 26 01:38:52 2002
2 --- perly.c Tue Mar 26 01:38:54 2002
6 ! static char yysccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/91";
12 ! /* static char yysccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/91"; */
21 ! #define dep() deprecate("\"do\" to call subroutines")
23 /* stuff included here to make perly_c.diff apply better */
29 ! #define dep() deprecate_old("\"do\" to call subroutines")
31 /* stuff included here to make perly_c.diff apply better */
41 ! #define FUNCMETH 259
44 ! #define PRIVATEREF 262
45 ! #define FUNC0SUB 263
46 ! #define UNIOPSUB 264
47 ! #define LSTOPSUB 265
60 ! #define CONTINUE 278
73 ! #define DOLSHARP 291
75 ! #define HASHBRACK 293
80 ! #define COLONATTR 298
81 ! #define PREC_LOW 299
85 ! #define ASSIGNOP 303
89 ! #define BITANDOP 307
100 #define YYERRCODE 256
101 ! short yylhs[] = { -1,
102 0, 9, 7, 6, 10, 8, 11, 11, 11, 12,
103 12, 12, 12, 25, 25, 25, 25, 25, 25, 25,
104 15, 15, 15, 14, 14, 43, 43, 13, 13, 13,
106 #define yylex yylex_r
110 #define YYERRCODE 256
111 ! static short yylhs[] = { -1,
112 0, 9, 7, 6, 10, 8, 11, 11, 11, 12,
113 12, 12, 12, 25, 25, 25, 25, 25, 25, 25,
114 15, 15, 15, 14, 14, 43, 43, 13, 13, 13,
117 49, 34, 34, 35, 35, 35, 44, 24, 19, 20,
118 21, 22, 23, 36, 36, 36, 36,
120 ! short yylen[] = { 2,
121 2, 4, 0, 0, 4, 0, 0, 2, 2, 2,
122 1, 2, 3, 1, 1, 3, 3, 3, 3, 3,
123 0, 2, 6, 7, 7, 0, 2, 8, 8, 10,
125 49, 34, 34, 35, 35, 35, 44, 24, 19, 20,
126 21, 22, 23, 36, 36, 36, 36,
128 ! static short yylen[] = { 2,
129 2, 4, 0, 0, 4, 0, 0, 2, 2, 2,
130 1, 2, 3, 1, 1, 3, 3, 3, 3, 3,
131 0, 2, 6, 7, 7, 0, 2, 8, 8, 10,
134 1, 0, 1, 0, 1, 2, 1, 2, 2, 2,
137 ! short yydefred[] = { 4,
138 0, 7, 0, 45, 58, 56, 0, 56, 56, 8,
139 46, 9, 11, 48, 0, 47, 49, 50, 0, 0,
140 0, 70, 71, 0, 14, 3, 173, 0, 0, 154,
142 1, 0, 1, 0, 1, 2, 1, 2, 2, 2,
145 ! static short yydefred[] = { 4,
146 0, 7, 0, 45, 58, 56, 0, 56, 56, 8,
147 46, 9, 11, 48, 0, 47, 49, 50, 0, 0,
148 0, 70, 71, 0, 14, 3, 173, 0, 0, 154,
151 0, 22, 0, 0, 0, 31, 5, 0, 30, 0,
154 ! short yydgoto[] = { 1,
155 10, 11, 20, 104, 19, 2, 95, 370, 98, 359,
156 3, 12, 13, 70, 375, 285, 72, 73, 74, 75,
157 76, 77, 78, 79, 291, 81, 292, 281, 283, 286,
159 0, 22, 0, 0, 0, 31, 5, 0, 30, 0,
162 ! static short yydgoto[] = { 1,
163 10, 11, 20, 104, 19, 2, 95, 370, 98, 359,
164 3, 12, 13, 70, 375, 285, 72, 73, 74, 75,
165 76, 77, 78, 79, 291, 81, 292, 281, 283, 286,
168 194, 327, 156, 289, 271, 225, 14, 83, 137, 84,
169 85, 86, 87, 15, 16, 17, 18, 93, 278,
171 ! short yysindex[] = { 0,
172 0, 0, -132, 0, 0, 0, -51, 0, 0, 0,
173 0, 0, 0, 0, 650, 0, 0, 0, -239, -215,
174 5, 0, 0, -215, 0, 0, 0, -31, -31, 0,
176 194, 327, 156, 289, 271, 225, 14, 83, 137, 84,
177 85, 86, 87, 15, 16, 17, 18, 93, 278,
179 ! static short yysindex[] = { 0,
180 0, 0, -132, 0, 0, 0, -51, 0, 0, 0,
181 0, 0, 0, 0, 650, 0, 0, 0, -239, -215,
182 5, 0, 0, -215, 0, 0, 0, -31, -31, 0,
185 449, 0, 2181, -150, 340, 0, 0, 355, 0, 216,
188 ! short yyrindex[] = { 0,
189 0, 0, 247, 0, 0, 0, 0, 0, 0, 0,
190 0, 0, 0, 0, 0, 0, 0, 0, 274, 0,
191 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
193 449, 0, 2181, -150, 340, 0, 0, 355, 0, 216,
196 ! static short yyrindex[] = { 0,
197 0, 0, 247, 0, 0, 0, 0, 0, 0, 0,
198 0, 0, 0, 0, 0, 0, 0, 0, 274, 0,
199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
202 917, 0, 0, 119, 0, 0, 0, 0, 0, 0,
205 ! short yygindex[] = { 0,
206 0, 0, 196, 425, 0, 0, -2, 0, 37, 634,
207 -94, 0, 0, 0, -323, -15, 2445, 0, 999, 414,
208 417, 0, 0, 0, 463, -43, 0, 0, 321, -198,
210 917, 0, 0, 119, 0, 0, 0, 0, 0, 0,
213 ! static short yygindex[] = { 0,
214 0, 0, 196, 425, 0, 0, -2, 0, 37, 634,
215 -94, 0, 0, 0, -323, -15, 2445, 0, 999, 414,
216 417, 0, 0, 0, 463, -43, 0, 0, 321, -198,
219 0, 0, 0, 0, 0, 0, 0, 0, 0,
221 #define YYTABLESIZE 4568
222 ! short yytable[] = { 71,
223 197, 65, 121, 227, 65, 111, 220, 22, 198, 293,
224 139, 296, 315, 275, 305, 102, 273, 88, 113, 228,
225 60, 113, 279, 65, 317, 60, 182, 254, 325, 101,
227 0, 0, 0, 0, 0, 0, 0, 0, 0,
229 #define YYTABLESIZE 4568
230 ! static short yytable[] = { 71,
231 197, 65, 121, 227, 65, 111, 220, 22, 198, 293,
232 139, 296, 315, 275, 305, 102, 273, 88, 113, 228,
233 60, 113, 279, 65, 317, 60, 182, 254, 325, 101,
236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
237 0, 0, 0, 0, 0, 0, 77, 77,
239 ! short yycheck[] = { 15,
240 95, 36, 46, 41, 36, 40, 59, 59, 100, 208,
241 54, 41, 59, 199, 41, 40, 196, 257, 41, 93,
242 123, 44, 202, 36, 93, 59, 40, 40, 59, 29,
244 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
245 0, 0, 0, 0, 0, 0, 77, 77,
247 ! static short yycheck[] = { 15,
248 95, 36, 46, 41, 36, 40, 59, 59, 100, 208,
249 54, 41, 59, 199, 41, 40, 196, 257, 41, 93,
250 123, 44, 202, 36, 93, 59, 40, 40, 59, 29,
254 #define YYMAXTOKEN 317
257 "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
258 "'!'",0,0,"'$'","'%'","'&'",0,"'('","')'","'*'","'+'","','","'-'",0,0,0,0,0,0,0,
259 0,0,0,0,0,"':'","';'",0,0,0,"'?'","'@'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
262 #define YYMAXTOKEN 317
264 ! static char *yyname[] = {
265 "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
266 "'!'",0,0,"'$'","'%'","'&'",0,"'('","')'","'*'","'+'","','","'-'",0,0,0,0,0,0,0,
267 0,0,0,0,0,"':'","';'",0,0,0,"'?'","'@'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
270 "ANDAND","BITOROP","BITANDOP","SHIFTOP","MATCHOP","UMINUS","REFGEN","POWOP",
271 "PREINC","PREDEC","POSTINC","POSTDEC","ARROW",
275 "prog : progstart lineseq",
276 "block : '{' remember lineseq '}'",
278 "ANDAND","BITOROP","BITANDOP","SHIFTOP","MATCHOP","UMINUS","REFGEN","POWOP",
279 "PREINC","PREDEC","POSTINC","POSTDEC","ARROW",
281 ! static char *yyrule[] = {
283 "prog : progstart lineseq",
284 "block : '{' remember lineseq '}'",
287 #define YYMAXDEPTH 500
298 - short yyss[YYSTACKSIZE];
299 - YYSTYPE yyvs[YYSTACKSIZE];
300 - #define yystacksize YYSTACKSIZE
308 #define yyparse() Perl_yyparse(pTHX)
310 ! #line 1481 "y.tab.c"
311 #define YYABORT goto yyabort
312 #define YYACCEPT goto yyaccept
313 #define YYERROR goto yyerrlab
316 #define yyparse() Perl_yyparse(pTHX)
318 ! #line 1409 "perly.c"
319 #define YYABORT goto yyabort
320 #define YYACCEPT goto yyaccept
321 #define YYERROR goto yyerrlab
326 register int yym, yyn, yystate;
329 ! extern char *getenv();
331 ! if (yys = getenv("YYDEBUG"))
334 if (yyn >= '0' && yyn <= '9')
338 register int yym, yyn, yystate;
339 + register short *yyssp;
340 + register YYSTYPE *yyvsp;
343 + unsigned yystacksize = YYSTACKSIZE;
350 ! #ifdef USE_ITHREADS
351 ! ENTER; /* force yydestruct() before we return */
353 ! New(73, ysave, 1, struct ysv);
354 ! SAVEDESTRUCTOR_X(yydestruct, ysave);
355 ! ysave->oldyydebug = yydebug;
356 ! ysave->oldyynerrs = yynerrs;
357 ! ysave->oldyyerrflag = yyerrflag;
358 ! ysave->oldyychar = yychar;
359 ! ysave->oldyyval = yyval;
360 ! ysave->oldyylval = yylval;
363 ! if ((yys = getenv("YYDEBUG")))
366 if (yyn >= '0' && yyn <= '9')
374 *yyssp = yystate = 0;
377 ! if (yyn = yydefred[yystate]) goto yyreduce;
380 if ((yychar = yylex()) < 0) yychar = 0;
386 + ** Initialize private stacks (yyparse may be called from an action)
388 + New(73, yyss, yystacksize, short);
389 + New(73, yyvs, yystacksize, YYSTYPE);
390 + ysave->yyss = yyss;
391 + ysave->yyvs = yyvs;
392 + if (!yyvs || !yyss)
397 *yyssp = yystate = 0;
400 ! if ((yyn = yydefred[yystate])) goto yyreduce;
403 if ((yychar = yylex()) < 0) yychar = 0;
407 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
408 if (!yys) yys = "illegal-symbol";
409 ! printf("yydebug: state %d, reading %d (%s)\n", yystate,
415 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
416 if (!yys) yys = "illegal-symbol";
417 ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", yystate,
426 ! printf("yydebug: state %d, shifting to state %d\n",
427 yystate, yytable[yyn]);
429 if (yyssp >= yyss + yystacksize - 1)
433 *++yyssp = yystate = yytable[yyn];
439 ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, shifting to state %d\n",
440 yystate, yytable[yyn]);
442 if (yyssp >= yyss + yystacksize - 1)
445 + ** reallocate and recover. Note that pointers
446 + ** have to be reset, or bad things will happen
448 + int yyps_index = (yyssp - yyss);
449 + int yypv_index = (yyvsp - yyvs);
450 + yystacksize += YYSTACKSIZE;
451 + ysave->yyvs = Renew(yyvs, yystacksize, YYSTYPE);
452 + ysave->yyss = Renew(yyss, yystacksize, short);
453 + if (!yyvs || !yyss)
455 + yyssp = yyss + yyps_index;
456 + yyvsp = yyvs + yypv_index;
458 *++yyssp = yystate = yytable[yyn];
463 if (yyerrflag) goto yyinrecovery;
468 yyerror("syntax error");
478 if (yyerrflag) goto yyinrecovery;
483 yyerror("syntax error");
496 ! printf("yydebug: state %d, error recovery shifting\
497 to state %d\n", *yyssp, yytable[yyn]);
499 if (yyssp >= yyss + yystacksize - 1)
503 *++yyssp = yystate = yytable[yyn];
509 ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, error recovery shifting\
510 to state %d\n", *yyssp, yytable[yyn]);
512 if (yyssp >= yyss + yystacksize - 1)
515 + ** reallocate and recover. Note that pointers
516 + ** have to be reset, or bad things will happen
518 + int yyps_index = (yyssp - yyss);
519 + int yypv_index = (yyvsp - yyvs);
520 + yystacksize += YYSTACKSIZE;
521 + ysave->yyvs = Renew(yyvs, yystacksize, YYSTYPE);
522 + ysave->yyss = Renew(yyss, yystacksize, short);
523 + if (!yyvs || !yyss)
525 + yyssp = yyss + yyps_index;
526 + yyvsp = yyvs + yypv_index;
528 *++yyssp = yystate = yytable[yyn];
535 ! printf("yydebug: error recovery discarding state %d\n",
538 if (yyssp <= yyss) goto yyabort;
543 ! PerlIO_printf(Perl_debug_log, "yydebug: error recovery discarding state %d\n",
546 if (yyssp <= yyss) goto yyabort;
550 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
551 if (!yys) yys = "illegal-symbol";
552 ! printf("yydebug: state %d, error recovery discards token %d (%s)\n",
553 yystate, yychar, yys);
558 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
559 if (!yys) yys = "illegal-symbol";
560 ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, error recovery discards token %d (%s)\n",
561 yystate, yychar, yys);
569 ! printf("yydebug: state %d, reducing by rule %d (%s)\n",
570 yystate, yyn, yyrule[yyn]);
577 ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reducing by rule %d (%s)\n",
578 yystate, yyn, yyrule[yyn]);
584 { yyval.opval = yyvsp[0].opval; }
586 ! #line 2477 "y.tab.c"
592 { yyval.opval = yyvsp[0].opval; }
594 ! #line 2459 "perly.c"
603 ! printf("yydebug: after reduction, shifting from state 0 to\
604 state %d\n", YYFINAL);
611 ! PerlIO_printf(Perl_debug_log, "yydebug: after reduction, shifting from state 0 to\
612 state %d\n", YYFINAL);
618 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
619 if (!yys) yys = "illegal-symbol";
620 ! printf("yydebug: state %d, reading %d (%s)\n",
621 YYFINAL, yychar, yys);
626 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
627 if (!yys) yys = "illegal-symbol";
628 ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n",
629 YYFINAL, yychar, yys);
634 yystate = yydgoto[yym];
637 ! printf("yydebug: after reduction, shifting from state %d \
638 to state %d\n", *yyssp, yystate);
640 if (yyssp >= yyss + yystacksize - 1)
648 ! yyerror("yacc stack overflow");
655 yystate = yydgoto[yym];
658 ! PerlIO_printf(Perl_debug_log, "yydebug: after reduction, shifting from state %d \
659 to state %d\n", *yyssp, yystate);
661 if (yyssp >= yyss + yystacksize - 1)
664 + ** reallocate and recover. Note that pointers
665 + ** have to be reset, or bad things will happen
667 + int yyps_index = (yyssp - yyss);
668 + int yypv_index = (yyvsp - yyvs);
669 + yystacksize += YYSTACKSIZE;
670 + ysave->yyvs = Renew(yyvs, yystacksize, YYSTYPE);
671 + ysave->yyss = Renew(yyss, yystacksize, short);
672 + if (!yyvs || !yyss)
674 + yyssp = yyss + yyps_index;
675 + yyvsp = yyvs + yypv_index;
681 ! yyerror("Out of memory for yacc stack");
685 ! #ifdef USE_ITHREADS
686 ! LEAVE; /* force yydestruct() before we return */
692 ! yydestruct(pTHX_ void *ptr)
694 ! struct ysv* ysave = (struct ysv*)ptr;
695 ! if (ysave->yyss) Safefree(ysave->yyss);
696 ! if (ysave->yyvs) Safefree(ysave->yyvs);
697 ! yydebug = ysave->oldyydebug;
698 ! yynerrs = ysave->oldyynerrs;
699 ! yyerrflag = ysave->oldyyerrflag;
700 ! yychar = ysave->oldyychar;
701 ! yyval = ysave->oldyyval;
702 ! yylval = ysave->oldyylval;