From: Zefram Date: Sat, 22 May 2010 22:10:16 +0000 (+0100) Subject: fix MAD handling of package block syntax X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=702646f25c38c963340344fc4125d616ff143857;p=p5sagit%2Fp5-mst-13.2.git fix MAD handling of package block syntax There was a broken TOKEN_GETMAD attempting to handle the label preceding a package-block statement, where no label is actually possible. The correct behaviour for no label is a no-op, so just remove the TOKEN_GETMAD. --- diff --git a/perly.act b/perly.act index 76421c3..7cf5da3 100644 --- a/perly.act +++ b/perly.act @@ -130,55 +130,54 @@ case 2: { (yyval.opval) = newSTATEOP(0, NULL, newWHILEOP(0, 1, (LOOP*)(OP*)NULL, NOLINE, (OP*)NULL, (ps[(1) - (1)].val.opval), - (OP*)NULL, 0)); - TOKEN_GETMAD((ps[(1) - (1)].val.opval),((LISTOP*)(yyval.opval))->op_first,'L'); ;} + (OP*)NULL, 0)); ;} break; case 19: -#line 252 "perly.y" +#line 251 "perly.y" { (yyval.opval) = newSTATEOP(0, PVAL((ps[(1) - (2)].val.p_tkval)), (ps[(2) - (2)].val.opval)); ;} break; case 20: -#line 257 "perly.y" +#line 256 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; case 21: -#line 259 "perly.y" +#line 258 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 22: -#line 261 "perly.y" +#line 260 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[(3) - (3)].val.opval), (ps[(1) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'i'); ;} break; case 23: -#line 265 "perly.y" +#line 264 "perly.y" { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[(3) - (3)].val.opval), (ps[(1) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'i'); ;} break; case 24: -#line 269 "perly.y" +#line 268 "perly.y" { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((ps[(3) - (3)].val.opval)), (ps[(1) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'w'); ;} break; case 25: -#line 273 "perly.y" +#line 272 "perly.y" { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (ps[(3) - (3)].val.opval), (ps[(1) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'w'); ;} break; case 26: -#line 277 "perly.y" +#line 276 "perly.y" { (yyval.opval) = newFOROP(0, NULL, (line_t)IVAL((ps[(2) - (3)].val.i_tkval)), (OP*)NULL, (ps[(3) - (3)].val.opval), (ps[(1) - (3)].val.opval), (OP*)NULL); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),((LISTOP*)(yyval.opval))->op_first->op_sibling,'w'); @@ -186,24 +185,24 @@ case 2: break; case 27: -#line 282 "perly.y" +#line 281 "perly.y" { (yyval.opval) = newWHENOP((ps[(3) - (3)].val.opval), scope((ps[(1) - (3)].val.opval))); ;} break; case 28: -#line 287 "perly.y" +#line 286 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; case 29: -#line 289 "perly.y" +#line 288 "perly.y" { ((ps[(2) - (2)].val.opval))->op_flags |= OPf_PARENS; (yyval.opval) = scope((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 30: -#line 293 "perly.y" +#line 292 "perly.y" { PL_parser->copline = (line_t)IVAL((ps[(1) - (6)].val.i_tkval)); (yyval.opval) = newCONDOP(0, newSTATEOP(OPf_SPECIAL,NULL,(ps[(3) - (6)].val.opval)), scope((ps[(5) - (6)].val.opval)), (ps[(6) - (6)].val.opval)); PL_hints |= HINT_BLOCK_SCOPE; @@ -214,7 +213,7 @@ case 2: break; case 31: -#line 304 "perly.y" +#line 303 "perly.y" { PL_parser->copline = (line_t)IVAL((ps[(1) - (7)].val.i_tkval)); (yyval.opval) = block_end((ps[(3) - (7)].val.ival), newCONDOP(0, (ps[(4) - (7)].val.opval), scope((ps[(6) - (7)].val.opval)), (ps[(7) - (7)].val.opval))); @@ -225,7 +224,7 @@ case 2: break; case 32: -#line 312 "perly.y" +#line 311 "perly.y" { PL_parser->copline = (line_t)IVAL((ps[(1) - (7)].val.i_tkval)); (yyval.opval) = block_end((ps[(3) - (7)].val.ival), newCONDOP(0, (ps[(4) - (7)].val.opval), scope((ps[(6) - (7)].val.opval)), (ps[(7) - (7)].val.opval))); @@ -236,30 +235,30 @@ case 2: break; case 33: -#line 323 "perly.y" +#line 322 "perly.y" { (yyval.opval) = block_end((ps[(3) - (6)].val.ival), newWHENOP((ps[(4) - (6)].val.opval), scope((ps[(6) - (6)].val.opval)))); ;} break; case 34: -#line 326 "perly.y" +#line 325 "perly.y" { (yyval.opval) = newWHENOP(0, scope((ps[(2) - (2)].val.opval))); ;} break; case 35: -#line 331 "perly.y" +#line 330 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; case 36: -#line 333 "perly.y" +#line 332 "perly.y" { (yyval.opval) = scope((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 37: -#line 340 "perly.y" +#line 339 "perly.y" { OP *innerop; PL_parser->copline = (line_t)IVAL((ps[(2) - (9)].val.i_tkval)); (yyval.opval) = block_end((ps[(4) - (9)].val.ival), @@ -274,7 +273,7 @@ case 2: break; case 38: -#line 353 "perly.y" +#line 352 "perly.y" { OP *innerop; PL_parser->copline = (line_t)IVAL((ps[(2) - (9)].val.i_tkval)); (yyval.opval) = block_end((ps[(4) - (9)].val.ival), @@ -289,7 +288,7 @@ case 2: break; case 39: -#line 365 "perly.y" +#line 364 "perly.y" { OP *innerop; (yyval.opval) = block_end((ps[(4) - (10)].val.ival), innerop = newFOROP(0, PVAL((ps[(1) - (10)].val.p_tkval)), (line_t)IVAL((ps[(2) - (10)].val.i_tkval)), @@ -303,7 +302,7 @@ case 2: break; case 40: -#line 376 "perly.y" +#line 375 "perly.y" { OP *innerop; (yyval.opval) = block_end((ps[(5) - (9)].val.ival), innerop = newFOROP(0, PVAL((ps[(1) - (9)].val.p_tkval)), (line_t)IVAL((ps[(2) - (9)].val.i_tkval)), @@ -316,7 +315,7 @@ case 2: break; case 41: -#line 386 "perly.y" +#line 385 "perly.y" { OP *innerop; (yyval.opval) = block_end((ps[(4) - (8)].val.ival), innerop = newFOROP(0, PVAL((ps[(1) - (8)].val.p_tkval)), (line_t)IVAL((ps[(2) - (8)].val.i_tkval)), @@ -329,7 +328,7 @@ case 2: break; case 42: -#line 398 "perly.y" +#line 397 "perly.y" { OP *forop; PL_parser->copline = (line_t)IVAL((ps[(2) - (12)].val.i_tkval)); forop = newSTATEOP(0, PVAL((ps[(1) - (12)].val.p_tkval)), @@ -362,7 +361,7 @@ case 2: break; case 43: -#line 428 "perly.y" +#line 427 "perly.y" { (yyval.opval) = newSTATEOP(0, PVAL((ps[(1) - (3)].val.p_tkval)), newWHILEOP(0, 1, (LOOP*)(OP*)NULL, NOLINE, (OP*)NULL, (ps[(2) - (3)].val.opval), (ps[(3) - (3)].val.opval), 0)); @@ -370,7 +369,7 @@ case 2: break; case 44: -#line 436 "perly.y" +#line 435 "perly.y" { PL_parser->copline = (line_t) IVAL((ps[(2) - (8)].val.i_tkval)); (yyval.opval) = block_end((ps[(4) - (8)].val.ival), newSTATEOP(0, PVAL((ps[(1) - (8)].val.p_tkval)), @@ -379,46 +378,46 @@ case 2: break; case 45: -#line 445 "perly.y" +#line 444 "perly.y" { (yyval.ival) = (PL_min_intro_pending && PL_max_intro_pending >= PL_min_intro_pending); intro_my(); ;} break; case 46: -#line 451 "perly.y" +#line 450 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; case 48: -#line 457 "perly.y" +#line 456 "perly.y" { YYSTYPE tmplval; (void)scan_num("1", &tmplval); (yyval.opval) = tmplval.opval; ;} break; case 50: -#line 465 "perly.y" +#line 464 "perly.y" { (yyval.opval) = invert(scalar((ps[(1) - (1)].val.opval))); ;} break; case 51: -#line 470 "perly.y" +#line 469 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); intro_my(); ;} break; case 52: -#line 474 "perly.y" +#line 473 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); intro_my(); ;} break; case 53: -#line 478 "perly.y" +#line 477 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); intro_my(); ;} break; case 54: -#line 483 "perly.y" +#line 482 "perly.y" { #ifdef MAD YYSTYPE tmplval; @@ -431,44 +430,44 @@ case 2: break; case 56: -#line 497 "perly.y" +#line 496 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 57: -#line 499 "perly.y" +#line 498 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 58: -#line 501 "perly.y" +#line 500 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 59: -#line 503 "perly.y" +#line 502 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 60: -#line 505 "perly.y" +#line 504 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 61: -#line 510 "perly.y" +#line 509 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 62: -#line 514 "perly.y" +#line 513 "perly.y" { (yyval.opval) = newOP(OP_NULL,0); TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),'p'); ;} break; case 63: -#line 520 "perly.y" +#line 519 "perly.y" { CV *fmtcv = PL_compcv; SvREFCNT_inc_simple_void(PL_compcv); @@ -489,17 +488,17 @@ case 2: break; case 64: -#line 539 "perly.y" +#line 538 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 65: -#line 540 "perly.y" +#line 539 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; case 66: -#line 545 "perly.y" +#line 544 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); #ifdef MAD (yyval.opval) = newMYSUB((ps[(2) - (6)].val.ival), (ps[(3) - (6)].val.opval), (ps[(4) - (6)].val.opval), (ps[(5) - (6)].val.opval), (ps[(6) - (6)].val.opval)); @@ -512,7 +511,7 @@ case 2: break; case 67: -#line 558 "perly.y" +#line 557 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); #ifdef MAD { @@ -535,25 +534,25 @@ case 2: break; case 68: -#line 580 "perly.y" +#line 579 "perly.y" { (yyval.ival) = start_subparse(FALSE, 0); SAVEFREESV(PL_compcv); ;} break; case 69: -#line 586 "perly.y" +#line 585 "perly.y" { (yyval.ival) = start_subparse(FALSE, CVf_ANON); SAVEFREESV(PL_compcv); ;} break; case 70: -#line 591 "perly.y" +#line 590 "perly.y" { (yyval.ival) = start_subparse(TRUE, 0); SAVEFREESV(PL_compcv); ;} break; case 71: -#line 596 "perly.y" +#line 595 "perly.y" { const char *const name = SvPV_nolen_const(((SVOP*)(ps[(1) - (1)].val.opval))->op_sv); if (strEQ(name, "BEGIN") || strEQ(name, "END") || strEQ(name, "INIT") || strEQ(name, "CHECK") @@ -563,24 +562,24 @@ case 2: break; case 72: -#line 606 "perly.y" +#line 605 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; case 74: -#line 612 "perly.y" +#line 611 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; case 75: -#line 614 "perly.y" +#line 613 "perly.y" { (yyval.opval) = (ps[(2) - (2)].val.opval); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),':'); ;} break; case 76: -#line 618 "perly.y" +#line 617 "perly.y" { (yyval.opval) = IF_MAD( newOP(OP_NULL, 0), (OP*)NULL @@ -590,14 +589,14 @@ case 2: break; case 77: -#line 628 "perly.y" +#line 627 "perly.y" { (yyval.opval) = (ps[(2) - (2)].val.opval); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),':'); ;} break; case 78: -#line 632 "perly.y" +#line 631 "perly.y" { (yyval.opval) = IF_MAD( newOP(OP_NULL, 0), (OP*)NULL @@ -607,12 +606,12 @@ case 2: break; case 79: -#line 641 "perly.y" +#line 640 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 80: -#line 642 "perly.y" +#line 641 "perly.y" { (yyval.opval) = IF_MAD( newOP(OP_NULL,0), (OP*)NULL @@ -623,7 +622,7 @@ case 2: break; case 81: -#line 652 "perly.y" +#line 651 "perly.y" { #ifdef MAD (yyval.opval) = package((ps[(3) - (4)].val.opval)); @@ -641,7 +640,7 @@ case 2: break; case 82: -#line 669 "perly.y" +#line 668 "perly.y" { int save_3_latefree = (ps[(3) - (5)].val.opval)->op_latefree; (ps[(3) - (5)].val.opval)->op_latefree = 1; @@ -657,7 +656,7 @@ case 2: break; case 83: -#line 682 "perly.y" +#line 681 "perly.y" { if (PL_parser->copline > (line_t)IVAL((ps[(4) - (8)].val.i_tkval))) PL_parser->copline = (line_t)IVAL((ps[(4) - (8)].val.i_tkval)); (yyval.opval) = block_end((ps[(5) - (8)].val.ival), (ps[(7) - (8)].val.opval)); @@ -670,12 +669,12 @@ case 2: break; case 84: -#line 694 "perly.y" +#line 693 "perly.y" { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ ;} break; case 85: -#line 696 "perly.y" +#line 695 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); #ifdef MAD (yyval.opval) = utilize(IVAL((ps[(1) - (7)].val.i_tkval)), (ps[(2) - (7)].val.ival), (ps[(4) - (7)].val.opval), (ps[(5) - (7)].val.opval), (ps[(6) - (7)].val.opval)); @@ -692,28 +691,28 @@ case 2: break; case 86: -#line 713 "perly.y" +#line 712 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 87: -#line 717 "perly.y" +#line 716 "perly.y" { (yyval.opval) = newLOGOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 88: -#line 721 "perly.y" +#line 720 "perly.y" { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 90: -#line 729 "perly.y" +#line 728 "perly.y" { #ifdef MAD OP* op = newNULLLIST(); @@ -726,7 +725,7 @@ case 2: break; case 91: -#line 739 "perly.y" +#line 738 "perly.y" { OP* term = (ps[(3) - (3)].val.opval); DO_MAD( @@ -738,7 +737,7 @@ case 2: break; case 93: -#line 752 "perly.y" +#line 751 "perly.y" { (yyval.opval) = convert(IVAL((ps[(1) - (3)].val.i_tkval)), OPf_STACKED, prepend_elem(OP_LIST, newGVREF(IVAL((ps[(1) - (3)].val.i_tkval)),(ps[(2) - (3)].val.opval)), (ps[(3) - (3)].val.opval)) ); TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'o'); @@ -746,7 +745,7 @@ case 2: break; case 94: -#line 757 "perly.y" +#line 756 "perly.y" { (yyval.opval) = convert(IVAL((ps[(1) - (5)].val.i_tkval)), OPf_STACKED, prepend_elem(OP_LIST, newGVREF(IVAL((ps[(1) - (5)].val.i_tkval)),(ps[(3) - (5)].val.opval)), (ps[(4) - (5)].val.opval)) ); TOKEN_GETMAD((ps[(1) - (5)].val.i_tkval),(yyval.opval),'o'); @@ -756,7 +755,7 @@ case 2: break; case 95: -#line 764 "perly.y" +#line 763 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, scalar((ps[(1) - (6)].val.opval)), (ps[(5) - (6)].val.opval)), @@ -768,7 +767,7 @@ case 2: break; case 96: -#line 773 "perly.y" +#line 772 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, scalar((ps[(1) - (3)].val.opval)), newUNOP(OP_METHOD, 0, (ps[(3) - (3)].val.opval)))); @@ -777,7 +776,7 @@ case 2: break; case 97: -#line 779 "perly.y" +#line 778 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, (ps[(2) - (3)].val.opval), (ps[(3) - (3)].val.opval)), @@ -786,7 +785,7 @@ case 2: break; case 98: -#line 785 "perly.y" +#line 784 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, (ps[(2) - (5)].val.opval), (ps[(4) - (5)].val.opval)), @@ -797,14 +796,14 @@ case 2: break; case 99: -#line 793 "perly.y" +#line 792 "perly.y" { (yyval.opval) = convert(IVAL((ps[(1) - (2)].val.i_tkval)), 0, (ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 100: -#line 797 "perly.y" +#line 796 "perly.y" { (yyval.opval) = convert(IVAL((ps[(1) - (4)].val.i_tkval)), 0, (ps[(3) - (4)].val.opval)); TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'o'); TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'('); @@ -813,13 +812,13 @@ case 2: break; case 101: -#line 803 "perly.y" +#line 802 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); (yyval.opval) = newANONATTRSUB((ps[(2) - (3)].val.ival), 0, (OP*)NULL, (ps[(3) - (3)].val.opval)); ;} break; case 102: -#line 806 "perly.y" +#line 805 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, (ps[(4) - (5)].val.opval), (ps[(5) - (5)].val.opval)), (ps[(1) - (5)].val.opval))); @@ -827,7 +826,7 @@ case 2: break; case 105: -#line 821 "perly.y" +#line 820 "perly.y" { (yyval.opval) = newBINOP(OP_GELEM, 0, (ps[(1) - (5)].val.opval), scalar((ps[(3) - (5)].val.opval))); PL_parser->expect = XOPERATOR; TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'{'); @@ -837,7 +836,7 @@ case 2: break; case 106: -#line 828 "perly.y" +#line 827 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((ps[(1) - (4)].val.opval)), scalar((ps[(3) - (4)].val.opval))); TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'['); TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),']'); @@ -845,7 +844,7 @@ case 2: break; case 107: -#line 833 "perly.y" +#line 832 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((ps[(1) - (5)].val.opval)),OP_RV2AV), scalar((ps[(4) - (5)].val.opval))); @@ -856,7 +855,7 @@ case 2: break; case 108: -#line 841 "perly.y" +#line 840 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((ps[(1) - (4)].val.opval)),OP_RV2AV), scalar((ps[(3) - (4)].val.opval))); @@ -866,7 +865,7 @@ case 2: break; case 109: -#line 848 "perly.y" +#line 847 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((ps[(1) - (5)].val.opval)), jmaybe((ps[(3) - (5)].val.opval))); PL_parser->expect = XOPERATOR; TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'{'); @@ -876,7 +875,7 @@ case 2: break; case 110: -#line 855 "perly.y" +#line 854 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((ps[(1) - (6)].val.opval)),OP_RV2HV), jmaybe((ps[(4) - (6)].val.opval))); @@ -889,7 +888,7 @@ case 2: break; case 111: -#line 865 "perly.y" +#line 864 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((ps[(1) - (5)].val.opval)),OP_RV2HV), jmaybe((ps[(3) - (5)].val.opval))); @@ -901,7 +900,7 @@ case 2: break; case 112: -#line 874 "perly.y" +#line 873 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, newCVREF(0, scalar((ps[(1) - (4)].val.opval)))); TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'a'); @@ -911,7 +910,7 @@ case 2: break; case 113: -#line 881 "perly.y" +#line 880 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (ps[(4) - (5)].val.opval), newCVREF(0, scalar((ps[(1) - (5)].val.opval))))); @@ -922,7 +921,7 @@ case 2: break; case 114: -#line 890 "perly.y" +#line 889 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (ps[(3) - (4)].val.opval), newCVREF(0, scalar((ps[(1) - (4)].val.opval))))); @@ -932,7 +931,7 @@ case 2: break; case 115: -#line 897 "perly.y" +#line 896 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, newCVREF(0, scalar((ps[(1) - (3)].val.opval)))); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'('); @@ -941,7 +940,7 @@ case 2: break; case 116: -#line 903 "perly.y" +#line 902 "perly.y" { (yyval.opval) = newSLICEOP(0, (ps[(5) - (6)].val.opval), (ps[(2) - (6)].val.opval)); TOKEN_GETMAD((ps[(1) - (6)].val.i_tkval),(yyval.opval),'('); TOKEN_GETMAD((ps[(3) - (6)].val.i_tkval),(yyval.opval),')'); @@ -951,7 +950,7 @@ case 2: break; case 117: -#line 910 "perly.y" +#line 909 "perly.y" { (yyval.opval) = newSLICEOP(0, (ps[(4) - (5)].val.opval), (OP*)NULL); TOKEN_GETMAD((ps[(1) - (5)].val.i_tkval),(yyval.opval),'('); TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),')'); @@ -961,21 +960,21 @@ case 2: break; case 118: -#line 920 "perly.y" +#line 919 "perly.y" { (yyval.opval) = newASSIGNOP(OPf_STACKED, (ps[(1) - (3)].val.opval), IVAL((ps[(2) - (3)].val.i_tkval)), (ps[(3) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 119: -#line 924 "perly.y" +#line 923 "perly.y" { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 120: -#line 928 "perly.y" +#line 927 "perly.y" { if (IVAL((ps[(2) - (3)].val.i_tkval)) != OP_REPEAT) scalar((ps[(1) - (3)].val.opval)); (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, (ps[(1) - (3)].val.opval), scalar((ps[(3) - (3)].val.opval))); @@ -984,49 +983,49 @@ case 2: break; case 121: -#line 934 "perly.y" +#line 933 "perly.y" { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 122: -#line 938 "perly.y" +#line 937 "perly.y" { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 123: -#line 942 "perly.y" +#line 941 "perly.y" { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 124: -#line 946 "perly.y" +#line 945 "perly.y" { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 125: -#line 950 "perly.y" +#line 949 "perly.y" { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 126: -#line 954 "perly.y" +#line 953 "perly.y" { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 127: -#line 958 "perly.y" +#line 957 "perly.y" { (yyval.opval) = newRANGE(IVAL((ps[(2) - (3)].val.i_tkval)), scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); DO_MAD({ @@ -1041,28 +1040,28 @@ case 2: break; case 128: -#line 970 "perly.y" +#line 969 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 129: -#line 974 "perly.y" +#line 973 "perly.y" { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 130: -#line 978 "perly.y" +#line 977 "perly.y" { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 131: -#line 982 "perly.y" +#line 981 "perly.y" { (yyval.opval) = bind_match(IVAL((ps[(2) - (3)].val.i_tkval)), (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval), ((yyval.opval)->op_type == OP_NOT @@ -1072,14 +1071,14 @@ case 2: break; case 132: -#line 992 "perly.y" +#line 991 "perly.y" { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((ps[(2) - (2)].val.opval))); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 133: -#line 996 "perly.y" +#line 995 "perly.y" { (yyval.opval) = IF_MAD( newUNOP(OP_NULL, 0, (ps[(2) - (2)].val.opval)), (ps[(2) - (2)].val.opval) @@ -1089,21 +1088,21 @@ case 2: break; case 134: -#line 1003 "perly.y" +#line 1002 "perly.y" { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[(2) - (2)].val.opval))); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 135: -#line 1007 "perly.y" +#line 1006 "perly.y" { (yyval.opval) = newUNOP(OP_COMPLEMENT, 0, scalar((ps[(2) - (2)].val.opval))); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 136: -#line 1011 "perly.y" +#line 1010 "perly.y" { (yyval.opval) = newUNOP(OP_POSTINC, 0, mod(scalar((ps[(1) - (2)].val.opval)), OP_POSTINC)); TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),'o'); @@ -1111,7 +1110,7 @@ case 2: break; case 137: -#line 1016 "perly.y" +#line 1015 "perly.y" { (yyval.opval) = newUNOP(OP_POSTDEC, 0, mod(scalar((ps[(1) - (2)].val.opval)), OP_POSTDEC)); TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),'o'); @@ -1119,7 +1118,7 @@ case 2: break; case 138: -#line 1021 "perly.y" +#line 1020 "perly.y" { (yyval.opval) = newUNOP(OP_PREINC, 0, mod(scalar((ps[(2) - (2)].val.opval)), OP_PREINC)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); @@ -1127,7 +1126,7 @@ case 2: break; case 139: -#line 1026 "perly.y" +#line 1025 "perly.y" { (yyval.opval) = newUNOP(OP_PREDEC, 0, mod(scalar((ps[(2) - (2)].val.opval)), OP_PREDEC)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); @@ -1135,7 +1134,7 @@ case 2: break; case 140: -#line 1035 "perly.y" +#line 1034 "perly.y" { (yyval.opval) = newANONLIST((ps[(2) - (3)].val.opval)); TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'['); TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),']'); @@ -1143,7 +1142,7 @@ case 2: break; case 141: -#line 1040 "perly.y" +#line 1039 "perly.y" { (yyval.opval) = newANONLIST((OP*)NULL); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'['); TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),']'); @@ -1151,7 +1150,7 @@ case 2: break; case 142: -#line 1045 "perly.y" +#line 1044 "perly.y" { (yyval.opval) = newANONHASH((ps[(2) - (4)].val.opval)); TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'{'); TOKEN_GETMAD((ps[(3) - (4)].val.i_tkval),(yyval.opval),';'); @@ -1160,7 +1159,7 @@ case 2: break; case 143: -#line 1051 "perly.y" +#line 1050 "perly.y" { (yyval.opval) = newANONHASH((OP*)NULL); TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'{'); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),';'); @@ -1169,7 +1168,7 @@ case 2: break; case 144: -#line 1057 "perly.y" +#line 1056 "perly.y" { SvREFCNT_inc_simple_void(PL_compcv); (yyval.opval) = newANONATTRSUB((ps[(2) - (5)].val.ival), (ps[(3) - (5)].val.opval), (ps[(4) - (5)].val.opval), (ps[(5) - (5)].val.opval)); TOKEN_GETMAD((ps[(1) - (5)].val.i_tkval),(yyval.opval),'o'); @@ -1179,21 +1178,21 @@ case 2: break; case 145: -#line 1068 "perly.y" +#line 1067 "perly.y" { (yyval.opval) = dofile((ps[(2) - (2)].val.opval), IVAL((ps[(1) - (2)].val.i_tkval))); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 146: -#line 1072 "perly.y" +#line 1071 "perly.y" { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, scope((ps[(2) - (2)].val.opval))); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'D'); ;} break; case 147: -#line 1076 "perly.y" +#line 1075 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, @@ -1208,7 +1207,7 @@ case 2: break; case 148: -#line 1088 "perly.y" +#line 1087 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, append_elem(OP_LIST, @@ -1224,7 +1223,7 @@ case 2: break; case 149: -#line 1101 "perly.y" +#line 1100 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, scalar(newCVREF(0,scalar((ps[(2) - (4)].val.opval)))), (OP*)NULL)); dep(); @@ -1235,7 +1234,7 @@ case 2: break; case 150: -#line 1109 "perly.y" +#line 1108 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, (ps[(4) - (5)].val.opval), @@ -1247,7 +1246,7 @@ case 2: break; case 155: -#line 1125 "perly.y" +#line 1124 "perly.y" { (yyval.opval) = newCONDOP(0, (ps[(1) - (5)].val.opval), (ps[(3) - (5)].val.opval), (ps[(5) - (5)].val.opval)); TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'?'); TOKEN_GETMAD((ps[(4) - (5)].val.i_tkval),(yyval.opval),':'); @@ -1255,26 +1254,26 @@ case 2: break; case 156: -#line 1130 "perly.y" +#line 1129 "perly.y" { (yyval.opval) = newUNOP(OP_REFGEN, 0, mod((ps[(2) - (2)].val.opval),OP_REFGEN)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 157: -#line 1134 "perly.y" +#line 1133 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 158: -#line 1136 "perly.y" +#line 1135 "perly.y" { (yyval.opval) = localize((ps[(2) - (2)].val.opval),IVAL((ps[(1) - (2)].val.i_tkval))); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'k'); ;} break; case 159: -#line 1140 "perly.y" +#line 1139 "perly.y" { (yyval.opval) = sawparens(IF_MAD(newUNOP(OP_NULL,0,(ps[(2) - (3)].val.opval)), (ps[(2) - (3)].val.opval))); TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'('); TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),')'); @@ -1282,7 +1281,7 @@ case 2: break; case 160: -#line 1145 "perly.y" +#line 1144 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'('); TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),')'); @@ -1290,37 +1289,37 @@ case 2: break; case 161: -#line 1150 "perly.y" +#line 1149 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 162: -#line 1152 "perly.y" +#line 1151 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 163: -#line 1154 "perly.y" +#line 1153 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 164: -#line 1156 "perly.y" +#line 1155 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 165: -#line 1158 "perly.y" +#line 1157 "perly.y" { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((ps[(1) - (1)].val.opval), OP_AV2ARYLEN));;} break; case 166: -#line 1160 "perly.y" +#line 1159 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 167: -#line 1162 "perly.y" +#line 1161 "perly.y" { (yyval.opval) = prepend_elem(OP_ASLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_ASLICE, 0, @@ -1332,7 +1331,7 @@ case 2: break; case 168: -#line 1171 "perly.y" +#line 1170 "perly.y" { (yyval.opval) = prepend_elem(OP_HSLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_HSLICE, 0, @@ -1346,17 +1345,17 @@ case 2: break; case 169: -#line 1182 "perly.y" +#line 1181 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 170: -#line 1184 "perly.y" +#line 1183 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((ps[(1) - (1)].val.opval))); ;} break; case 171: -#line 1186 "perly.y" +#line 1185 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[(1) - (3)].val.opval))); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'('); TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),')'); @@ -1364,7 +1363,7 @@ case 2: break; case 172: -#line 1191 "perly.y" +#line 1190 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (ps[(3) - (4)].val.opval), scalar((ps[(1) - (4)].val.opval)))); @@ -1380,7 +1379,7 @@ case 2: break; case 173: -#line 1204 "perly.y" +#line 1203 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (ps[(3) - (3)].val.opval), scalar((ps[(2) - (3)].val.opval)))); TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'o'); @@ -1388,7 +1387,7 @@ case 2: break; case 174: -#line 1209 "perly.y" +#line 1208 "perly.y" { (yyval.opval) = newOP(IVAL((ps[(1) - (1)].val.i_tkval)), OPf_SPECIAL); PL_hints |= HINT_BLOCK_SCOPE; TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),'o'); @@ -1396,74 +1395,74 @@ case 2: break; case 175: -#line 1214 "perly.y" +#line 1213 "perly.y" { (yyval.opval) = newLOOPEX(IVAL((ps[(1) - (2)].val.i_tkval)),(ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 176: -#line 1218 "perly.y" +#line 1217 "perly.y" { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[(2) - (2)].val.opval))); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 177: -#line 1222 "perly.y" +#line 1221 "perly.y" { (yyval.opval) = newOP(IVAL((ps[(1) - (1)].val.i_tkval)), 0); TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),'o'); ;} break; case 178: -#line 1226 "perly.y" +#line 1225 "perly.y" { (yyval.opval) = newUNOP(IVAL((ps[(1) - (2)].val.i_tkval)), 0, (ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 179: -#line 1230 "perly.y" +#line 1229 "perly.y" { (yyval.opval) = newUNOP(IVAL((ps[(1) - (2)].val.i_tkval)), 0, (ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 180: -#line 1234 "perly.y" +#line 1233 "perly.y" { (yyval.opval) = newOP(OP_REQUIRE, (ps[(1) - (1)].val.i_tkval) ? OPf_SPECIAL : 0); TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),'o'); ;} break; case 181: -#line 1238 "perly.y" +#line 1237 "perly.y" { (yyval.opval) = newUNOP(OP_REQUIRE, (ps[(1) - (2)].val.i_tkval) ? OPf_SPECIAL : 0, (ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 182: -#line 1242 "perly.y" +#line 1241 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[(1) - (1)].val.opval))); ;} break; case 183: -#line 1244 "perly.y" +#line 1243 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (ps[(2) - (2)].val.opval), scalar((ps[(1) - (2)].val.opval)))); ;} break; case 184: -#line 1247 "perly.y" +#line 1246 "perly.y" { (yyval.opval) = newOP(IVAL((ps[(1) - (1)].val.i_tkval)), 0); TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),'o'); ;} break; case 185: -#line 1251 "perly.y" +#line 1250 "perly.y" { (yyval.opval) = newOP(IVAL((ps[(1) - (3)].val.i_tkval)), 0); TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'o'); TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'('); @@ -1472,13 +1471,13 @@ case 2: break; case 186: -#line 1257 "perly.y" +#line 1256 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[(1) - (1)].val.opval))); ;} break; case 187: -#line 1260 "perly.y" +#line 1259 "perly.y" { (yyval.opval) = (IVAL((ps[(1) - (3)].val.i_tkval)) == OP_NOT) ? newUNOP(IVAL((ps[(1) - (3)].val.i_tkval)), 0, newSVOP(OP_CONST, 0, newSViv(0))) : newOP(IVAL((ps[(1) - (3)].val.i_tkval)), OPf_SPECIAL); @@ -1490,7 +1489,7 @@ case 2: break; case 188: -#line 1269 "perly.y" +#line 1268 "perly.y" { (yyval.opval) = newUNOP(IVAL((ps[(1) - (4)].val.i_tkval)), 0, (ps[(3) - (4)].val.opval)); TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'o'); TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'('); @@ -1499,7 +1498,7 @@ case 2: break; case 189: -#line 1275 "perly.y" +#line 1274 "perly.y" { (yyval.opval) = pmruntime((ps[(1) - (4)].val.opval), (ps[(3) - (4)].val.opval), 1); TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'('); TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),')'); @@ -1507,7 +1506,7 @@ case 2: break; case 192: -#line 1282 "perly.y" +#line 1281 "perly.y" { (yyval.opval) = newLISTOP(OP_DIE, 0, newOP(OP_PUSHMARK, 0), newSVOP(OP_CONST, 0, newSVpvs("Unimplemented"))); @@ -1516,7 +1515,7 @@ case 2: break; case 194: -#line 1292 "perly.y" +#line 1291 "perly.y" { (yyval.opval) = my_attrs((ps[(2) - (3)].val.opval),(ps[(3) - (3)].val.opval)); DO_MAD( token_getmad((ps[(1) - (3)].val.i_tkval),(yyval.opval),'d'); @@ -1527,14 +1526,14 @@ case 2: break; case 195: -#line 1300 "perly.y" +#line 1299 "perly.y" { (yyval.opval) = localize((ps[(2) - (2)].val.opval),IVAL((ps[(1) - (2)].val.i_tkval))); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'d'); ;} break; case 196: -#line 1307 "perly.y" +#line 1306 "perly.y" { (yyval.opval) = sawparens((ps[(2) - (3)].val.opval)); TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'('); TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),')'); @@ -1542,7 +1541,7 @@ case 2: break; case 197: -#line 1312 "perly.y" +#line 1311 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'('); TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),')'); @@ -1550,42 +1549,42 @@ case 2: break; case 198: -#line 1317 "perly.y" +#line 1316 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 199: -#line 1319 "perly.y" +#line 1318 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 200: -#line 1321 "perly.y" +#line 1320 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 201: -#line 1326 "perly.y" +#line 1325 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; case 202: -#line 1328 "perly.y" +#line 1327 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 203: -#line 1332 "perly.y" +#line 1331 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; case 204: -#line 1334 "perly.y" +#line 1333 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 205: -#line 1336 "perly.y" +#line 1335 "perly.y" { #ifdef MAD OP* op = newNULLLIST(); @@ -1599,69 +1598,69 @@ case 2: break; case 206: -#line 1351 "perly.y" +#line 1350 "perly.y" { PL_parser->in_my = 0; (yyval.opval) = my((ps[(1) - (1)].val.opval)); ;} break; case 207: -#line 1355 "perly.y" +#line 1354 "perly.y" { (yyval.opval) = newCVREF(IVAL((ps[(1) - (2)].val.i_tkval)),(ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'&'); ;} break; case 208: -#line 1361 "perly.y" +#line 1360 "perly.y" { (yyval.opval) = newSVREF((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'$'); ;} break; case 209: -#line 1367 "perly.y" +#line 1366 "perly.y" { (yyval.opval) = newAVREF((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'@'); ;} break; case 210: -#line 1373 "perly.y" +#line 1372 "perly.y" { (yyval.opval) = newHVREF((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'%'); ;} break; case 211: -#line 1379 "perly.y" +#line 1378 "perly.y" { (yyval.opval) = newAVREF((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'l'); ;} break; case 212: -#line 1385 "perly.y" +#line 1384 "perly.y" { (yyval.opval) = newGVREF(0,(ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'*'); ;} break; case 213: -#line 1392 "perly.y" +#line 1391 "perly.y" { (yyval.opval) = scalar((ps[(1) - (1)].val.opval)); ;} break; case 214: -#line 1394 "perly.y" +#line 1393 "perly.y" { (yyval.opval) = scalar((ps[(1) - (1)].val.opval)); ;} break; case 215: -#line 1396 "perly.y" +#line 1395 "perly.y" { (yyval.opval) = scope((ps[(1) - (1)].val.opval)); ;} break; case 216: -#line 1399 "perly.y" +#line 1398 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; diff --git a/perly.tab b/perly.tab index 6d81e53..e5e975a 100644 --- a/perly.tab +++ b/perly.tab @@ -170,27 +170,27 @@ static const yytype_int16 yyrhs[] = static const yytype_uint16 yyrline[] = { 0, 141, 141, 147, 157, 161, 165, 171, 181, 186, - 187, 194, 204, 207, 208, 210, 212, 229, 245, 251, - 256, 258, 260, 264, 268, 272, 276, 281, 287, 288, - 292, 303, 311, 322, 325, 331, 332, 339, 352, 364, - 375, 385, 395, 427, 435, 445, 451, 452, 457, 460, - 464, 469, 473, 477, 483, 492, 496, 498, 500, 502, - 504, 509, 513, 519, 539, 540, 544, 557, 580, 586, - 591, 596, 606, 607, 612, 613, 617, 627, 631, 641, - 642, 651, 669, 668, 694, 693, 712, 716, 720, 724, - 728, 738, 747, 751, 756, 763, 772, 778, 784, 792, - 796, 803, 802, 813, 814, 818, 827, 832, 840, 847, - 854, 864, 873, 880, 889, 896, 902, 909, 919, 923, - 927, 933, 937, 941, 945, 949, 953, 957, 969, 973, - 977, 981, 991, 995, 1002, 1006, 1010, 1015, 1020, 1025, - 1034, 1039, 1044, 1050, 1056, 1067, 1071, 1075, 1087, 1100, - 1108, 1120, 1121, 1122, 1123, 1124, 1129, 1133, 1135, 1139, - 1144, 1149, 1151, 1153, 1155, 1157, 1159, 1161, 1170, 1181, - 1183, 1185, 1190, 1203, 1208, 1213, 1217, 1221, 1225, 1229, - 1233, 1237, 1241, 1243, 1246, 1250, 1256, 1259, 1268, 1274, - 1279, 1280, 1281, 1287, 1291, 1299, 1306, 1311, 1316, 1318, - 1320, 1325, 1327, 1332, 1333, 1335, 1350, 1354, 1360, 1366, - 1372, 1378, 1384, 1391, 1393, 1395, 1398 + 187, 194, 204, 207, 208, 210, 212, 229, 245, 250, + 255, 257, 259, 263, 267, 271, 275, 280, 286, 287, + 291, 302, 310, 321, 324, 330, 331, 338, 351, 363, + 374, 384, 394, 426, 434, 444, 450, 451, 456, 459, + 463, 468, 472, 476, 482, 491, 495, 497, 499, 501, + 503, 508, 512, 518, 538, 539, 543, 556, 579, 585, + 590, 595, 605, 606, 611, 612, 616, 626, 630, 640, + 641, 650, 668, 667, 693, 692, 711, 715, 719, 723, + 727, 737, 746, 750, 755, 762, 771, 777, 783, 791, + 795, 802, 801, 812, 813, 817, 826, 831, 839, 846, + 853, 863, 872, 879, 888, 895, 901, 908, 918, 922, + 926, 932, 936, 940, 944, 948, 952, 956, 968, 972, + 976, 980, 990, 994, 1001, 1005, 1009, 1014, 1019, 1024, + 1033, 1038, 1043, 1049, 1055, 1066, 1070, 1074, 1086, 1099, + 1107, 1119, 1120, 1121, 1122, 1123, 1128, 1132, 1134, 1138, + 1143, 1148, 1150, 1152, 1154, 1156, 1158, 1160, 1169, 1180, + 1182, 1184, 1189, 1202, 1207, 1212, 1216, 1220, 1224, 1228, + 1232, 1236, 1240, 1242, 1245, 1249, 1255, 1258, 1267, 1273, + 1278, 1279, 1280, 1286, 1290, 1298, 1305, 1310, 1315, 1317, + 1319, 1324, 1326, 1331, 1332, 1334, 1349, 1353, 1359, 1365, + 1371, 1377, 1383, 1390, 1392, 1394, 1397 }; #endif diff --git a/perly.y b/perly.y index dcb6114..edbcb19 100644 --- a/perly.y +++ b/perly.y @@ -246,8 +246,7 @@ line : label cond { $$ = newSTATEOP(0, NULL, newWHILEOP(0, 1, (LOOP*)(OP*)NULL, NOLINE, (OP*)NULL, $1, - (OP*)NULL, 0)); - TOKEN_GETMAD($1,((LISTOP*)$$)->op_first,'L'); } + (OP*)NULL, 0)); } | label PLUGSTMT { $$ = newSTATEOP(0, PVAL($1), $2); } ;