From: Dave Mitchell Date: Wed, 13 Dec 2006 00:16:18 +0000 (+0000) Subject: fixup some ival/opval type changes from perly.y/madly.y merger X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=30994c59813138744bd35d43a2330cafe5893149;p=p5sagit%2Fp5-mst-13.2.git fixup some ival/opval type changes from perly.y/madly.y merger p4raw-id: //depot/perl@29542 --- diff --git a/perly.act b/perly.act index 6e35f50..80d4e96 100644 --- a/perly.act +++ b/perly.act @@ -466,34 +466,36 @@ case 2: token_free((yyvsp[(1) - (4)].i_tkval)); #else newFORM((yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].opval), (yyvsp[(4) - (4)].opval)); + (yyval.opval) = Nullop; #endif ;} break; case 62: -#line 518 "perly.y" +#line 519 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 63: -#line 519 "perly.y" +#line 520 "perly.y" { (yyval.opval) = Nullop; ;} break; case 64: -#line 524 "perly.y" +#line 525 "perly.y" { SvREFCNT_inc(PL_compcv); #ifdef MAD (yyval.opval) = newMYSUB((yyvsp[(2) - (6)].ival), (yyvsp[(3) - (6)].opval), (yyvsp[(4) - (6)].opval), (yyvsp[(5) - (6)].opval), (yyvsp[(6) - (6)].opval)); token_getmad((yyvsp[(1) - (6)].i_tkval),(yyval.opval),'d'); #else newMYSUB((yyvsp[(2) - (6)].ival), (yyvsp[(3) - (6)].opval), (yyvsp[(4) - (6)].opval), (yyvsp[(5) - (6)].opval), (yyvsp[(6) - (6)].opval)); + (yyval.opval) = Nullop; #endif ;} break; case 65: -#line 536 "perly.y" +#line 538 "perly.y" { SvREFCNT_inc(PL_compcv); #ifdef MAD OP* o = newSVOP(OP_ANONCODE, 0, @@ -514,25 +516,25 @@ case 2: break; case 66: -#line 556 "perly.y" +#line 558 "perly.y" { (yyval.ival) = start_subparse(FALSE, 0); SAVEFREESV(PL_compcv); ;} break; case 67: -#line 562 "perly.y" +#line 564 "perly.y" { (yyval.ival) = start_subparse(FALSE, CVf_ANON); SAVEFREESV(PL_compcv); ;} break; case 68: -#line 567 "perly.y" +#line 569 "perly.y" { (yyval.ival) = start_subparse(TRUE, 0); SAVEFREESV(PL_compcv); ;} break; case 69: -#line 572 "perly.y" +#line 574 "perly.y" { const char *const name = SvPV_nolen_const(((SVOP*)(yyvsp[(1) - (1)].opval))->op_sv); if (strEQ(name, "BEGIN") || strEQ(name, "END") || strEQ(name, "INIT") || strEQ(name, "CHECK") @@ -542,24 +544,24 @@ case 2: break; case 70: -#line 582 "perly.y" +#line 584 "perly.y" { (yyval.opval) = Nullop; ;} break; case 72: -#line 588 "perly.y" +#line 590 "perly.y" { (yyval.opval) = Nullop; ;} break; case 73: -#line 590 "perly.y" +#line 592 "perly.y" { (yyval.opval) = (yyvsp[(2) - (2)].opval); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),':'); ;} break; case 74: -#line 594 "perly.y" +#line 596 "perly.y" { (yyval.opval) = IF_MAD( newOP(OP_NULL, 0), Nullop @@ -569,14 +571,14 @@ case 2: break; case 75: -#line 604 "perly.y" +#line 606 "perly.y" { (yyval.opval) = (yyvsp[(2) - (2)].opval); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),':'); ;} break; case 76: -#line 608 "perly.y" +#line 610 "perly.y" { (yyval.opval) = IF_MAD( newOP(OP_NULL, 0), Nullop @@ -586,12 +588,12 @@ case 2: break; case 77: -#line 617 "perly.y" +#line 619 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 78: -#line 618 "perly.y" +#line 620 "perly.y" { (yyval.opval) = IF_MAD( newOP(OP_NULL,0), Nullop @@ -602,7 +604,7 @@ case 2: break; case 79: -#line 628 "perly.y" +#line 630 "perly.y" { #ifdef MAD (yyval.opval) = package((yyvsp[(2) - (3)].opval)); @@ -610,17 +612,18 @@ case 2: token_getmad((yyvsp[(3) - (3)].i_tkval),(yyval.opval),';'); #else package((yyvsp[(2) - (3)].opval)); + (yyval.opval) = Nullop; #endif ;} break; case 80: -#line 640 "perly.y" +#line 643 "perly.y" { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ ;} break; case 81: -#line 642 "perly.y" +#line 645 "perly.y" { SvREFCNT_inc(PL_compcv); #ifdef MAD (yyval.opval) = utilize(IVAL((yyvsp[(1) - (7)].i_tkval)), (yyvsp[(2) - (7)].ival), (yyvsp[(4) - (7)].opval), (yyvsp[(5) - (7)].opval), (yyvsp[(6) - (7)].opval)); @@ -630,33 +633,34 @@ case 2: append_madprops(newMADPROP('!', MAD_PV, "", 0), (yyval.opval), 0); #else utilize(IVAL((yyvsp[(1) - (7)].i_tkval)), (yyvsp[(2) - (7)].ival), (yyvsp[(4) - (7)].opval), (yyvsp[(5) - (7)].opval), (yyvsp[(6) - (7)].opval)); + (yyval.opval) = Nullop; #endif ;} break; case 82: -#line 657 "perly.y" +#line 661 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 83: -#line 661 "perly.y" +#line 665 "perly.y" { (yyval.opval) = newLOGOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 84: -#line 665 "perly.y" +#line 669 "perly.y" { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 86: -#line 673 "perly.y" +#line 677 "perly.y" { #ifdef MAD OP* op = newNULLLIST(); @@ -669,7 +673,7 @@ case 2: break; case 87: -#line 683 "perly.y" +#line 687 "perly.y" { DO_MAD( (yyvsp[(3) - (3)].opval) = newUNOP(OP_NULL, 0, (yyvsp[(3) - (3)].opval)); @@ -680,7 +684,7 @@ case 2: break; case 89: -#line 695 "perly.y" +#line 699 "perly.y" { (yyval.opval) = convert(IVAL((yyvsp[(1) - (3)].i_tkval)), OPf_STACKED, prepend_elem(OP_LIST, newGVREF(IVAL((yyvsp[(1) - (3)].i_tkval)),(yyvsp[(2) - (3)].opval)), (yyvsp[(3) - (3)].opval)) ); TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'o'); @@ -688,7 +692,7 @@ case 2: break; case 90: -#line 700 "perly.y" +#line 704 "perly.y" { (yyval.opval) = convert(IVAL((yyvsp[(1) - (5)].i_tkval)), OPf_STACKED, prepend_elem(OP_LIST, newGVREF(IVAL((yyvsp[(1) - (5)].i_tkval)),(yyvsp[(3) - (5)].opval)), (yyvsp[(4) - (5)].opval)) ); TOKEN_GETMAD((yyvsp[(1) - (5)].i_tkval),(yyval.opval),'o'); @@ -698,7 +702,7 @@ case 2: break; case 91: -#line 707 "perly.y" +#line 711 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, scalar((yyvsp[(1) - (6)].opval)), (yyvsp[(5) - (6)].opval)), @@ -710,7 +714,7 @@ case 2: break; case 92: -#line 716 "perly.y" +#line 720 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, scalar((yyvsp[(1) - (3)].opval)), newUNOP(OP_METHOD, 0, (yyvsp[(3) - (3)].opval)))); @@ -719,7 +723,7 @@ case 2: break; case 93: -#line 722 "perly.y" +#line 726 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, (yyvsp[(2) - (3)].opval), (yyvsp[(3) - (3)].opval)), @@ -728,7 +732,7 @@ case 2: break; case 94: -#line 728 "perly.y" +#line 732 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, (yyvsp[(2) - (5)].opval), (yyvsp[(4) - (5)].opval)), @@ -739,14 +743,14 @@ case 2: break; case 95: -#line 736 "perly.y" +#line 740 "perly.y" { (yyval.opval) = convert(IVAL((yyvsp[(1) - (2)].i_tkval)), 0, (yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 96: -#line 740 "perly.y" +#line 744 "perly.y" { (yyval.opval) = convert(IVAL((yyvsp[(1) - (4)].i_tkval)), 0, (yyvsp[(3) - (4)].opval)); TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'o'); TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'('); @@ -755,13 +759,13 @@ case 2: break; case 97: -#line 746 "perly.y" +#line 750 "perly.y" { SvREFCNT_inc(PL_compcv); (yyvsp[(3) - (3)].opval) = newANONATTRSUB((yyvsp[(2) - (3)].ival), 0, Nullop, (yyvsp[(3) - (3)].opval)); ;} break; case 98: -#line 749 "perly.y" +#line 753 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, (yyvsp[(3) - (5)].opval), (yyvsp[(5) - (5)].opval)), (yyvsp[(1) - (5)].opval))); @@ -769,7 +773,7 @@ case 2: break; case 101: -#line 764 "perly.y" +#line 768 "perly.y" { (yyval.opval) = newBINOP(OP_GELEM, 0, (yyvsp[(1) - (5)].opval), scalar((yyvsp[(3) - (5)].opval))); PL_expect = XOPERATOR; TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'{'); @@ -779,7 +783,7 @@ case 2: break; case 102: -#line 771 "perly.y" +#line 775 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((yyvsp[(1) - (4)].opval)), scalar((yyvsp[(3) - (4)].opval))); TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'['); TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),']'); @@ -787,7 +791,7 @@ case 2: break; case 103: -#line 776 "perly.y" +#line 780 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((yyvsp[(1) - (5)].opval)),OP_RV2AV), scalar((yyvsp[(4) - (5)].opval))); @@ -798,7 +802,7 @@ case 2: break; case 104: -#line 784 "perly.y" +#line 788 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((yyvsp[(1) - (4)].opval)),OP_RV2AV), scalar((yyvsp[(3) - (4)].opval))); @@ -808,7 +812,7 @@ case 2: break; case 105: -#line 791 "perly.y" +#line 795 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((yyvsp[(1) - (5)].opval)), jmaybe((yyvsp[(3) - (5)].opval))); PL_expect = XOPERATOR; TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'{'); @@ -818,7 +822,7 @@ case 2: break; case 106: -#line 798 "perly.y" +#line 802 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((yyvsp[(1) - (6)].opval)),OP_RV2HV), jmaybe((yyvsp[(4) - (6)].opval))); @@ -831,7 +835,7 @@ case 2: break; case 107: -#line 808 "perly.y" +#line 812 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((yyvsp[(1) - (5)].opval)),OP_RV2HV), jmaybe((yyvsp[(3) - (5)].opval))); @@ -843,7 +847,7 @@ case 2: break; case 108: -#line 817 "perly.y" +#line 821 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, newCVREF(0, scalar((yyvsp[(1) - (4)].opval)))); TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'a'); @@ -853,7 +857,7 @@ case 2: break; case 109: -#line 824 "perly.y" +#line 828 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (yyvsp[(4) - (5)].opval), newCVREF(0, scalar((yyvsp[(1) - (5)].opval))))); @@ -864,7 +868,7 @@ case 2: break; case 110: -#line 833 "perly.y" +#line 837 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (yyvsp[(3) - (4)].opval), newCVREF(0, scalar((yyvsp[(1) - (4)].opval))))); @@ -874,7 +878,7 @@ case 2: break; case 111: -#line 840 "perly.y" +#line 844 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, newCVREF(0, scalar((yyvsp[(1) - (3)].opval)))); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'('); @@ -883,7 +887,7 @@ case 2: break; case 112: -#line 846 "perly.y" +#line 850 "perly.y" { (yyval.opval) = newSLICEOP(0, (yyvsp[(5) - (6)].opval), (yyvsp[(2) - (6)].opval)); TOKEN_GETMAD((yyvsp[(1) - (6)].i_tkval),(yyval.opval),'('); TOKEN_GETMAD((yyvsp[(3) - (6)].i_tkval),(yyval.opval),')'); @@ -893,7 +897,7 @@ case 2: break; case 113: -#line 853 "perly.y" +#line 857 "perly.y" { (yyval.opval) = newSLICEOP(0, (yyvsp[(4) - (5)].opval), Nullop); TOKEN_GETMAD((yyvsp[(1) - (5)].i_tkval),(yyval.opval),'('); TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),')'); @@ -903,21 +907,21 @@ case 2: break; case 114: -#line 863 "perly.y" +#line 867 "perly.y" { (yyval.opval) = newASSIGNOP(OPf_STACKED, (yyvsp[(1) - (3)].opval), IVAL((yyvsp[(2) - (3)].i_tkval)), (yyvsp[(3) - (3)].opval)); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 115: -#line 867 "perly.y" +#line 871 "perly.y" { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 116: -#line 871 "perly.y" +#line 875 "perly.y" { if (IVAL((yyvsp[(2) - (3)].i_tkval)) != OP_REPEAT) scalar((yyvsp[(1) - (3)].opval)); (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, (yyvsp[(1) - (3)].opval), scalar((yyvsp[(3) - (3)].opval))); @@ -926,49 +930,49 @@ case 2: break; case 117: -#line 877 "perly.y" +#line 881 "perly.y" { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 118: -#line 881 "perly.y" +#line 885 "perly.y" { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 119: -#line 885 "perly.y" +#line 889 "perly.y" { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 120: -#line 889 "perly.y" +#line 893 "perly.y" { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 121: -#line 893 "perly.y" +#line 897 "perly.y" { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 122: -#line 897 "perly.y" +#line 901 "perly.y" { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 123: -#line 901 "perly.y" +#line 905 "perly.y" { (yyval.opval) = newRANGE(IVAL((yyvsp[(2) - (3)].i_tkval)), scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); DO_MAD( @@ -983,28 +987,28 @@ case 2: break; case 124: -#line 913 "perly.y" +#line 917 "perly.y" { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 125: -#line 917 "perly.y" +#line 921 "perly.y" { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 126: -#line 921 "perly.y" +#line 925 "perly.y" { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); ;} break; case 127: -#line 925 "perly.y" +#line 929 "perly.y" { (yyval.opval) = bind_match(IVAL((yyvsp[(2) - (3)].i_tkval)), (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval), ((yyval.opval)->op_type == OP_NOT @@ -1014,14 +1018,14 @@ case 2: break; case 128: -#line 935 "perly.y" +#line 939 "perly.y" { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((yyvsp[(2) - (2)].opval))); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 129: -#line 939 "perly.y" +#line 943 "perly.y" { (yyval.opval) = IF_MAD( newUNOP(OP_NULL, 0, (yyvsp[(2) - (2)].opval)), (yyvsp[(2) - (2)].opval) @@ -1031,21 +1035,21 @@ case 2: break; case 130: -#line 946 "perly.y" +#line 950 "perly.y" { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[(2) - (2)].opval))); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 131: -#line 950 "perly.y" +#line 954 "perly.y" { (yyval.opval) = newUNOP(OP_COMPLEMENT, 0, scalar((yyvsp[(2) - (2)].opval))); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 132: -#line 954 "perly.y" +#line 958 "perly.y" { (yyval.opval) = newUNOP(OP_POSTINC, 0, mod(scalar((yyvsp[(1) - (2)].opval)), OP_POSTINC)); TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),'o'); @@ -1053,7 +1057,7 @@ case 2: break; case 133: -#line 959 "perly.y" +#line 963 "perly.y" { (yyval.opval) = newUNOP(OP_POSTDEC, 0, mod(scalar((yyvsp[(1) - (2)].opval)), OP_POSTDEC)); TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),'o'); @@ -1061,7 +1065,7 @@ case 2: break; case 134: -#line 964 "perly.y" +#line 968 "perly.y" { (yyval.opval) = newUNOP(OP_PREINC, 0, mod(scalar((yyvsp[(2) - (2)].opval)), OP_PREINC)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); @@ -1069,7 +1073,7 @@ case 2: break; case 135: -#line 969 "perly.y" +#line 973 "perly.y" { (yyval.opval) = newUNOP(OP_PREDEC, 0, mod(scalar((yyvsp[(2) - (2)].opval)), OP_PREDEC)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); @@ -1077,7 +1081,7 @@ case 2: break; case 136: -#line 978 "perly.y" +#line 982 "perly.y" { (yyval.opval) = newANONLIST((yyvsp[(2) - (3)].opval)); TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'['); TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),']'); @@ -1085,7 +1089,7 @@ case 2: break; case 137: -#line 983 "perly.y" +#line 987 "perly.y" { (yyval.opval) = newANONLIST(Nullop); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'['); TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),']'); @@ -1093,7 +1097,7 @@ case 2: break; case 138: -#line 988 "perly.y" +#line 992 "perly.y" { (yyval.opval) = newANONHASH((yyvsp[(2) - (4)].opval)); TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'{'); TOKEN_GETMAD((yyvsp[(3) - (4)].i_tkval),(yyval.opval),';'); @@ -1102,7 +1106,7 @@ case 2: break; case 139: -#line 994 "perly.y" +#line 998 "perly.y" { (yyval.opval) = newANONHASH(Nullop); TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'{'); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),';'); @@ -1111,7 +1115,7 @@ case 2: break; case 140: -#line 1000 "perly.y" +#line 1004 "perly.y" { SvREFCNT_inc(PL_compcv); (yyval.opval) = newANONATTRSUB((yyvsp[(2) - (5)].ival), (yyvsp[(3) - (5)].opval), (yyvsp[(4) - (5)].opval), (yyvsp[(5) - (5)].opval)); TOKEN_GETMAD((yyvsp[(1) - (5)].i_tkval),(yyval.opval),'o'); @@ -1121,21 +1125,21 @@ case 2: break; case 141: -#line 1011 "perly.y" +#line 1015 "perly.y" { (yyval.opval) = dofile((yyvsp[(2) - (2)].opval), IVAL((yyvsp[(1) - (2)].i_tkval))); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 142: -#line 1015 "perly.y" +#line 1019 "perly.y" { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, scope((yyvsp[(2) - (2)].opval))); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'D'); ;} break; case 143: -#line 1019 "perly.y" +#line 1023 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, @@ -1150,7 +1154,7 @@ case 2: break; case 144: -#line 1031 "perly.y" +#line 1035 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, append_elem(OP_LIST, @@ -1166,7 +1170,7 @@ case 2: break; case 145: -#line 1044 "perly.y" +#line 1048 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, scalar(newCVREF(0,scalar((yyvsp[(2) - (4)].opval)))), Nullop)); dep(); @@ -1177,7 +1181,7 @@ case 2: break; case 146: -#line 1052 "perly.y" +#line 1056 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, (yyvsp[(4) - (5)].opval), @@ -1189,7 +1193,7 @@ case 2: break; case 151: -#line 1068 "perly.y" +#line 1072 "perly.y" { (yyval.opval) = newCONDOP(0, (yyvsp[(1) - (5)].opval), (yyvsp[(3) - (5)].opval), (yyvsp[(5) - (5)].opval)); TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'?'); TOKEN_GETMAD((yyvsp[(4) - (5)].i_tkval),(yyval.opval),':'); @@ -1197,26 +1201,26 @@ case 2: break; case 152: -#line 1073 "perly.y" +#line 1077 "perly.y" { (yyval.opval) = newUNOP(OP_REFGEN, 0, mod((yyvsp[(2) - (2)].opval),OP_REFGEN)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 153: -#line 1077 "perly.y" +#line 1081 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 154: -#line 1079 "perly.y" +#line 1083 "perly.y" { (yyval.opval) = localize((yyvsp[(2) - (2)].opval),IVAL((yyvsp[(1) - (2)].i_tkval))); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'d'); ;} break; case 155: -#line 1083 "perly.y" +#line 1087 "perly.y" { (yyval.opval) = sawparens(IF_MAD(newUNOP(OP_NULL,0,(yyvsp[(2) - (3)].opval)), (yyvsp[(2) - (3)].opval))); TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'('); TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),')'); @@ -1224,7 +1228,7 @@ case 2: break; case 156: -#line 1088 "perly.y" +#line 1092 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'('); TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),')'); @@ -1232,37 +1236,37 @@ case 2: break; case 157: -#line 1093 "perly.y" +#line 1097 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 158: -#line 1095 "perly.y" +#line 1099 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 159: -#line 1097 "perly.y" +#line 1101 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 160: -#line 1099 "perly.y" +#line 1103 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 161: -#line 1101 "perly.y" +#line 1105 "perly.y" { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((yyvsp[(1) - (1)].opval), OP_AV2ARYLEN));;} break; case 162: -#line 1103 "perly.y" +#line 1107 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 163: -#line 1105 "perly.y" +#line 1109 "perly.y" { (yyval.opval) = prepend_elem(OP_ASLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_ASLICE, 0, @@ -1274,7 +1278,7 @@ case 2: break; case 164: -#line 1114 "perly.y" +#line 1118 "perly.y" { (yyval.opval) = prepend_elem(OP_HSLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_HSLICE, 0, @@ -1288,17 +1292,17 @@ case 2: break; case 165: -#line 1125 "perly.y" +#line 1129 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 166: -#line 1127 "perly.y" +#line 1131 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((yyvsp[(1) - (1)].opval))); ;} break; case 167: -#line 1129 "perly.y" +#line 1133 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[(1) - (3)].opval))); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'('); TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),')'); @@ -1306,7 +1310,7 @@ case 2: break; case 168: -#line 1134 "perly.y" +#line 1138 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (yyvsp[(3) - (4)].opval), scalar((yyvsp[(1) - (4)].opval)))); @@ -1322,7 +1326,7 @@ case 2: break; case 169: -#line 1147 "perly.y" +#line 1151 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (yyvsp[(3) - (3)].opval), scalar((yyvsp[(2) - (3)].opval)))); TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'o'); @@ -1330,7 +1334,7 @@ case 2: break; case 170: -#line 1152 "perly.y" +#line 1156 "perly.y" { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (1)].i_tkval)), OPf_SPECIAL); PL_hints |= HINT_BLOCK_SCOPE; TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),'o'); @@ -1338,70 +1342,70 @@ case 2: break; case 171: -#line 1157 "perly.y" +#line 1161 "perly.y" { (yyval.opval) = newLOOPEX(IVAL((yyvsp[(1) - (2)].i_tkval)),(yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 172: -#line 1161 "perly.y" +#line 1165 "perly.y" { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[(2) - (2)].opval))); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 173: -#line 1165 "perly.y" +#line 1169 "perly.y" { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (1)].i_tkval)), 0); TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),'o'); ;} break; case 174: -#line 1169 "perly.y" +#line 1173 "perly.y" { (yyval.opval) = newUNOP(IVAL((yyvsp[(1) - (2)].i_tkval)), 0, (yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 175: -#line 1173 "perly.y" +#line 1177 "perly.y" { (yyval.opval) = newUNOP(IVAL((yyvsp[(1) - (2)].i_tkval)), 0, (yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); ;} break; case 176: -#line 1177 "perly.y" +#line 1181 "perly.y" { (yyval.opval) = newOP(OP_REQUIRE, (yyvsp[(1) - (1)].i_tkval) ? OPf_SPECIAL : 0); ;} break; case 177: -#line 1179 "perly.y" +#line 1183 "perly.y" { (yyval.opval) = newUNOP(OP_REQUIRE, (yyvsp[(1) - (2)].i_tkval) ? OPf_SPECIAL : 0, (yyvsp[(2) - (2)].opval)); ;} break; case 178: -#line 1181 "perly.y" +#line 1185 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[(1) - (1)].opval))); ;} break; case 179: -#line 1183 "perly.y" +#line 1187 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, (yyvsp[(2) - (2)].opval), scalar((yyvsp[(1) - (2)].opval)))); ;} break; case 180: -#line 1186 "perly.y" +#line 1190 "perly.y" { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (1)].i_tkval)), 0); TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),'o'); ;} break; case 181: -#line 1190 "perly.y" +#line 1194 "perly.y" { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (3)].i_tkval)), 0); TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'o'); TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'('); @@ -1410,13 +1414,13 @@ case 2: break; case 182: -#line 1196 "perly.y" +#line 1200 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[(1) - (1)].opval))); ;} break; case 183: -#line 1199 "perly.y" +#line 1203 "perly.y" { (yyval.opval) = (IVAL((yyvsp[(1) - (3)].i_tkval)) == OP_NOT) ? newUNOP(IVAL((yyvsp[(1) - (3)].i_tkval)), 0, newSVOP(OP_CONST, 0, newSViv(0))) : newOP(IVAL((yyvsp[(1) - (3)].i_tkval)), OPf_SPECIAL); @@ -1428,7 +1432,7 @@ case 2: break; case 184: -#line 1208 "perly.y" +#line 1212 "perly.y" { (yyval.opval) = newUNOP(IVAL((yyvsp[(1) - (4)].i_tkval)), 0, (yyvsp[(3) - (4)].opval)); TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'o'); TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'('); @@ -1437,7 +1441,7 @@ case 2: break; case 185: -#line 1214 "perly.y" +#line 1218 "perly.y" { (yyval.opval) = pmruntime((yyvsp[(1) - (4)].opval), (yyvsp[(3) - (4)].opval), 1); TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'('); TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),')'); @@ -1445,7 +1449,7 @@ case 2: break; case 188: -#line 1224 "perly.y" +#line 1228 "perly.y" { (yyval.opval) = my_attrs((yyvsp[(2) - (3)].opval),(yyvsp[(3) - (3)].opval)); DO_MAD( token_getmad((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'d'); @@ -1456,14 +1460,14 @@ case 2: break; case 189: -#line 1232 "perly.y" +#line 1236 "perly.y" { (yyval.opval) = localize((yyvsp[(2) - (2)].opval),IVAL((yyvsp[(1) - (2)].i_tkval))); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'d'); ;} break; case 190: -#line 1239 "perly.y" +#line 1243 "perly.y" { (yyval.opval) = sawparens((yyvsp[(2) - (3)].opval)); TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'('); TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),')'); @@ -1471,7 +1475,7 @@ case 2: break; case 191: -#line 1244 "perly.y" +#line 1248 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'('); TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),')'); @@ -1479,42 +1483,42 @@ case 2: break; case 192: -#line 1249 "perly.y" +#line 1253 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 193: -#line 1251 "perly.y" +#line 1255 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 194: -#line 1253 "perly.y" +#line 1257 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 195: -#line 1258 "perly.y" +#line 1262 "perly.y" { (yyval.opval) = Nullop; ;} break; case 196: -#line 1260 "perly.y" +#line 1264 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 197: -#line 1264 "perly.y" +#line 1268 "perly.y" { (yyval.opval) = Nullop; ;} break; case 198: -#line 1266 "perly.y" +#line 1270 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 199: -#line 1268 "perly.y" +#line 1272 "perly.y" { #ifdef MAD OP* op = newNULLLIST(); @@ -1528,69 +1532,69 @@ case 2: break; case 200: -#line 1283 "perly.y" +#line 1287 "perly.y" { PL_in_my = 0; (yyval.opval) = my((yyvsp[(1) - (1)].opval)); ;} break; case 201: -#line 1287 "perly.y" +#line 1291 "perly.y" { (yyval.opval) = newCVREF(IVAL((yyvsp[(1) - (2)].i_tkval)),(yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'&'); ;} break; case 202: -#line 1293 "perly.y" +#line 1297 "perly.y" { (yyval.opval) = newSVREF((yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'$'); ;} break; case 203: -#line 1299 "perly.y" +#line 1303 "perly.y" { (yyval.opval) = newAVREF((yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'@'); ;} break; case 204: -#line 1305 "perly.y" +#line 1309 "perly.y" { (yyval.opval) = newHVREF((yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'%'); ;} break; case 205: -#line 1311 "perly.y" +#line 1315 "perly.y" { (yyval.opval) = newAVREF((yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'l'); ;} break; case 206: -#line 1317 "perly.y" +#line 1321 "perly.y" { (yyval.opval) = newGVREF(0,(yyvsp[(2) - (2)].opval)); TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'*'); ;} break; case 207: -#line 1324 "perly.y" +#line 1328 "perly.y" { (yyval.opval) = scalar((yyvsp[(1) - (1)].opval)); ;} break; case 208: -#line 1326 "perly.y" +#line 1330 "perly.y" { (yyval.opval) = scalar((yyvsp[(1) - (1)].opval)); ;} break; case 209: -#line 1328 "perly.y" +#line 1332 "perly.y" { (yyval.opval) = scope((yyvsp[(1) - (1)].opval)); ;} break; case 210: -#line 1331 "perly.y" +#line 1335 "perly.y" { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; diff --git a/perly.tab b/perly.tab index e20aef9..9d974ce 100644 --- a/perly.tab +++ b/perly.tab @@ -173,22 +173,22 @@ static const yytype_uint16 yyrline[] = 293, 304, 307, 313, 314, 321, 334, 346, 357, 367, 377, 413, 421, 431, 437, 438, 443, 446, 450, 455, 459, 463, 469, 478, 482, 484, 486, 488, 490, 495, - 499, 505, 518, 519, 523, 535, 556, 562, 567, 572, - 582, 583, 588, 589, 593, 603, 607, 617, 618, 627, - 640, 639, 656, 660, 664, 668, 672, 682, 690, 694, - 699, 706, 715, 721, 727, 735, 739, 746, 745, 756, - 757, 761, 770, 775, 783, 790, 797, 807, 816, 823, - 832, 839, 845, 852, 862, 866, 870, 876, 880, 884, - 888, 892, 896, 900, 912, 916, 920, 924, 934, 938, - 945, 949, 953, 958, 963, 968, 977, 982, 987, 993, - 999, 1010, 1014, 1018, 1030, 1043, 1051, 1063, 1064, 1065, - 1066, 1067, 1072, 1076, 1078, 1082, 1087, 1092, 1094, 1096, - 1098, 1100, 1102, 1104, 1113, 1124, 1126, 1128, 1133, 1146, - 1151, 1156, 1160, 1164, 1168, 1172, 1176, 1178, 1180, 1182, - 1185, 1189, 1195, 1198, 1207, 1213, 1218, 1219, 1223, 1231, - 1238, 1243, 1248, 1250, 1252, 1257, 1259, 1264, 1265, 1267, - 1282, 1286, 1292, 1298, 1304, 1310, 1316, 1323, 1325, 1327, - 1330 + 499, 505, 519, 520, 524, 537, 558, 564, 569, 574, + 584, 585, 590, 591, 595, 605, 609, 619, 620, 629, + 643, 642, 660, 664, 668, 672, 676, 686, 694, 698, + 703, 710, 719, 725, 731, 739, 743, 750, 749, 760, + 761, 765, 774, 779, 787, 794, 801, 811, 820, 827, + 836, 843, 849, 856, 866, 870, 874, 880, 884, 888, + 892, 896, 900, 904, 916, 920, 924, 928, 938, 942, + 949, 953, 957, 962, 967, 972, 981, 986, 991, 997, + 1003, 1014, 1018, 1022, 1034, 1047, 1055, 1067, 1068, 1069, + 1070, 1071, 1076, 1080, 1082, 1086, 1091, 1096, 1098, 1100, + 1102, 1104, 1106, 1108, 1117, 1128, 1130, 1132, 1137, 1150, + 1155, 1160, 1164, 1168, 1172, 1176, 1180, 1182, 1184, 1186, + 1189, 1193, 1199, 1202, 1211, 1217, 1222, 1223, 1227, 1235, + 1242, 1247, 1252, 1254, 1256, 1261, 1263, 1268, 1269, 1271, + 1286, 1290, 1296, 1302, 1308, 1314, 1320, 1327, 1329, 1331, + 1334 }; #endif diff --git a/perly.y b/perly.y index af62341..dd70c2b 100644 --- a/perly.y +++ b/perly.y @@ -511,6 +511,7 @@ format : FORMAT startformsub formname block token_free($1); #else newFORM($2, $3, $4); + $$ = Nullop; #endif } ; @@ -527,6 +528,7 @@ mysubrout: MYSUB startsub subname proto subattrlist subbody token_getmad($1,$$,'d'); #else newMYSUB($2, $3, $4, $5, $6); + $$ = Nullop; #endif } ; @@ -632,6 +634,7 @@ package : PACKAGE WORD ';' token_getmad($3,$$,';'); #else package($2); + $$ = Nullop; #endif } ; @@ -648,6 +651,7 @@ use : USE startsub append_madprops(newMADPROP('!', MAD_PV, "", 0), $$, 0); #else utilize(IVAL($1), $2, $4, $5, $6); + $$ = Nullop; #endif } ;