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[-7].ival;
164 yyval.opval = block_end(yyvsp[-5].ival,
165 newSTATEOP(0, yyvsp[-8].pval,
166 newWHILEOP(0, 1, (LOOP*)Nullop,
167 yyvsp[-7].ival, yyvsp[-4].opval, yyvsp[-1].opval, yyvsp[0].opval, yyvsp[-2].ival))); ;}
172 { PL_copline = (line_t)yyvsp[-7].ival;
173 yyval.opval = block_end(yyvsp[-5].ival,
174 newSTATEOP(0, yyvsp[-8].pval,
175 newWHILEOP(0, 1, (LOOP*)Nullop,
176 yyvsp[-7].ival, yyvsp[-4].opval, yyvsp[-1].opval, yyvsp[0].opval, yyvsp[-2].ival))); ;}
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[-10].ival;
202 forop = newSTATEOP(0, yyvsp[-11].pval,
203 newWHILEOP(0, 1, (LOOP*)Nullop,
204 yyvsp[-10].ival, scalar(yyvsp[-5].opval),
205 yyvsp[0].opval, yyvsp[-2].opval, yyvsp[-3].ival));
206 if (yyvsp[-7].opval) {
207 forop = append_elem(OP_LINESEQ,
208 newSTATEOP(0, (yyvsp[-11].pval?savepv(yyvsp[-11].pval):Nullch),
213 yyval.opval = block_end(yyvsp[-8].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, 0)); ;}
225 { yyval.ival = (PL_min_intro_pending &&
226 PL_max_intro_pending >= PL_min_intro_pending);
232 { yyval.opval = Nullop; ;}
237 { (void)scan_num("1", &yylval); yyval.opval = yylval.opval; ;}
242 { yyval.opval = invert(scalar(yyvsp[0].opval)); ;}
247 { yyval.opval = yyvsp[0].opval; intro_my(); ;}
252 { yyval.opval = yyvsp[0].opval; intro_my(); ;}
257 { yyval.opval = yyvsp[0].opval; intro_my(); ;}
262 { yyval.pval = Nullch; ;}
292 { newFORM(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); ;}
297 { yyval.opval = yyvsp[0].opval; ;}
302 { yyval.opval = Nullop; ;}
307 { newMYSUB(yyvsp[-4].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); ;}
312 { newATTRSUB(yyvsp[-4].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); ;}
317 { yyval.ival = start_subparse(FALSE, 0); ;}
322 { yyval.ival = start_subparse(FALSE, CVf_ANON); ;}
327 { yyval.ival = start_subparse(TRUE, 0); ;}
332 { STRLEN n_a; const char *name = SvPV_const(((SVOP*)yyvsp[0].opval)->op_sv,n_a);
333 if (strEQ(name, "BEGIN") || strEQ(name, "END")
334 || strEQ(name, "INIT") || strEQ(name, "CHECK"))
335 CvSPECIAL_on(PL_compcv);
336 yyval.opval = yyvsp[0].opval; ;}
341 { yyval.opval = Nullop; ;}
346 { yyval.opval = Nullop; ;}
351 { yyval.opval = yyvsp[0].opval; ;}
356 { yyval.opval = Nullop; ;}
361 { yyval.opval = yyvsp[0].opval; ;}
366 { yyval.opval = Nullop; ;}
371 { yyval.opval = yyvsp[0].opval; ;}
376 { yyval.opval = Nullop; PL_expect = XSTATE; ;}
381 { package(yyvsp[-1].opval); ;}
386 { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ ;}
391 { utilize(yyvsp[-6].ival, yyvsp[-5].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval); ;}
396 { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
401 { yyval.opval = newLOGOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
406 { yyval.opval = newLOGOP(OP_DOR, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
411 { yyval.opval = yyvsp[-1].opval; ;}
416 { yyval.opval = append_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval); ;}
421 { yyval.opval = convert(yyvsp[-2].ival, OPf_STACKED,
422 prepend_elem(OP_LIST, newGVREF(yyvsp[-2].ival,yyvsp[-1].opval), yyvsp[0].opval) ); ;}
427 { yyval.opval = convert(yyvsp[-4].ival, OPf_STACKED,
428 prepend_elem(OP_LIST, newGVREF(yyvsp[-4].ival,yyvsp[-2].opval), yyvsp[-1].opval) ); ;}
433 { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
435 prepend_elem(OP_LIST, scalar(yyvsp[-5].opval), yyvsp[-1].opval),
436 newUNOP(OP_METHOD, 0, yyvsp[-3].opval))); ;}
441 { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
442 append_elem(OP_LIST, scalar(yyvsp[-2].opval),
443 newUNOP(OP_METHOD, 0, yyvsp[0].opval))); ;}
448 { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
450 prepend_elem(OP_LIST, yyvsp[-1].opval, yyvsp[0].opval),
451 newUNOP(OP_METHOD, 0, yyvsp[-2].opval))); ;}
456 { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
458 prepend_elem(OP_LIST, yyvsp[-3].opval, yyvsp[-1].opval),
459 newUNOP(OP_METHOD, 0, yyvsp[-4].opval))); ;}
464 { yyval.opval = convert(yyvsp[-1].ival, 0, yyvsp[0].opval); ;}
469 { yyval.opval = convert(yyvsp[-3].ival, 0, yyvsp[-1].opval); ;}
474 { yyvsp[0].opval = newANONATTRSUB(yyvsp[-1].ival, 0, Nullop, yyvsp[0].opval); ;}
479 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
481 prepend_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval), yyvsp[-4].opval)); ;}
486 { yyval.opval = newBINOP(OP_GELEM, 0, yyvsp[-4].opval, scalar(yyvsp[-2].opval));
487 PL_expect = XOPERATOR; ;}
492 { yyval.opval = newBINOP(OP_AELEM, 0, oopsAV(yyvsp[-3].opval), scalar(yyvsp[-1].opval)); ;}
497 { yyval.opval = newBINOP(OP_AELEM, 0,
498 ref(newAVREF(yyvsp[-4].opval),OP_RV2AV),
499 scalar(yyvsp[-1].opval));;}
504 { yyval.opval = newBINOP(OP_AELEM, 0,
505 ref(newAVREF(yyvsp[-3].opval),OP_RV2AV),
506 scalar(yyvsp[-1].opval));;}
511 { yyval.opval = newBINOP(OP_HELEM, 0, oopsHV(yyvsp[-4].opval), jmaybe(yyvsp[-2].opval));
512 PL_expect = XOPERATOR; ;}
517 { yyval.opval = newBINOP(OP_HELEM, 0,
518 ref(newHVREF(yyvsp[-5].opval),OP_RV2HV),
519 jmaybe(yyvsp[-2].opval));
520 PL_expect = XOPERATOR; ;}
525 { yyval.opval = newBINOP(OP_HELEM, 0,
526 ref(newHVREF(yyvsp[-4].opval),OP_RV2HV),
527 jmaybe(yyvsp[-2].opval));
528 PL_expect = XOPERATOR; ;}
533 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
534 newCVREF(0, scalar(yyvsp[-3].opval))); ;}
539 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
540 append_elem(OP_LIST, yyvsp[-1].opval,
541 newCVREF(0, scalar(yyvsp[-4].opval)))); ;}
546 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
547 append_elem(OP_LIST, yyvsp[-1].opval,
548 newCVREF(0, scalar(yyvsp[-3].opval)))); ;}
553 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
554 newCVREF(0, scalar(yyvsp[-2].opval))); ;}
559 { yyval.opval = newASSIGNOP(OPf_STACKED, yyvsp[-2].opval, yyvsp[-1].ival, yyvsp[0].opval); ;}
564 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
569 { if (yyvsp[-1].ival != OP_REPEAT)
570 scalar(yyvsp[-2].opval);
571 yyval.opval = newBINOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, scalar(yyvsp[0].opval)); ;}
576 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
581 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
586 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
591 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
596 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
601 { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
606 { yyval.opval = newRANGE(yyvsp[-1].ival, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval));;}
611 { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
616 { yyval.opval = newLOGOP(OP_OR, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
621 { yyval.opval = newLOGOP(OP_DOR, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
626 { yyval.opval = bind_match(yyvsp[-1].ival, yyvsp[-2].opval, yyvsp[0].opval); ;}
631 { yyval.opval = newUNOP(OP_NEGATE, 0, scalar(yyvsp[0].opval)); ;}
636 { yyval.opval = yyvsp[0].opval; ;}
641 { yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); ;}
646 { yyval.opval = newUNOP(OP_COMPLEMENT, 0, scalar(yyvsp[0].opval));;}
651 { yyval.opval = newUNOP(OP_POSTINC, 0,
652 mod(scalar(yyvsp[-1].opval), OP_POSTINC)); ;}
657 { yyval.opval = newUNOP(OP_POSTDEC, 0,
658 mod(scalar(yyvsp[-1].opval), OP_POSTDEC)); ;}
663 { yyval.opval = newUNOP(OP_PREINC, 0,
664 mod(scalar(yyvsp[0].opval), OP_PREINC)); ;}
669 { yyval.opval = newUNOP(OP_PREDEC, 0,
670 mod(scalar(yyvsp[0].opval), OP_PREDEC)); ;}
675 { yyval.opval = newANONLIST(yyvsp[-1].opval); ;}
680 { yyval.opval = newANONLIST(Nullop); ;}
685 { yyval.opval = newANONHASH(yyvsp[-2].opval); ;}
690 { yyval.opval = newANONHASH(Nullop); ;}
695 { yyval.opval = newANONATTRSUB(yyvsp[-3].ival, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); ;}
700 { yyval.opval = dofile(yyvsp[0].opval); ;}
705 { yyval.opval = newUNOP(OP_NULL, OPf_SPECIAL, scope(yyvsp[0].opval)); ;}
710 { yyval.opval = newUNOP(OP_ENTERSUB,
711 OPf_SPECIAL|OPf_STACKED,
712 prepend_elem(OP_LIST,
714 (OPpENTERSUB_AMPER<<8),
715 scalar(yyvsp[-2].opval)
716 )),Nullop)); dep();;}
721 { yyval.opval = newUNOP(OP_ENTERSUB,
722 OPf_SPECIAL|OPf_STACKED,
726 (OPpENTERSUB_AMPER<<8),
727 scalar(yyvsp[-3].opval)
733 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
734 prepend_elem(OP_LIST,
735 scalar(newCVREF(0,scalar(yyvsp[-2].opval))), Nullop)); dep();;}
740 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
741 prepend_elem(OP_LIST,
743 scalar(newCVREF(0,scalar(yyvsp[-3].opval))))); dep();;}
748 { yyval.opval = newCONDOP(0, yyvsp[-4].opval, yyvsp[-2].opval, yyvsp[0].opval); ;}
753 { yyval.opval = newUNOP(OP_REFGEN, 0, mod(yyvsp[0].opval,OP_REFGEN)); ;}
758 { yyval.opval = yyvsp[0].opval; ;}
763 { yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); ;}
768 { yyval.opval = sawparens(yyvsp[-1].opval); ;}
773 { yyval.opval = sawparens(newNULLLIST()); ;}
778 { yyval.opval = yyvsp[0].opval; ;}
783 { yyval.opval = yyvsp[0].opval; ;}
788 { yyval.opval = yyvsp[0].opval; ;}
793 { yyval.opval = yyvsp[0].opval; ;}
798 { yyval.opval = newUNOP(OP_AV2ARYLEN, 0, ref(yyvsp[0].opval, OP_AV2ARYLEN));;}
803 { yyval.opval = yyvsp[0].opval; ;}
808 { yyval.opval = newSLICEOP(0, yyvsp[-1].opval, yyvsp[-4].opval); ;}
813 { yyval.opval = newSLICEOP(0, yyvsp[-1].opval, Nullop); ;}
818 { yyval.opval = prepend_elem(OP_ASLICE,
819 newOP(OP_PUSHMARK, 0),
820 newLISTOP(OP_ASLICE, 0,
821 list(yyvsp[-1].opval),
822 ref(yyvsp[-3].opval, OP_ASLICE))); ;}
827 { yyval.opval = prepend_elem(OP_HSLICE,
828 newOP(OP_PUSHMARK, 0),
829 newLISTOP(OP_HSLICE, 0,
830 list(yyvsp[-2].opval),
831 ref(oopsHV(yyvsp[-4].opval), OP_HSLICE)));
832 PL_expect = XOPERATOR; ;}
837 { yyval.opval = yyvsp[0].opval; ;}
842 { yyval.opval = newUNOP(OP_ENTERSUB, 0, scalar(yyvsp[0].opval)); ;}
847 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar(yyvsp[-2].opval)); ;}
852 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
853 append_elem(OP_LIST, yyvsp[-1].opval, scalar(yyvsp[-3].opval))); ;}
858 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
859 append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); ;}
864 { yyval.opval = newOP(yyvsp[0].ival, OPf_SPECIAL);
865 PL_hints |= HINT_BLOCK_SCOPE; ;}
870 { yyval.opval = newLOOPEX(yyvsp[-1].ival,yyvsp[0].opval); ;}
875 { yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); ;}
880 { yyval.opval = newOP(yyvsp[0].ival, 0); ;}
885 { yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); ;}
890 { yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); ;}
895 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
896 append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); ;}
901 { yyval.opval = newOP(yyvsp[0].ival, 0); ;}
906 { yyval.opval = newOP(yyvsp[-2].ival, 0); ;}
911 { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
912 scalar(yyvsp[0].opval)); ;}
917 { yyval.opval = yyvsp[-2].ival == OP_NOT ? newUNOP(yyvsp[-2].ival, 0, newSVOP(OP_CONST, 0, newSViv(0)))
918 : newOP(yyvsp[-2].ival, OPf_SPECIAL); ;}
923 { yyval.opval = newUNOP(yyvsp[-3].ival, 0, yyvsp[-1].opval); ;}
928 { yyval.opval = pmruntime(yyvsp[-3].opval, yyvsp[-1].opval, 1); ;}
933 { yyval.opval = my_attrs(yyvsp[-1].opval,yyvsp[0].opval); ;}
938 { yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); ;}
943 { yyval.opval = sawparens(yyvsp[-1].opval); ;}
948 { yyval.opval = sawparens(newNULLLIST()); ;}
953 { yyval.opval = yyvsp[0].opval; ;}
958 { yyval.opval = yyvsp[0].opval; ;}
963 { yyval.opval = yyvsp[0].opval; ;}
968 { yyval.opval = Nullop; ;}
973 { yyval.opval = yyvsp[0].opval; ;}
978 { yyval.opval = Nullop; ;}
983 { yyval.opval = yyvsp[0].opval; ;}
988 { yyval.opval = yyvsp[-1].opval; ;}
993 { PL_in_my = 0; yyval.opval = my(yyvsp[0].opval); ;}
998 { yyval.opval = newCVREF(yyvsp[-1].ival,yyvsp[0].opval); ;}
1003 { yyval.opval = newSVREF(yyvsp[0].opval); ;}
1008 { yyval.opval = newAVREF(yyvsp[0].opval); ;}
1013 { yyval.opval = newHVREF(yyvsp[0].opval); ;}
1018 { yyval.opval = newAVREF(yyvsp[0].opval); ;}
1023 { yyval.opval = newGVREF(0,yyvsp[0].opval); ;}
1028 { yyval.opval = scalar(yyvsp[0].opval); ;}
1033 { yyval.opval = scalar(yyvsp[0].opval); ;}
1038 { yyval.opval = scope(yyvsp[0].opval); ;}
1043 { yyval.opval = yyvsp[0].opval; ;}