diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-07-04 09:13:17 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-15 22:44:55 -0700 |
commit | 4210d3f17cf9d854c0cbf0e1afb06e737174f8ea (patch) | |
tree | efc39119656264c3e86de28179261818b5c201e9 /perly.act | |
parent | 60ac52eb5d5157fbe18e603a2d72ef6249b62083 (diff) | |
download | perl-4210d3f17cf9d854c0cbf0e1afb06e737174f8ea.tar.gz |
Make ‘sub foo{}’ respect ‘our foo’
This commit switches all sub definitions, whether with ‘our’ or not,
to using S_force_ident_maybe_lex (formerly known as S_pending_ident).
This means that an unqualified (no our/my/state or package prefix)
‘sub foo’ declaration does a pad lookup, just like $foo.
It turns out that the vivification that I added to the then
S_pending_ident for CVs was unnecessary and actually buggy. We
*don’t* want to autovivify GVs for CVs, because they might be con-
stants or forward declarations, which are stored in a simpler form.
I also had to change the subname rule used by MYSUB in perly.y, since
it can now be fed a PRIVATEREF, which it does not expect. This may
prove to be temporary, but it keeps current tests passing.
Diffstat (limited to 'perly.act')
-rw-r--r-- | perly.act | 526 |
1 files changed, 263 insertions, 263 deletions
@@ -718,25 +718,25 @@ case 2: (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; - case 83: -#line 691 "perly.y" + case 84: +#line 692 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; - case 85: -#line 697 "perly.y" + case 86: +#line 698 "perly.y" { (yyval.opval) = (OP*)NULL; ;} break; - case 86: -#line 699 "perly.y" + case 87: +#line 700 "perly.y" { (yyval.opval) = (ps[(2) - (2)].val.opval); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),':'); ;} break; - case 87: -#line 703 "perly.y" + case 88: +#line 704 "perly.y" { (yyval.opval) = IF_MAD( newOP(OP_NULL, 0), (OP*)NULL @@ -745,15 +745,15 @@ case 2: ;} break; - case 88: -#line 713 "perly.y" + case 89: +#line 714 "perly.y" { (yyval.opval) = (ps[(2) - (2)].val.opval); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),':'); ;} break; - case 89: -#line 717 "perly.y" + case 90: +#line 718 "perly.y" { (yyval.opval) = IF_MAD( newOP(OP_NULL, 0), (OP*)NULL @@ -762,13 +762,13 @@ case 2: ;} break; - case 90: -#line 726 "perly.y" + case 91: +#line 727 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; - case 91: -#line 727 "perly.y" + case 92: +#line 728 "perly.y" { (yyval.opval) = IF_MAD( newOP(OP_NULL,0), (OP*)NULL @@ -778,29 +778,29 @@ case 2: ;} break; - case 92: -#line 738 "perly.y" + case 93: +#line 739 "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 93: -#line 742 "perly.y" + case 94: +#line 743 "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 94: -#line 746 "perly.y" + case 95: +#line 747 "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 96: -#line 754 "perly.y" + case 97: +#line 755 "perly.y" { #ifdef MAD OP* op = newNULLLIST(); @@ -812,8 +812,8 @@ case 2: ;} break; - case 97: -#line 764 "perly.y" + case 98: +#line 765 "perly.y" { OP* term = (ps[(3) - (3)].val.opval); DO_MAD( @@ -824,16 +824,16 @@ case 2: ;} break; - case 99: -#line 777 "perly.y" + case 100: +#line 778 "perly.y" { (yyval.opval) = convert(IVAL((ps[(1) - (3)].val.i_tkval)), OPf_STACKED, op_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'); ;} break; - case 100: -#line 782 "perly.y" + case 101: +#line 783 "perly.y" { (yyval.opval) = convert(IVAL((ps[(1) - (5)].val.i_tkval)), OPf_STACKED, op_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'); @@ -842,8 +842,8 @@ case 2: ;} break; - case 101: -#line 789 "perly.y" + case 102: +#line 790 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, op_prepend_elem(OP_LIST, scalar((ps[(1) - (6)].val.opval)), (ps[(5) - (6)].val.opval)), @@ -854,8 +854,8 @@ case 2: ;} break; - case 102: -#line 798 "perly.y" + case 103: +#line 799 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, scalar((ps[(1) - (3)].val.opval)), newUNOP(OP_METHOD, 0, (ps[(3) - (3)].val.opval)))); @@ -863,8 +863,8 @@ case 2: ;} break; - case 103: -#line 804 "perly.y" + case 104: +#line 805 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, op_prepend_elem(OP_LIST, (ps[(2) - (3)].val.opval), (ps[(3) - (3)].val.opval)), @@ -872,8 +872,8 @@ case 2: ;} break; - case 104: -#line 810 "perly.y" + case 105: +#line 811 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, op_prepend_elem(OP_LIST, (ps[(2) - (5)].val.opval), (ps[(4) - (5)].val.opval)), @@ -883,15 +883,15 @@ case 2: ;} break; - case 105: -#line 818 "perly.y" + case 106: +#line 819 "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 106: -#line 822 "perly.y" + case 107: +#line 823 "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),'('); @@ -899,22 +899,22 @@ case 2: ;} break; - case 107: -#line 828 "perly.y" + case 108: +#line 829 "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 108: -#line 831 "perly.y" + case 109: +#line 832 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, op_prepend_elem(OP_LIST, (ps[(4) - (5)].val.opval), (ps[(5) - (5)].val.opval)), (ps[(1) - (5)].val.opval))); ;} break; - case 111: -#line 846 "perly.y" + case 112: +#line 847 "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),'{'); @@ -923,16 +923,16 @@ case 2: ;} break; - case 112: -#line 853 "perly.y" + case 113: +#line 854 "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),']'); ;} break; - case 113: -#line 858 "perly.y" + case 114: +#line 859 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((ps[(1) - (5)].val.opval)),OP_RV2AV), scalar((ps[(4) - (5)].val.opval))); @@ -942,8 +942,8 @@ case 2: ;} break; - case 114: -#line 866 "perly.y" + case 115: +#line 867 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, ref(newAVREF((ps[(1) - (4)].val.opval)),OP_RV2AV), scalar((ps[(3) - (4)].val.opval))); @@ -952,8 +952,8 @@ case 2: ;} break; - case 115: -#line 873 "perly.y" + case 116: +#line 874 "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),'{'); @@ -962,8 +962,8 @@ case 2: ;} break; - case 116: -#line 880 "perly.y" + case 117: +#line 881 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((ps[(1) - (6)].val.opval)),OP_RV2HV), jmaybe((ps[(4) - (6)].val.opval))); @@ -975,8 +975,8 @@ case 2: ;} break; - case 117: -#line 890 "perly.y" + case 118: +#line 891 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, ref(newHVREF((ps[(1) - (5)].val.opval)),OP_RV2HV), jmaybe((ps[(3) - (5)].val.opval))); @@ -987,8 +987,8 @@ case 2: ;} break; - case 118: -#line 899 "perly.y" + case 119: +#line 900 "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'); @@ -997,8 +997,8 @@ case 2: ;} break; - case 119: -#line 906 "perly.y" + case 120: +#line 907 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[(4) - (5)].val.opval), newCVREF(0, scalar((ps[(1) - (5)].val.opval))))); @@ -1008,8 +1008,8 @@ case 2: ;} break; - case 120: -#line 915 "perly.y" + case 121: +#line 916 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[(3) - (4)].val.opval), newCVREF(0, scalar((ps[(1) - (4)].val.opval))))); @@ -1018,8 +1018,8 @@ case 2: ;} break; - case 121: -#line 922 "perly.y" + case 122: +#line 923 "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),'('); @@ -1027,8 +1027,8 @@ case 2: ;} break; - case 122: -#line 928 "perly.y" + case 123: +#line 929 "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),')'); @@ -1037,16 +1037,16 @@ case 2: ;} break; - case 123: -#line 935 "perly.y" + case 124: +#line 936 "perly.y" { (yyval.opval) = newSLICEOP(0, (ps[(3) - (4)].val.opval), (ps[(1) - (4)].val.opval)); TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'['); TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),']'); ;} break; - case 124: -#line 940 "perly.y" + case 125: +#line 941 "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),')'); @@ -1055,22 +1055,22 @@ case 2: ;} break; - case 125: -#line 950 "perly.y" + case 126: +#line 951 "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 126: -#line 954 "perly.y" + case 127: +#line 955 "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" + case 128: +#line 959 "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))); @@ -1078,50 +1078,50 @@ case 2: ;} break; - case 128: -#line 964 "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 129: -#line 968 "perly.y" +#line 965 "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 130: -#line 972 "perly.y" +#line 969 "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 131: -#line 976 "perly.y" +#line 973 "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 132: -#line 980 "perly.y" +#line 977 "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 133: -#line 984 "perly.y" +#line 981 "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 134: -#line 988 "perly.y" +#line 985 "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 135: +#line 989 "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({ @@ -1135,29 +1135,29 @@ case 2: ;} break; - case 135: -#line 1000 "perly.y" + case 136: +#line 1001 "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 136: -#line 1004 "perly.y" + case 137: +#line 1005 "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 137: -#line 1008 "perly.y" + case 138: +#line 1009 "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 138: -#line 1012 "perly.y" + case 139: +#line 1013 "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 @@ -1166,15 +1166,15 @@ case 2: ;} break; - case 139: -#line 1022 "perly.y" + case 140: +#line 1023 "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 140: -#line 1026 "perly.y" + case 141: +#line 1027 "perly.y" { (yyval.opval) = IF_MAD( newUNOP(OP_NULL, 0, (ps[(2) - (2)].val.opval)), (ps[(2) - (2)].val.opval) @@ -1183,70 +1183,70 @@ case 2: ;} break; - case 141: -#line 1033 "perly.y" + case 142: +#line 1034 "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 142: -#line 1037 "perly.y" + case 143: +#line 1038 "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 143: -#line 1041 "perly.y" + case 144: +#line 1042 "perly.y" { (yyval.opval) = newUNOP(OP_POSTINC, 0, op_lvalue(scalar((ps[(1) - (2)].val.opval)), OP_POSTINC)); TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; - case 144: -#line 1046 "perly.y" + case 145: +#line 1047 "perly.y" { (yyval.opval) = newUNOP(OP_POSTDEC, 0, op_lvalue(scalar((ps[(1) - (2)].val.opval)), OP_POSTDEC)); TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; - case 145: -#line 1051 "perly.y" + case 146: +#line 1052 "perly.y" { (yyval.opval) = newUNOP(OP_PREINC, 0, op_lvalue(scalar((ps[(2) - (2)].val.opval)), OP_PREINC)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; - case 146: -#line 1056 "perly.y" + case 147: +#line 1057 "perly.y" { (yyval.opval) = newUNOP(OP_PREDEC, 0, op_lvalue(scalar((ps[(2) - (2)].val.opval)), OP_PREDEC)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; - case 147: -#line 1065 "perly.y" + case 148: +#line 1066 "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),']'); ;} break; - case 148: -#line 1070 "perly.y" + case 149: +#line 1071 "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),']'); ;} break; - case 149: -#line 1075 "perly.y" + case 150: +#line 1076 "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),';'); @@ -1254,8 +1254,8 @@ case 2: ;} break; - case 150: -#line 1081 "perly.y" + case 151: +#line 1082 "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),';'); @@ -1263,8 +1263,8 @@ case 2: ;} break; - case 151: -#line 1087 "perly.y" + case 152: +#line 1088 "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'); @@ -1273,22 +1273,22 @@ case 2: ;} break; - case 152: -#line 1098 "perly.y" + case 153: +#line 1099 "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 153: -#line 1102 "perly.y" + case 154: +#line 1103 "perly.y" { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, op_scope((ps[(2) - (2)].val.opval))); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'D'); ;} break; - case 154: -#line 1106 "perly.y" + case 155: +#line 1107 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, op_prepend_elem(OP_LIST, @@ -1302,8 +1302,8 @@ case 2: ;} break; - case 155: -#line 1118 "perly.y" + case 156: +#line 1119 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, op_append_elem(OP_LIST, @@ -1318,8 +1318,8 @@ case 2: ;} break; - case 156: -#line 1131 "perly.y" + case 157: +#line 1132 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, op_prepend_elem(OP_LIST, scalar(newCVREF(0,scalar((ps[(2) - (4)].val.opval)))), (OP*)NULL)); dep(); @@ -1329,8 +1329,8 @@ case 2: ;} break; - case 157: -#line 1139 "perly.y" + case 158: +#line 1140 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, op_prepend_elem(OP_LIST, (ps[(4) - (5)].val.opval), @@ -1341,86 +1341,86 @@ case 2: ;} break; - case 162: -#line 1155 "perly.y" + case 163: +#line 1156 "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),':'); ;} break; - case 163: -#line 1160 "perly.y" + case 164: +#line 1161 "perly.y" { (yyval.opval) = newUNOP(OP_REFGEN, 0, op_lvalue((ps[(2) - (2)].val.opval),OP_REFGEN)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; - case 164: -#line 1164 "perly.y" + case 165: +#line 1165 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; - case 165: -#line 1166 "perly.y" + case 166: +#line 1167 "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 166: -#line 1170 "perly.y" + case 167: +#line 1171 "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),')'); ;} break; - case 167: -#line 1175 "perly.y" + case 168: +#line 1176 "perly.y" { (yyval.opval) = IF_MAD(newUNOP(OP_NULL,0,(ps[(1) - (1)].val.opval)), (ps[(1) - (1)].val.opval)); ;} break; - case 168: -#line 1177 "perly.y" + case 169: +#line 1178 "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),')'); ;} break; - case 169: -#line 1182 "perly.y" - { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} - break; - case 170: -#line 1184 "perly.y" +#line 1183 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 171: -#line 1186 "perly.y" +#line 1185 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 172: -#line 1188 "perly.y" +#line 1187 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 173: -#line 1190 "perly.y" - { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((ps[(1) - (1)].val.opval), OP_AV2ARYLEN));;} +#line 1189 "perly.y" + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 174: -#line 1192 "perly.y" - { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} +#line 1191 "perly.y" + { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((ps[(1) - (1)].val.opval), OP_AV2ARYLEN));;} break; case 175: -#line 1194 "perly.y" +#line 1193 "perly.y" + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} + break; + + case 176: +#line 1195 "perly.y" { (yyval.opval) = op_prepend_elem(OP_ASLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_ASLICE, 0, @@ -1431,8 +1431,8 @@ case 2: ;} break; - case 176: -#line 1203 "perly.y" + case 177: +#line 1204 "perly.y" { (yyval.opval) = op_prepend_elem(OP_HSLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_HSLICE, 0, @@ -1445,26 +1445,26 @@ case 2: ;} break; - case 177: -#line 1214 "perly.y" + case 178: +#line 1215 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; - case 178: -#line 1216 "perly.y" + case 179: +#line 1217 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((ps[(1) - (1)].val.opval))); ;} break; - case 179: -#line 1218 "perly.y" + case 180: +#line 1219 "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),')'); ;} break; - case 180: -#line 1223 "perly.y" + case 181: +#line 1224 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[(3) - (4)].val.opval), scalar((ps[(1) - (4)].val.opval)))); @@ -1479,91 +1479,91 @@ case 2: ;} break; - case 181: -#line 1236 "perly.y" + case 182: +#line 1237 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_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'); ;} break; - case 182: -#line 1241 "perly.y" + case 183: +#line 1242 "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'); ;} break; - case 183: -#line 1246 "perly.y" + case 184: +#line 1247 "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 184: -#line 1250 "perly.y" + case 185: +#line 1251 "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 185: -#line 1254 "perly.y" + case 186: +#line 1255 "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 186: -#line 1258 "perly.y" + case 187: +#line 1259 "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 187: -#line 1262 "perly.y" + case 188: +#line 1263 "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 188: -#line 1266 "perly.y" + case 189: +#line 1267 "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 189: -#line 1270 "perly.y" + case 190: +#line 1271 "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 190: -#line 1274 "perly.y" + case 191: +#line 1275 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[(1) - (1)].val.opval))); ;} break; - case 191: -#line 1276 "perly.y" + case 192: +#line 1277 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, (ps[(2) - (2)].val.opval), scalar((ps[(1) - (2)].val.opval)))); ;} break; - case 192: -#line 1279 "perly.y" + case 193: +#line 1280 "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 193: -#line 1283 "perly.y" + case 194: +#line 1284 "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),'('); @@ -1571,27 +1571,27 @@ case 2: ;} break; - case 194: -#line 1289 "perly.y" + case 195: +#line 1290 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; - case 195: -#line 1291 "perly.y" + case 196: +#line 1292 "perly.y" { (yyval.opval) = (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),')'); ;} break; - case 196: -#line 1296 "perly.y" + case 197: +#line 1297 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[(1) - (1)].val.opval))); ;} break; - case 197: -#line 1299 "perly.y" + case 198: +#line 1300 "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); @@ -1602,8 +1602,8 @@ case 2: ;} break; - case 198: -#line 1308 "perly.y" + case 199: +#line 1309 "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),'('); @@ -1611,8 +1611,8 @@ case 2: ;} break; - case 199: -#line 1314 "perly.y" + case 200: +#line 1315 "perly.y" { if ( (ps[(1) - (1)].val.opval)->op_type != OP_TRANS && (ps[(1) - (1)].val.opval)->op_type != OP_TRANSR @@ -1625,16 +1625,16 @@ case 2: ;} break; - case 200: -#line 1325 "perly.y" + case 201: +#line 1326 "perly.y" { (yyval.opval) = pmruntime((ps[(1) - (5)].val.opval), (ps[(4) - (5)].val.opval), 1, (ps[(2) - (5)].val.ival)); TOKEN_GETMAD((ps[(3) - (5)].val.i_tkval),(yyval.opval),'('); TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),')'); ;} break; - case 203: -#line 1332 "perly.y" + case 204: +#line 1333 "perly.y" { (yyval.opval) = newLISTOP(OP_DIE, 0, newOP(OP_PUSHMARK, 0), newSVOP(OP_CONST, 0, newSVpvs("Unimplemented"))); @@ -1642,8 +1642,8 @@ case 2: ;} break; - case 205: -#line 1342 "perly.y" + case 206: +#line 1343 "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'); @@ -1653,128 +1653,128 @@ case 2: ;} break; - case 206: -#line 1350 "perly.y" + case 207: +#line 1351 "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 207: -#line 1357 "perly.y" + case 208: +#line 1358 "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),')'); ;} break; - case 208: -#line 1362 "perly.y" + case 209: +#line 1363 "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),')'); ;} break; - case 209: -#line 1367 "perly.y" - { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} - break; - case 210: -#line 1369 "perly.y" +#line 1368 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 211: -#line 1371 "perly.y" +#line 1370 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 212: -#line 1376 "perly.y" - { (yyval.opval) = (OP*)NULL; ;} +#line 1372 "perly.y" + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 213: -#line 1378 "perly.y" - { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} +#line 1377 "perly.y" + { (yyval.opval) = (OP*)NULL; ;} break; case 214: -#line 1382 "perly.y" - { (yyval.opval) = (OP*)NULL; ;} +#line 1379 "perly.y" + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 215: -#line 1384 "perly.y" - { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} +#line 1383 "perly.y" + { (yyval.opval) = (OP*)NULL; ;} break; case 216: -#line 1390 "perly.y" - { PL_parser->in_my = 0; (yyval.opval) = my((ps[(1) - (1)].val.opval)); ;} +#line 1385 "perly.y" + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 217: -#line 1394 "perly.y" +#line 1391 "perly.y" + { PL_parser->in_my = 0; (yyval.opval) = my((ps[(1) - (1)].val.opval)); ;} + break; + + case 218: +#line 1395 "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 218: -#line 1400 "perly.y" + case 219: +#line 1401 "perly.y" { (yyval.opval) = newSVREF((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'$'); ;} break; - case 219: -#line 1406 "perly.y" + case 220: +#line 1407 "perly.y" { (yyval.opval) = newAVREF((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'@'); ;} break; - case 220: -#line 1412 "perly.y" + case 221: +#line 1413 "perly.y" { (yyval.opval) = newHVREF((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'%'); ;} break; - case 221: -#line 1418 "perly.y" + case 222: +#line 1419 "perly.y" { (yyval.opval) = newAVREF((ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'l'); ;} break; - case 222: -#line 1424 "perly.y" + case 223: +#line 1425 "perly.y" { (yyval.opval) = newGVREF(0,(ps[(2) - (2)].val.opval)); TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'*'); ;} break; - case 223: -#line 1431 "perly.y" + case 224: +#line 1432 "perly.y" { (yyval.opval) = scalar((ps[(1) - (1)].val.opval)); ;} break; - case 224: -#line 1433 "perly.y" + case 225: +#line 1434 "perly.y" { (yyval.opval) = scalar((ps[(1) - (1)].val.opval)); ;} break; - case 225: -#line 1435 "perly.y" + case 226: +#line 1436 "perly.y" { (yyval.opval) = op_scope((ps[(1) - (1)].val.opval)); ;} break; - case 226: -#line 1438 "perly.y" + case 227: +#line 1439 "perly.y" { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; @@ -1785,6 +1785,6 @@ case 2: /* Generated from: - * 3e01d5213d0f6a4dd26b90cfb22baf8eaf3c89d8ae0025fdc9e06ec1f871e826 perly.y + * d37e00fcfb1737df464a95af8f4a92c2518ee5b69cd05ffc577f253313aa81c3 perly.y * 4a3ced51fe6585f6ec59e65e1ffd74bc976c498b0e6992eaab337219fee72e51 regen_perly.pl * ex: set ro: */ |