3 { yyval.ival = yyvsp[-1].ival; newPROG(block_end(yyvsp[-1].ival,yyvsp[0].opval)); ;}
8 { if (PL_copline > (line_t)yyvsp[-3].ival)
9 PL_copline = (line_t)yyvsp[-3].ival;
10 yyval.opval = block_end(yyvsp[-2].ival, yyvsp[-1].opval); ;}
15 { yyval.ival = block_start(TRUE); ;}
21 PL_expect = XSTATE; yyval.ival = block_start(TRUE);
27 { if (PL_copline > (line_t)yyvsp[-3].ival)
28 PL_copline = (line_t)yyvsp[-3].ival;
29 yyval.opval = block_end(yyvsp[-2].ival, yyvsp[-1].opval); ;}
34 { yyval.ival = block_start(FALSE); ;}
39 { yyval.ival = PL_savestack_ix; ;}
44 { yyval.opval = Nullop; ;}
49 { yyval.opval = yyvsp[-1].opval; ;}
54 { LEAVE_SCOPE(yyvsp[-1].ival);
55 yyval.opval = append_list(OP_LINESEQ,
56 (LISTOP*)yyvsp[-2].opval, (LISTOP*)yyvsp[0].opval);
57 PL_pad_reset_pending = TRUE;
58 if (yyvsp[-2].opval && yyvsp[0].opval) PL_hints |= HINT_BLOCK_SCOPE; ;}
63 { yyval.opval = newSTATEOP(0, yyvsp[-1].pval, yyvsp[0].opval); ;}
68 { if (yyvsp[-1].pval != Nullch) {
69 yyval.opval = newSTATEOP(0, yyvsp[-1].pval, newOP(OP_NULL, 0));
75 PL_expect = XSTATE; ;}
80 { yyval.opval = newSTATEOP(0, yyvsp[-2].pval, yyvsp[-1].opval);
81 PL_expect = XSTATE; ;}
86 { yyval.opval = Nullop; ;}
91 { yyval.opval = yyvsp[0].opval; ;}
96 { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[0].opval, yyvsp[-2].opval); ;}
101 { yyval.opval = newLOGOP(OP_OR, 0, yyvsp[0].opval, yyvsp[-2].opval); ;}
106 { yyval.opval = newLOOPOP(OPf_PARENS, 1, scalar(yyvsp[0].opval), yyvsp[-2].opval); ;}
111 { yyval.opval = newLOOPOP(OPf_PARENS, 1, yyvsp[0].opval, yyvsp[-2].opval);;}
116 { yyval.opval = newFOROP(0, Nullch, (line_t)yyvsp[-1].ival,
117 Nullop, yyvsp[0].opval, yyvsp[-2].opval, Nullop); ;}
122 { yyval.opval = Nullop; ;}
127 { (yyvsp[0].opval)->op_flags |= OPf_PARENS; yyval.opval = scope(yyvsp[0].opval); ;}
132 { PL_copline = (line_t)yyvsp[-5].ival;
133 yyval.opval = newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval);
134 PL_hints |= HINT_BLOCK_SCOPE; ;}
139 { PL_copline = (line_t)yyvsp[-6].ival;
140 yyval.opval = block_end(yyvsp[-4].ival,
141 newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); ;}
146 { PL_copline = (line_t)yyvsp[-6].ival;
147 yyval.opval = block_end(yyvsp[-4].ival,
148 newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); ;}
153 { yyval.opval = Nullop; ;}
158 { yyval.opval = scope(yyvsp[0].opval); ;}
163 { PL_copline = (line_t)yyvsp[-6].ival;
164 yyval.opval = block_end(yyvsp[-4].ival,
165 newSTATEOP(0, yyvsp[-7].pval,
166 newWHILEOP(0, 1, (LOOP*)Nullop,
167 yyvsp[-6].ival, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); ;}
172 { PL_copline = (line_t)yyvsp[-6].ival;
173 yyval.opval = block_end(yyvsp[-4].ival,
174 newSTATEOP(0, yyvsp[-7].pval,
175 newWHILEOP(0, 1, (LOOP*)Nullop,
176 yyvsp[-6].ival, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); ;}
181 { yyval.opval = block_end(yyvsp[-6].ival,
182 newFOROP(0, yyvsp[-9].pval, (line_t)yyvsp[-8].ival, yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); ;}
187 { yyval.opval = block_end(yyvsp[-4].ival,
188 newFOROP(0, yyvsp[-8].pval, (line_t)yyvsp[-7].ival, mod(yyvsp[-6].opval, OP_ENTERLOOP),
189 yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); ;}
194 { yyval.opval = block_end(yyvsp[-4].ival,
195 newFOROP(0, yyvsp[-7].pval, (line_t)yyvsp[-6].ival, Nullop, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); ;}
201 PL_copline = (line_t)yyvsp[-9].ival;
202 forop = newSTATEOP(0, yyvsp[-10].pval,
203 newWHILEOP(0, 1, (LOOP*)Nullop,
204 yyvsp[-9].ival, scalar(yyvsp[-4].opval),
205 yyvsp[0].opval, yyvsp[-2].opval));
206 if (yyvsp[-6].opval) {
207 forop = append_elem(OP_LINESEQ,
208 newSTATEOP(0, (yyvsp[-10].pval?savepv(yyvsp[-10].pval):Nullch),
213 yyval.opval = block_end(yyvsp[-7].ival, forop); ;}
218 { yyval.opval = newSTATEOP(0, yyvsp[-2].pval,
219 newWHILEOP(0, 1, (LOOP*)Nullop,
220 NOLINE, Nullop, yyvsp[-1].opval, yyvsp[0].opval)); ;}
225 { yyval.opval = Nullop; ;}
230 { (void)scan_num("1", &yylval); yyval.opval = yylval.opval; ;}
235 { yyval.opval = invert(scalar(yyvsp[0].opval)); ;}
240 { yyval.opval = yyvsp[0].opval; intro_my(); ;}
245 { yyval.opval = yyvsp[0].opval; intro_my(); ;}
250 { yyval.opval = yyvsp[0].opval; intro_my(); ;}
255 { yyval.opval = yyvsp[0].opval; intro_my(); ;}
260 { yyval.pval = Nullch; ;}
290 { newFORM(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); ;}
295 { yyval.opval = yyvsp[0].opval; ;}
300 { yyval.opval = Nullop; ;}
305 { newMYSUB(yyvsp[-4].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); ;}
310 { newATTRSUB(yyvsp[-4].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); ;}
315 { yyval.ival = start_subparse(FALSE, 0); ;}
320 { yyval.ival = start_subparse(FALSE, CVf_ANON); ;}
325 { yyval.ival = start_subparse(TRUE, 0); ;}
330 { STRLEN n_a; char *name = SvPV(((SVOP*)yyvsp[0].opval)->op_sv,n_a);
331 if (strEQ(name, "BEGIN") || strEQ(name, "END")
332 || strEQ(name, "INIT") || strEQ(name, "CHECK"))
333 CvSPECIAL_on(PL_compcv);
334 yyval.opval = yyvsp[0].opval; ;}
339 { yyval.opval = Nullop; ;}
344 { yyval.opval = Nullop; ;}
349 { yyval.opval = yyvsp[0].opval; ;}
354 { yyval.opval = Nullop; ;}
359 { yyval.opval = yyvsp[0].opval; ;}
364 { yyval.opval = Nullop; ;}
369 { yyval.opval = yyvsp[0].opval; ;}
374 { yyval.opval = Nullop; PL_expect = XSTATE; ;}
379 { package(yyvsp[-1].opval); ;}
384 { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ ;}
389 { utilize(yyvsp[-6].ival, yyvsp[-5].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval); ;}
394 { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
399 { yyval.opval = newLOGOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
404 { yyval.opval = newLOGOP(OP_DOR, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
409 { yyval.opval = yyvsp[-1].opval; ;}
414 { yyval.opval = append_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval); ;}
419 { yyval.opval = convert(yyvsp[-2].ival, OPf_STACKED,
420 prepend_elem(OP_LIST, newGVREF(yyvsp[-2].ival,yyvsp[-1].opval), yyvsp[0].opval) ); ;}
425 { yyval.opval = convert(yyvsp[-4].ival, OPf_STACKED,
426 prepend_elem(OP_LIST, newGVREF(yyvsp[-4].ival,yyvsp[-2].opval), yyvsp[-1].opval) ); ;}
431 { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
433 prepend_elem(OP_LIST, scalar(yyvsp[-5].opval), yyvsp[-1].opval),
434 newUNOP(OP_METHOD, 0, yyvsp[-3].opval))); ;}
439 { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
440 append_elem(OP_LIST, scalar(yyvsp[-2].opval),
441 newUNOP(OP_METHOD, 0, yyvsp[0].opval))); ;}
446 { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
448 prepend_elem(OP_LIST, yyvsp[-1].opval, yyvsp[0].opval),
449 newUNOP(OP_METHOD, 0, yyvsp[-2].opval))); ;}
454 { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
456 prepend_elem(OP_LIST, yyvsp[-3].opval, yyvsp[-1].opval),
457 newUNOP(OP_METHOD, 0, yyvsp[-4].opval))); ;}
462 { yyval.opval = convert(yyvsp[-1].ival, 0, yyvsp[0].opval); ;}
467 { yyval.opval = convert(yyvsp[-3].ival, 0, yyvsp[-1].opval); ;}
472 { yyvsp[0].opval = newANONATTRSUB(yyvsp[-1].ival, 0, Nullop, yyvsp[0].opval); ;}
477 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
479 prepend_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval), yyvsp[-4].opval)); ;}
484 { yyval.opval = newBINOP(OP_GELEM, 0, yyvsp[-4].opval, scalar(yyvsp[-2].opval));
485 PL_expect = XOPERATOR; ;}
490 { yyval.opval = newBINOP(OP_AELEM, 0, oopsAV(yyvsp[-3].opval), scalar(yyvsp[-1].opval)); ;}
495 { yyval.opval = newBINOP(OP_AELEM, 0,
496 ref(newAVREF(yyvsp[-4].opval),OP_RV2AV),
497 scalar(yyvsp[-1].opval));;}
502 { yyval.opval = newBINOP(OP_AELEM, 0,
503 ref(newAVREF(yyvsp[-3].opval),OP_RV2AV),
504 scalar(yyvsp[-1].opval));;}
509 { yyval.opval = newBINOP(OP_HELEM, 0, oopsHV(yyvsp[-4].opval), jmaybe(yyvsp[-2].opval));
510 PL_expect = XOPERATOR; ;}
515 { yyval.opval = newBINOP(OP_HELEM, 0,
516 ref(newHVREF(yyvsp[-5].opval),OP_RV2HV),
517 jmaybe(yyvsp[-2].opval));
518 PL_expect = XOPERATOR; ;}
523 { yyval.opval = newBINOP(OP_HELEM, 0,
524 ref(newHVREF(yyvsp[-4].opval),OP_RV2HV),
525 jmaybe(yyvsp[-2].opval));
526 PL_expect = XOPERATOR; ;}
531 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
532 newCVREF(0, scalar(yyvsp[-3].opval))); ;}
537 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
538 append_elem(OP_LIST, yyvsp[-1].opval,
539 newCVREF(0, scalar(yyvsp[-4].opval)))); ;}
544 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
545 append_elem(OP_LIST, yyvsp[-1].opval,
546 newCVREF(0, scalar(yyvsp[-3].opval)))); ;}
551 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
552 newCVREF(0, scalar(yyvsp[-2].opval))); ;}
557 { yyval.opval = newASSIGNOP(OPf_STACKED, yyvsp[-2].opval, yyvsp[-1].ival, yyvsp[0].opval); ;}
562 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
567 { if (yyvsp[-1].ival != OP_REPEAT)
568 scalar(yyvsp[-2].opval);
569 yyval.opval = newBINOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, scalar(yyvsp[0].opval)); ;}
574 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
579 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
584 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
589 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
594 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
599 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
604 { yyval.opval = newRANGE(yyvsp[-1].ival, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval));;}
609 { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
614 { yyval.opval = newLOGOP(OP_OR, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
619 { yyval.opval = newLOGOP(OP_DOR, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
624 { yyval.opval = bind_match(yyvsp[-1].ival, yyvsp[-2].opval, yyvsp[0].opval); ;}
629 { yyval.opval = newUNOP(OP_NEGATE, 0, scalar(yyvsp[0].opval)); ;}
634 { yyval.opval = yyvsp[0].opval; ;}
639 { yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); ;}
644 { yyval.opval = newUNOP(OP_COMPLEMENT, 0, scalar(yyvsp[0].opval));;}
649 { yyval.opval = newUNOP(OP_POSTINC, 0,
650 mod(scalar(yyvsp[-1].opval), OP_POSTINC)); ;}
655 { yyval.opval = newUNOP(OP_POSTDEC, 0,
656 mod(scalar(yyvsp[-1].opval), OP_POSTDEC)); ;}
661 { yyval.opval = newUNOP(OP_PREINC, 0,
662 mod(scalar(yyvsp[0].opval), OP_PREINC)); ;}
667 { yyval.opval = newUNOP(OP_PREDEC, 0,
668 mod(scalar(yyvsp[0].opval), OP_PREDEC)); ;}
673 { yyval.opval = newANONLIST(yyvsp[-1].opval); ;}
678 { yyval.opval = newANONLIST(Nullop); ;}
683 { yyval.opval = newANONHASH(yyvsp[-2].opval); ;}
688 { yyval.opval = newANONHASH(Nullop); ;}
693 { yyval.opval = newANONATTRSUB(yyvsp[-3].ival, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); ;}
698 { yyval.opval = dofile(yyvsp[0].opval); ;}
703 { yyval.opval = newUNOP(OP_NULL, OPf_SPECIAL, scope(yyvsp[0].opval)); ;}
708 { yyval.opval = newUNOP(OP_ENTERSUB,
709 OPf_SPECIAL|OPf_STACKED,
710 prepend_elem(OP_LIST,
712 (OPpENTERSUB_AMPER<<8),
713 scalar(yyvsp[-2].opval)
714 )),Nullop)); dep();;}
719 { yyval.opval = newUNOP(OP_ENTERSUB,
720 OPf_SPECIAL|OPf_STACKED,
724 (OPpENTERSUB_AMPER<<8),
725 scalar(yyvsp[-3].opval)
731 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
732 prepend_elem(OP_LIST,
733 scalar(newCVREF(0,scalar(yyvsp[-2].opval))), Nullop)); dep();;}
738 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
739 prepend_elem(OP_LIST,
741 scalar(newCVREF(0,scalar(yyvsp[-3].opval))))); dep();;}
746 { yyval.opval = newCONDOP(0, yyvsp[-4].opval, yyvsp[-2].opval, yyvsp[0].opval); ;}
751 { yyval.opval = newUNOP(OP_REFGEN, 0, mod(yyvsp[0].opval,OP_REFGEN)); ;}
756 { yyval.opval = yyvsp[0].opval; ;}
761 { yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); ;}
766 { yyval.opval = sawparens(yyvsp[-1].opval); ;}
771 { yyval.opval = sawparens(newNULLLIST()); ;}
776 { yyval.opval = yyvsp[0].opval; ;}
781 { yyval.opval = yyvsp[0].opval; ;}
786 { yyval.opval = yyvsp[0].opval; ;}
791 { yyval.opval = yyvsp[0].opval; ;}
796 { yyval.opval = newUNOP(OP_AV2ARYLEN, 0, ref(yyvsp[0].opval, OP_AV2ARYLEN));;}
801 { yyval.opval = yyvsp[0].opval; ;}
806 { yyval.opval = newSLICEOP(0, yyvsp[-1].opval, yyvsp[-4].opval); ;}
811 { yyval.opval = newSLICEOP(0, yyvsp[-1].opval, Nullop); ;}
816 { yyval.opval = prepend_elem(OP_ASLICE,
817 newOP(OP_PUSHMARK, 0),
818 newLISTOP(OP_ASLICE, 0,
819 list(yyvsp[-1].opval),
820 ref(yyvsp[-3].opval, OP_ASLICE))); ;}
825 { yyval.opval = prepend_elem(OP_HSLICE,
826 newOP(OP_PUSHMARK, 0),
827 newLISTOP(OP_HSLICE, 0,
828 list(yyvsp[-2].opval),
829 ref(oopsHV(yyvsp[-4].opval), OP_HSLICE)));
830 PL_expect = XOPERATOR; ;}
835 { yyval.opval = yyvsp[0].opval; ;}
840 { yyval.opval = newUNOP(OP_ENTERSUB, 0, scalar(yyvsp[0].opval)); ;}
845 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar(yyvsp[-2].opval)); ;}
850 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
851 append_elem(OP_LIST, yyvsp[-1].opval, scalar(yyvsp[-3].opval))); ;}
856 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
857 append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); ;}
862 { yyval.opval = newOP(yyvsp[0].ival, OPf_SPECIAL);
863 PL_hints |= HINT_BLOCK_SCOPE; ;}
868 { yyval.opval = newLOOPEX(yyvsp[-1].ival,yyvsp[0].opval); ;}
873 { yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); ;}
878 { yyval.opval = newOP(yyvsp[0].ival, 0); ;}
883 { yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); ;}
888 { yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); ;}
893 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
894 append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); ;}
899 { yyval.opval = newOP(yyvsp[0].ival, 0); ;}
904 { yyval.opval = newOP(yyvsp[-2].ival, 0); ;}
909 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
910 scalar(yyvsp[0].opval)); ;}
915 { yyval.opval = newOP(yyvsp[-2].ival, OPf_SPECIAL); ;}
920 { yyval.opval = newUNOP(yyvsp[-3].ival, 0, yyvsp[-1].opval); ;}
925 { yyval.opval = pmruntime(yyvsp[-3].opval, yyvsp[-1].opval, Nullop); ;}
930 { yyval.opval = pmruntime(yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval); ;}
935 { yyval.opval = my_attrs(yyvsp[-1].opval,yyvsp[0].opval); ;}
940 { yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); ;}
945 { yyval.opval = sawparens(yyvsp[-1].opval); ;}
950 { yyval.opval = sawparens(newNULLLIST()); ;}
955 { yyval.opval = yyvsp[0].opval; ;}
960 { yyval.opval = yyvsp[0].opval; ;}
965 { yyval.opval = yyvsp[0].opval; ;}
970 { yyval.opval = Nullop; ;}
975 { yyval.opval = yyvsp[0].opval; ;}
980 { yyval.opval = Nullop; ;}
985 { yyval.opval = yyvsp[0].opval; ;}
990 { yyval.opval = yyvsp[-1].opval; ;}
995 { PL_in_my = 0; yyval.opval = my(yyvsp[0].opval); ;}
1000 { yyval.opval = newCVREF(yyvsp[-1].ival,yyvsp[0].opval); ;}
1005 { yyval.opval = newSVREF(yyvsp[0].opval); ;}
1010 { yyval.opval = newAVREF(yyvsp[0].opval); ;}
1015 { yyval.opval = newHVREF(yyvsp[0].opval); ;}
1020 { yyval.opval = newAVREF(yyvsp[0].opval); ;}
1025 { yyval.opval = newGVREF(0,yyvsp[0].opval); ;}
1030 { yyval.opval = scalar(yyvsp[0].opval); ;}
1035 { yyval.opval = scalar(yyvsp[0].opval); ;}
1040 { yyval.opval = scope(yyvsp[0].opval); ;}
1045 { yyval.opval = yyvsp[0].opval; ;}