summaryrefslogtreecommitdiff
path: root/perly.act
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-03 09:23:15 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-15 22:45:05 -0700
commit6d5c21479838db78689e08afd075ef4e9100ef0d (patch)
tree44db00c7bbbae895f1e3208ffcd3a43b719373cb /perly.act
parentfead5351141134064bc3069932e04930bd96eb0e (diff)
downloadperl-6d5c21479838db78689e08afd075ef4e9100ef0d.tar.gz
Clone my subs on scope entry
The pad slot for a my sub now holds a stub with a prototype CV attached to it by proto magic. The prototype is cloned on scope entry. The stub in the pad is used when cloning, so any code that references the sub before scope entry will be able to see that stub become defined, making these behave similarly: our $x; BEGIN { $x = \&foo } sub foo { } our $x; my sub foo { } BEGIN { $x = \&foo } Constants are currently not cloned, but that may cause bugs in pad_push. I’ll have to look into that. On scope exit, lexical CVs go through leave_scope’s SAVEt_CLEARSV sec- tion, like lexical variables. If the sub is referenced elsewhere, it is abandoned, and its proto magic is stolen and attached to a new stub stored in the pad. If the sub is not referenced elsewhere, it is undefined via cv_undef. To clone my subs on scope entry, we create a sequence of introcv and clonecv ops. See the huge comment in block_end that explains why we need two separate ops for each CV. To allow my subs to be defined in inner subs (my sub foo; sub { sub foo {} }), pad_add_name_pvn and S_pad_findlex now upgrade the entry for a my sub to a CV to begin with, so that fake entries added to pads (fake entries are those that reference outer pads) can share the same CV. Otherwise newMYSUB would have to add the CV to every pad that closes over the ‘my sub’ declaration. newMYSUB no longer throws away the initial value replacing it with a new one. Prototypes are not currently visible to sub calls at compile time, because the lexer sees the empty stub. A future commit will solve that. When I added name heks to CV’s I made mistakes in a few places, by not turning on the CVf_NAMED flag, or by not clearing the field when free- ing the hek. Those code paths were not exercised enough by state subs, so the problems did not show up till now. So this commit fixes those, too. One of the tests in lexsub.t, involving foreach loops, was incorrect, and has been fixed. Another test has been added to the end for a par- ticular case of state subs closing over my subs that I broke when ini- tially trying to get sibling my subs to close over each other, before I had separate introcv and clonecv ops.
Diffstat (limited to 'perly.act')
-rw-r--r--perly.act372
1 files changed, 187 insertions, 185 deletions
diff --git a/perly.act b/perly.act
index df6d833a60..064bd8c7ad 100644
--- a/perly.act
+++ b/perly.act
@@ -253,9 +253,11 @@ case 2:
else
/* State subs inside anonymous subs need to be
clonable themselves. */
- /* XXX This will need adjustment for state subs
- inside my subs. */
- if (CvANON(CvOUTSIDE(PL_compcv)))
+ if (CvANON(CvOUTSIDE(PL_compcv))
+ || CvCLONE(CvOUTSIDE(PL_compcv))
+ || !PadnameIsSTATE(PadlistNAMESARRAY(CvPADLIST(
+ CvOUTSIDE(PL_compcv)
+ ))[(ps[(2) - (3)].val.opval)->op_targ]))
CvCLONE_on(PL_compcv);
PL_parser->in_my = 0;
PL_parser->in_my_stash = NULL;
@@ -263,7 +265,7 @@ case 2:
break;
case 31:
-#line 338 "perly.y"
+#line 340 "perly.y"
{
SvREFCNT_inc_simple_void(PL_compcv);
#ifdef MAD
@@ -294,7 +296,7 @@ case 2:
break;
case 32:
-#line 366 "perly.y"
+#line 368 "perly.y"
{
/* Unimplemented "my sub foo { }" */
SvREFCNT_inc_simple_void(PL_compcv);
@@ -309,7 +311,7 @@ case 2:
break;
case 33:
-#line 378 "perly.y"
+#line 380 "perly.y"
{
#ifdef MAD
(yyval.opval) = package((ps[(3) - (4)].val.opval));
@@ -327,12 +329,12 @@ case 2:
break;
case 34:
-#line 393 "perly.y"
+#line 395 "perly.y"
{ CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ ;}
break;
case 35:
-#line 395 "perly.y"
+#line 397 "perly.y"
{
SvREFCNT_inc_simple_void(PL_compcv);
#ifdef MAD
@@ -350,7 +352,7 @@ case 2:
break;
case 36:
-#line 410 "perly.y"
+#line 412 "perly.y"
{
(yyval.opval) = block_end((ps[(3) - (7)].val.ival),
newCONDOP(0, (ps[(4) - (7)].val.opval), op_scope((ps[(6) - (7)].val.opval)), (ps[(7) - (7)].val.opval)));
@@ -362,7 +364,7 @@ case 2:
break;
case 37:
-#line 419 "perly.y"
+#line 421 "perly.y"
{
(yyval.opval) = block_end((ps[(3) - (7)].val.ival),
newCONDOP(0, (ps[(4) - (7)].val.opval), op_scope((ps[(6) - (7)].val.opval)), (ps[(7) - (7)].val.opval)));
@@ -374,7 +376,7 @@ case 2:
break;
case 38:
-#line 428 "perly.y"
+#line 430 "perly.y"
{
const PADOFFSET offset = pad_findmy_pvs("$_", 0);
(yyval.opval) = block_end((ps[(3) - (6)].val.ival),
@@ -388,17 +390,17 @@ case 2:
break;
case 39:
-#line 439 "perly.y"
+#line 441 "perly.y"
{ (yyval.opval) = block_end((ps[(3) - (6)].val.ival), newWHENOP((ps[(4) - (6)].val.opval), op_scope((ps[(6) - (6)].val.opval)))); ;}
break;
case 40:
-#line 441 "perly.y"
+#line 443 "perly.y"
{ (yyval.opval) = newWHENOP(0, op_scope((ps[(2) - (2)].val.opval))); ;}
break;
case 41:
-#line 443 "perly.y"
+#line 445 "perly.y"
{
(yyval.opval) = block_end((ps[(3) - (8)].val.ival),
newWHILEOP(0, 1, (LOOP*)(OP*)NULL,
@@ -411,7 +413,7 @@ case 2:
break;
case 42:
-#line 453 "perly.y"
+#line 455 "perly.y"
{
(yyval.opval) = block_end((ps[(3) - (8)].val.ival),
newWHILEOP(0, 1, (LOOP*)(OP*)NULL,
@@ -424,7 +426,7 @@ case 2:
break;
case 43:
-#line 464 "perly.y"
+#line 466 "perly.y"
{
OP *initop = IF_MAD((ps[(4) - (11)].val.opval) ? (ps[(4) - (11)].val.opval) : newOP(OP_NULL, 0), (ps[(4) - (11)].val.opval));
OP *forop = newWHILEOP(0, 1, (LOOP*)(OP*)NULL,
@@ -447,7 +449,7 @@ case 2:
break;
case 44:
-#line 484 "perly.y"
+#line 486 "perly.y"
{
(yyval.opval) = block_end((ps[(3) - (9)].val.ival), newFOROP(0, (ps[(4) - (9)].val.opval), (ps[(6) - (9)].val.opval), (ps[(8) - (9)].val.opval), (ps[(9) - (9)].val.opval)));
TOKEN_GETMAD((ps[(1) - (9)].val.i_tkval),(yyval.opval),'W');
@@ -459,7 +461,7 @@ case 2:
break;
case 45:
-#line 493 "perly.y"
+#line 495 "perly.y"
{
(yyval.opval) = block_end((ps[(4) - (8)].val.ival), newFOROP(0,
op_lvalue((ps[(2) - (8)].val.opval), OP_ENTERLOOP), (ps[(5) - (8)].val.opval), (ps[(7) - (8)].val.opval), (ps[(8) - (8)].val.opval)));
@@ -471,7 +473,7 @@ case 2:
break;
case 46:
-#line 502 "perly.y"
+#line 504 "perly.y"
{
(yyval.opval) = block_end((ps[(3) - (7)].val.ival),
newFOROP(0, (OP*)NULL, (ps[(4) - (7)].val.opval), (ps[(6) - (7)].val.opval), (ps[(7) - (7)].val.opval)));
@@ -483,7 +485,7 @@ case 2:
break;
case 47:
-#line 511 "perly.y"
+#line 513 "perly.y"
{
/* a block is a loop that happens once */
(yyval.opval) = newWHILEOP(0, 1, (LOOP*)(OP*)NULL,
@@ -492,7 +494,7 @@ case 2:
break;
case 48:
-#line 517 "perly.y"
+#line 519 "perly.y"
{
package((ps[(3) - (5)].val.opval));
if ((ps[(2) - (5)].val.opval)) {
@@ -502,7 +504,7 @@ case 2:
break;
case 49:
-#line 524 "perly.y"
+#line 526 "perly.y"
{
/* a block is a loop that happens once */
(yyval.opval) = newWHILEOP(0, 1, (LOOP*)(OP*)NULL,
@@ -515,7 +517,7 @@ case 2:
break;
case 50:
-#line 534 "perly.y"
+#line 536 "perly.y"
{
PL_parser->expect = XSTATE;
(yyval.opval) = (ps[(1) - (2)].val.opval);
@@ -524,7 +526,7 @@ case 2:
break;
case 51:
-#line 540 "perly.y"
+#line 542 "perly.y"
{
PL_parser->expect = XSTATE;
(yyval.opval) = IF_MAD(newOP(OP_NULL, 0), (OP*)NULL);
@@ -534,7 +536,7 @@ case 2:
break;
case 52:
-#line 550 "perly.y"
+#line 552 "perly.y"
{ OP *list;
if ((ps[(2) - (2)].val.opval)) {
OP *term = (ps[(2) - (2)].val.opval);
@@ -558,55 +560,55 @@ case 2:
break;
case 53:
-#line 573 "perly.y"
+#line 575 "perly.y"
{ (yyval.opval) = NULL; ;}
break;
case 54:
-#line 575 "perly.y"
+#line 577 "perly.y"
{ (yyval.opval) = op_unscope((ps[(2) - (3)].val.opval)); ;}
break;
case 55:
-#line 580 "perly.y"
+#line 582 "perly.y"
{ (yyval.opval) = (OP*)NULL; ;}
break;
case 56:
-#line 582 "perly.y"
+#line 584 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 57:
-#line 584 "perly.y"
+#line 586 "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 58:
-#line 588 "perly.y"
+#line 590 "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 59:
-#line 592 "perly.y"
+#line 594 "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 60:
-#line 596 "perly.y"
+#line 598 "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 61:
-#line 600 "perly.y"
+#line 602 "perly.y"
{ (yyval.opval) = newFOROP(0, (OP*)NULL, (ps[(3) - (3)].val.opval), (ps[(1) - (3)].val.opval), (OP*)NULL);
TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'w');
PL_parser->copline = (line_t)IVAL((ps[(2) - (3)].val.i_tkval));
@@ -614,17 +616,17 @@ case 2:
break;
case 62:
-#line 605 "perly.y"
+#line 607 "perly.y"
{ (yyval.opval) = newWHENOP((ps[(3) - (3)].val.opval), op_scope((ps[(1) - (3)].val.opval))); ;}
break;
case 63:
-#line 610 "perly.y"
+#line 612 "perly.y"
{ (yyval.opval) = (OP*)NULL; ;}
break;
case 64:
-#line 612 "perly.y"
+#line 614 "perly.y"
{
((ps[(2) - (2)].val.opval))->op_flags |= OPf_PARENS;
(yyval.opval) = op_scope((ps[(2) - (2)].val.opval));
@@ -633,7 +635,7 @@ case 2:
break;
case 65:
-#line 618 "perly.y"
+#line 620 "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)),
@@ -646,12 +648,12 @@ case 2:
break;
case 66:
-#line 631 "perly.y"
+#line 633 "perly.y"
{ (yyval.opval) = (OP*)NULL; ;}
break;
case 67:
-#line 633 "perly.y"
+#line 635 "perly.y"
{
(yyval.opval) = op_scope((ps[(2) - (2)].val.opval));
TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o');
@@ -659,91 +661,91 @@ case 2:
break;
case 68:
-#line 641 "perly.y"
+#line 643 "perly.y"
{ (yyval.ival) = (PL_min_intro_pending &&
PL_max_intro_pending >= PL_min_intro_pending);
intro_my(); ;}
break;
case 69:
-#line 647 "perly.y"
+#line 649 "perly.y"
{ (yyval.opval) = (OP*)NULL; ;}
break;
case 71:
-#line 653 "perly.y"
+#line 655 "perly.y"
{ YYSTYPE tmplval;
(void)scan_num("1", &tmplval);
(yyval.opval) = tmplval.opval; ;}
break;
case 73:
-#line 661 "perly.y"
+#line 663 "perly.y"
{ (yyval.opval) = invert(scalar((ps[(1) - (1)].val.opval))); ;}
break;
case 74:
-#line 666 "perly.y"
+#line 668 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); intro_my(); ;}
break;
case 75:
-#line 670 "perly.y"
+#line 672 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); intro_my(); ;}
break;
case 76:
-#line 674 "perly.y"
+#line 676 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); intro_my(); ;}
break;
case 77:
-#line 677 "perly.y"
+#line 679 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 78:
-#line 678 "perly.y"
+#line 680 "perly.y"
{ (yyval.opval) = (OP*)NULL; ;}
break;
case 79:
-#line 682 "perly.y"
+#line 684 "perly.y"
{ (yyval.ival) = start_subparse(FALSE, 0);
SAVEFREESV(PL_compcv); ;}
break;
case 80:
-#line 688 "perly.y"
+#line 690 "perly.y"
{ (yyval.ival) = start_subparse(FALSE, CVf_ANON);
SAVEFREESV(PL_compcv); ;}
break;
case 81:
-#line 693 "perly.y"
+#line 695 "perly.y"
{ (yyval.ival) = start_subparse(TRUE, 0);
SAVEFREESV(PL_compcv); ;}
break;
case 84:
-#line 704 "perly.y"
+#line 706 "perly.y"
{ (yyval.opval) = (OP*)NULL; ;}
break;
case 86:
-#line 710 "perly.y"
+#line 712 "perly.y"
{ (yyval.opval) = (OP*)NULL; ;}
break;
case 87:
-#line 712 "perly.y"
+#line 714 "perly.y"
{ (yyval.opval) = (ps[(2) - (2)].val.opval);
TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),':');
;}
break;
case 88:
-#line 716 "perly.y"
+#line 718 "perly.y"
{ (yyval.opval) = IF_MAD(
newOP(OP_NULL, 0),
(OP*)NULL
@@ -753,14 +755,14 @@ case 2:
break;
case 89:
-#line 726 "perly.y"
+#line 728 "perly.y"
{ (yyval.opval) = (ps[(2) - (2)].val.opval);
TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),':');
;}
break;
case 90:
-#line 730 "perly.y"
+#line 732 "perly.y"
{ (yyval.opval) = IF_MAD(
newOP(OP_NULL, 0),
(OP*)NULL
@@ -770,12 +772,12 @@ case 2:
break;
case 91:
-#line 739 "perly.y"
+#line 741 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 92:
-#line 740 "perly.y"
+#line 742 "perly.y"
{ (yyval.opval) = IF_MAD(
newOP(OP_NULL,0),
(OP*)NULL
@@ -786,28 +788,28 @@ case 2:
break;
case 93:
-#line 751 "perly.y"
+#line 753 "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 94:
-#line 755 "perly.y"
+#line 757 "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 95:
-#line 759 "perly.y"
+#line 761 "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 97:
-#line 767 "perly.y"
+#line 769 "perly.y"
{
#ifdef MAD
OP* op = newNULLLIST();
@@ -820,7 +822,7 @@ case 2:
break;
case 98:
-#line 777 "perly.y"
+#line 779 "perly.y"
{
OP* term = (ps[(3) - (3)].val.opval);
DO_MAD(
@@ -832,7 +834,7 @@ case 2:
break;
case 100:
-#line 790 "perly.y"
+#line 792 "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');
@@ -840,7 +842,7 @@ case 2:
break;
case 101:
-#line 795 "perly.y"
+#line 797 "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');
@@ -850,7 +852,7 @@ case 2:
break;
case 102:
-#line 802 "perly.y"
+#line 804 "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)),
@@ -862,7 +864,7 @@ case 2:
break;
case 103:
-#line 811 "perly.y"
+#line 813 "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))));
@@ -871,7 +873,7 @@ case 2:
break;
case 104:
-#line 817 "perly.y"
+#line 819 "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)),
@@ -880,7 +882,7 @@ case 2:
break;
case 105:
-#line 823 "perly.y"
+#line 825 "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)),
@@ -891,14 +893,14 @@ case 2:
break;
case 106:
-#line 831 "perly.y"
+#line 833 "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 107:
-#line 835 "perly.y"
+#line 837 "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),'(');
@@ -907,13 +909,13 @@ case 2:
break;
case 108:
-#line 841 "perly.y"
+#line 843 "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 109:
-#line 844 "perly.y"
+#line 846 "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)));
@@ -921,7 +923,7 @@ case 2:
break;
case 112:
-#line 859 "perly.y"
+#line 861 "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),'{');
@@ -931,7 +933,7 @@ case 2:
break;
case 113:
-#line 866 "perly.y"
+#line 868 "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),']');
@@ -939,7 +941,7 @@ case 2:
break;
case 114:
-#line 871 "perly.y"
+#line 873 "perly.y"
{ (yyval.opval) = newBINOP(OP_AELEM, 0,
ref(newAVREF((ps[(1) - (5)].val.opval)),OP_RV2AV),
scalar((ps[(4) - (5)].val.opval)));
@@ -950,7 +952,7 @@ case 2:
break;
case 115:
-#line 879 "perly.y"
+#line 881 "perly.y"
{ (yyval.opval) = newBINOP(OP_AELEM, 0,
ref(newAVREF((ps[(1) - (4)].val.opval)),OP_RV2AV),
scalar((ps[(3) - (4)].val.opval)));
@@ -960,7 +962,7 @@ case 2:
break;
case 116:
-#line 886 "perly.y"
+#line 888 "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),'{');
@@ -970,7 +972,7 @@ case 2:
break;
case 117:
-#line 893 "perly.y"
+#line 895 "perly.y"
{ (yyval.opval) = newBINOP(OP_HELEM, 0,
ref(newHVREF((ps[(1) - (6)].val.opval)),OP_RV2HV),
jmaybe((ps[(4) - (6)].val.opval)));
@@ -983,7 +985,7 @@ case 2:
break;
case 118:
-#line 903 "perly.y"
+#line 905 "perly.y"
{ (yyval.opval) = newBINOP(OP_HELEM, 0,
ref(newHVREF((ps[(1) - (5)].val.opval)),OP_RV2HV),
jmaybe((ps[(3) - (5)].val.opval)));
@@ -995,7 +997,7 @@ case 2:
break;
case 119:
-#line 912 "perly.y"
+#line 914 "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');
@@ -1005,7 +1007,7 @@ case 2:
break;
case 120:
-#line 919 "perly.y"
+#line 921 "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)))));
@@ -1016,7 +1018,7 @@ case 2:
break;
case 121:
-#line 928 "perly.y"
+#line 930 "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)))));
@@ -1026,7 +1028,7 @@ case 2:
break;
case 122:
-#line 935 "perly.y"
+#line 937 "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),'(');
@@ -1035,7 +1037,7 @@ case 2:
break;
case 123:
-#line 941 "perly.y"
+#line 943 "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),')');
@@ -1045,7 +1047,7 @@ case 2:
break;
case 124:
-#line 948 "perly.y"
+#line 950 "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),']');
@@ -1053,7 +1055,7 @@ case 2:
break;
case 125:
-#line 953 "perly.y"
+#line 955 "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),')');
@@ -1063,21 +1065,21 @@ case 2:
break;
case 126:
-#line 963 "perly.y"
+#line 965 "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 127:
-#line 967 "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 128:
-#line 971 "perly.y"
+#line 973 "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)));
@@ -1086,49 +1088,49 @@ case 2:
break;
case 129:
-#line 977 "perly.y"
+#line 979 "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 981 "perly.y"
+#line 983 "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 985 "perly.y"
+#line 987 "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 989 "perly.y"
+#line 991 "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 993 "perly.y"
+#line 995 "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 997 "perly.y"
+#line 999 "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 1001 "perly.y"
+#line 1003 "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({
@@ -1143,28 +1145,28 @@ case 2:
break;
case 136:
-#line 1013 "perly.y"
+#line 1015 "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 137:
-#line 1017 "perly.y"
+#line 1019 "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 138:
-#line 1021 "perly.y"
+#line 1023 "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 139:
-#line 1025 "perly.y"
+#line 1027 "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
@@ -1174,14 +1176,14 @@ case 2:
break;
case 140:
-#line 1035 "perly.y"
+#line 1037 "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 141:
-#line 1039 "perly.y"
+#line 1041 "perly.y"
{ (yyval.opval) = IF_MAD(
newUNOP(OP_NULL, 0, (ps[(2) - (2)].val.opval)),
(ps[(2) - (2)].val.opval)
@@ -1191,21 +1193,21 @@ case 2:
break;
case 142:
-#line 1046 "perly.y"
+#line 1048 "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 143:
-#line 1050 "perly.y"
+#line 1052 "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 144:
-#line 1054 "perly.y"
+#line 1056 "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');
@@ -1213,7 +1215,7 @@ case 2:
break;
case 145:
-#line 1059 "perly.y"
+#line 1061 "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');
@@ -1221,7 +1223,7 @@ case 2:
break;
case 146:
-#line 1064 "perly.y"
+#line 1066 "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');
@@ -1229,7 +1231,7 @@ case 2:
break;
case 147:
-#line 1069 "perly.y"
+#line 1071 "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');
@@ -1237,7 +1239,7 @@ case 2:
break;
case 148:
-#line 1078 "perly.y"
+#line 1080 "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),']');
@@ -1245,7 +1247,7 @@ case 2:
break;
case 149:
-#line 1083 "perly.y"
+#line 1085 "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),']');
@@ -1253,7 +1255,7 @@ case 2:
break;
case 150:
-#line 1088 "perly.y"
+#line 1090 "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),';');
@@ -1262,7 +1264,7 @@ case 2:
break;
case 151:
-#line 1094 "perly.y"
+#line 1096 "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),';');
@@ -1271,7 +1273,7 @@ case 2:
break;
case 152:
-#line 1100 "perly.y"
+#line 1102 "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');
@@ -1281,21 +1283,21 @@ case 2:
break;
case 153:
-#line 1111 "perly.y"
+#line 1113 "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 154:
-#line 1115 "perly.y"
+#line 1117 "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 155:
-#line 1119 "perly.y"
+#line 1121 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB,
OPf_SPECIAL|OPf_STACKED,
op_prepend_elem(OP_LIST,
@@ -1310,7 +1312,7 @@ case 2:
break;
case 156:
-#line 1131 "perly.y"
+#line 1133 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB,
OPf_SPECIAL|OPf_STACKED,
op_append_elem(OP_LIST,
@@ -1326,7 +1328,7 @@ case 2:
break;
case 157:
-#line 1144 "perly.y"
+#line 1146 "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();
@@ -1337,7 +1339,7 @@ case 2:
break;
case 158:
-#line 1152 "perly.y"
+#line 1154 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
op_prepend_elem(OP_LIST,
(ps[(4) - (5)].val.opval),
@@ -1349,7 +1351,7 @@ case 2:
break;
case 163:
-#line 1168 "perly.y"
+#line 1170 "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),':');
@@ -1357,26 +1359,26 @@ case 2:
break;
case 164:
-#line 1173 "perly.y"
+#line 1175 "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 165:
-#line 1177 "perly.y"
+#line 1179 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 166:
-#line 1179 "perly.y"
+#line 1181 "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 167:
-#line 1183 "perly.y"
+#line 1185 "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),')');
@@ -1384,12 +1386,12 @@ case 2:
break;
case 168:
-#line 1188 "perly.y"
+#line 1190 "perly.y"
{ (yyval.opval) = IF_MAD(newUNOP(OP_NULL,0,(ps[(1) - (1)].val.opval)), (ps[(1) - (1)].val.opval)); ;}
break;
case 169:
-#line 1190 "perly.y"
+#line 1192 "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),')');
@@ -1397,37 +1399,37 @@ case 2:
break;
case 170:
-#line 1195 "perly.y"
+#line 1197 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 171:
-#line 1197 "perly.y"
+#line 1199 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 172:
-#line 1199 "perly.y"
+#line 1201 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 173:
-#line 1201 "perly.y"
+#line 1203 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 174:
-#line 1203 "perly.y"
+#line 1205 "perly.y"
{ (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((ps[(1) - (1)].val.opval), OP_AV2ARYLEN));;}
break;
case 175:
-#line 1205 "perly.y"
+#line 1207 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 176:
-#line 1207 "perly.y"
+#line 1209 "perly.y"
{ (yyval.opval) = op_prepend_elem(OP_ASLICE,
newOP(OP_PUSHMARK, 0),
newLISTOP(OP_ASLICE, 0,
@@ -1439,7 +1441,7 @@ case 2:
break;
case 177:
-#line 1216 "perly.y"
+#line 1218 "perly.y"
{ (yyval.opval) = op_prepend_elem(OP_HSLICE,
newOP(OP_PUSHMARK, 0),
newLISTOP(OP_HSLICE, 0,
@@ -1453,17 +1455,17 @@ case 2:
break;
case 178:
-#line 1227 "perly.y"
+#line 1229 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 179:
-#line 1229 "perly.y"
+#line 1231 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((ps[(1) - (1)].val.opval))); ;}
break;
case 180:
-#line 1231 "perly.y"
+#line 1233 "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),')');
@@ -1471,7 +1473,7 @@ case 2:
break;
case 181:
-#line 1236 "perly.y"
+#line 1238 "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))));
@@ -1487,7 +1489,7 @@ case 2:
break;
case 182:
-#line 1249 "perly.y"
+#line 1251 "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');
@@ -1495,7 +1497,7 @@ case 2:
break;
case 183:
-#line 1254 "perly.y"
+#line 1256 "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');
@@ -1503,74 +1505,74 @@ case 2:
break;
case 184:
-#line 1259 "perly.y"
+#line 1261 "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 185:
-#line 1263 "perly.y"
+#line 1265 "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 186:
-#line 1267 "perly.y"
+#line 1269 "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 187:
-#line 1271 "perly.y"
+#line 1273 "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 1275 "perly.y"
+#line 1277 "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 189:
-#line 1279 "perly.y"
+#line 1281 "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 190:
-#line 1283 "perly.y"
+#line 1285 "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 191:
-#line 1287 "perly.y"
+#line 1289 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[(1) - (1)].val.opval))); ;}
break;
case 192:
-#line 1289 "perly.y"
+#line 1291 "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 193:
-#line 1292 "perly.y"
+#line 1294 "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 194:
-#line 1296 "perly.y"
+#line 1298 "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),'(');
@@ -1579,12 +1581,12 @@ case 2:
break;
case 195:
-#line 1302 "perly.y"
+#line 1304 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 196:
-#line 1304 "perly.y"
+#line 1306 "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),')');
@@ -1592,13 +1594,13 @@ case 2:
break;
case 197:
-#line 1309 "perly.y"
+#line 1311 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
scalar((ps[(1) - (1)].val.opval))); ;}
break;
case 198:
-#line 1312 "perly.y"
+#line 1314 "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);
@@ -1610,7 +1612,7 @@ case 2:
break;
case 199:
-#line 1321 "perly.y"
+#line 1323 "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),'(');
@@ -1619,7 +1621,7 @@ case 2:
break;
case 200:
-#line 1327 "perly.y"
+#line 1329 "perly.y"
{
if ( (ps[(1) - (1)].val.opval)->op_type != OP_TRANS
&& (ps[(1) - (1)].val.opval)->op_type != OP_TRANSR
@@ -1633,7 +1635,7 @@ case 2:
break;
case 201:
-#line 1338 "perly.y"
+#line 1340 "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),')');
@@ -1641,7 +1643,7 @@ case 2:
break;
case 204:
-#line 1345 "perly.y"
+#line 1347 "perly.y"
{
(yyval.opval) = newLISTOP(OP_DIE, 0, newOP(OP_PUSHMARK, 0),
newSVOP(OP_CONST, 0, newSVpvs("Unimplemented")));
@@ -1650,7 +1652,7 @@ case 2:
break;
case 206:
-#line 1355 "perly.y"
+#line 1357 "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');
@@ -1661,14 +1663,14 @@ case 2:
break;
case 207:
-#line 1363 "perly.y"
+#line 1365 "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 208:
-#line 1370 "perly.y"
+#line 1372 "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),')');
@@ -1676,7 +1678,7 @@ case 2:
break;
case 209:
-#line 1375 "perly.y"
+#line 1377 "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),')');
@@ -1684,104 +1686,104 @@ case 2:
break;
case 210:
-#line 1380 "perly.y"
+#line 1382 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 211:
-#line 1382 "perly.y"
+#line 1384 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 212:
-#line 1384 "perly.y"
+#line 1386 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 213:
-#line 1389 "perly.y"
+#line 1391 "perly.y"
{ (yyval.opval) = (OP*)NULL; ;}
break;
case 214:
-#line 1391 "perly.y"
+#line 1393 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 215:
-#line 1395 "perly.y"
+#line 1397 "perly.y"
{ (yyval.opval) = (OP*)NULL; ;}
break;
case 216:
-#line 1397 "perly.y"
+#line 1399 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
case 217:
-#line 1403 "perly.y"
+#line 1405 "perly.y"
{ PL_parser->in_my = 0; (yyval.opval) = my((ps[(1) - (1)].val.opval)); ;}
break;
case 218:
-#line 1407 "perly.y"
+#line 1409 "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 219:
-#line 1413 "perly.y"
+#line 1415 "perly.y"
{ (yyval.opval) = newSVREF((ps[(2) - (2)].val.opval));
TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'$');
;}
break;
case 220:
-#line 1419 "perly.y"
+#line 1421 "perly.y"
{ (yyval.opval) = newAVREF((ps[(2) - (2)].val.opval));
TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'@');
;}
break;
case 221:
-#line 1425 "perly.y"
+#line 1427 "perly.y"
{ (yyval.opval) = newHVREF((ps[(2) - (2)].val.opval));
TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'%');
;}
break;
case 222:
-#line 1431 "perly.y"
+#line 1433 "perly.y"
{ (yyval.opval) = newAVREF((ps[(2) - (2)].val.opval));
TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'l');
;}
break;
case 223:
-#line 1437 "perly.y"
+#line 1439 "perly.y"
{ (yyval.opval) = newGVREF(0,(ps[(2) - (2)].val.opval));
TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'*');
;}
break;
case 224:
-#line 1444 "perly.y"
+#line 1446 "perly.y"
{ (yyval.opval) = scalar((ps[(1) - (1)].val.opval)); ;}
break;
case 225:
-#line 1446 "perly.y"
+#line 1448 "perly.y"
{ (yyval.opval) = scalar((ps[(1) - (1)].val.opval)); ;}
break;
case 226:
-#line 1448 "perly.y"
+#line 1450 "perly.y"
{ (yyval.opval) = op_scope((ps[(1) - (1)].val.opval)); ;}
break;
case 227:
-#line 1451 "perly.y"
+#line 1453 "perly.y"
{ (yyval.opval) = (ps[(1) - (1)].val.opval); ;}
break;
@@ -1792,6 +1794,6 @@ case 2:
/* Generated from:
- * 38ce4bf3d0e9f8cfd35795d89907c7d03583b561b55406230d749c80d62d5e06 perly.y
+ * 22767f994fcf1e0f0dfc8c69fd8218ca01b59a2ba367fa36181bfaa804e8af87 perly.y
* 4a3ced51fe6585f6ec59e65e1ffd74bc976c498b0e6992eaab337219fee72e51 regen_perly.pl
* ex: set ro: */