summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perly.act578
-rw-r--r--perly.h6
-rw-r--r--perly.tab142
-rw-r--r--perly.y8
-rwxr-xr-xt/op/ref.t19
5 files changed, 385 insertions, 368 deletions
diff --git a/perly.act b/perly.act
index 0011ecfc7c..0484e296d0 100644
--- a/perly.act
+++ b/perly.act
@@ -1,75 +1,75 @@
case 2:
#line 97 "perly.y"
- { yyval.ival = yyvsp[-1].ival; newPROG(block_end(yyvsp[-1].ival,yyvsp[0].opval)); ;}
+ { (yyval.ival) = (yyvsp[-1].ival); newPROG(block_end((yyvsp[-1].ival),(yyvsp[0].opval))); ;}
break;
case 3:
#line 102 "perly.y"
- { if (PL_copline > (line_t)yyvsp[-3].ival)
- PL_copline = (line_t)yyvsp[-3].ival;
- yyval.opval = block_end(yyvsp[-2].ival, yyvsp[-1].opval); ;}
+ { if (PL_copline > (line_t)(yyvsp[-3].ival))
+ PL_copline = (line_t)(yyvsp[-3].ival);
+ (yyval.opval) = block_end((yyvsp[-2].ival), (yyvsp[-1].opval)); ;}
break;
case 4:
#line 108 "perly.y"
- { yyval.ival = block_start(TRUE); ;}
+ { (yyval.ival) = block_start(TRUE); ;}
break;
case 5:
#line 112 "perly.y"
{
- PL_expect = XSTATE; yyval.ival = block_start(TRUE);
+ PL_expect = XSTATE; (yyval.ival) = block_start(TRUE);
;}
break;
case 6:
#line 119 "perly.y"
- { if (PL_copline > (line_t)yyvsp[-3].ival)
- PL_copline = (line_t)yyvsp[-3].ival;
- yyval.opval = block_end(yyvsp[-2].ival, yyvsp[-1].opval); ;}
+ { if (PL_copline > (line_t)(yyvsp[-3].ival))
+ PL_copline = (line_t)(yyvsp[-3].ival);
+ (yyval.opval) = block_end((yyvsp[-2].ival), (yyvsp[-1].opval)); ;}
break;
case 7:
#line 125 "perly.y"
- { yyval.ival = block_start(FALSE); ;}
+ { (yyval.ival) = block_start(FALSE); ;}
break;
case 8:
#line 129 "perly.y"
- { yyval.ival = PL_savestack_ix; ;}
+ { (yyval.ival) = PL_savestack_ix; ;}
break;
case 9:
#line 133 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 10:
#line 135 "perly.y"
- { yyval.opval = yyvsp[-1].opval; ;}
+ { (yyval.opval) = (yyvsp[-1].opval); ;}
break;
case 11:
#line 137 "perly.y"
- { LEAVE_SCOPE(yyvsp[-1].ival);
- yyval.opval = append_list(OP_LINESEQ,
- (LISTOP*)yyvsp[-2].opval, (LISTOP*)yyvsp[0].opval);
+ { LEAVE_SCOPE((yyvsp[-1].ival));
+ (yyval.opval) = append_list(OP_LINESEQ,
+ (LISTOP*)(yyvsp[-2].opval), (LISTOP*)(yyvsp[0].opval));
PL_pad_reset_pending = TRUE;
- if (yyvsp[-2].opval && yyvsp[0].opval) PL_hints |= HINT_BLOCK_SCOPE; ;}
+ if ((yyvsp[-2].opval) && (yyvsp[0].opval)) PL_hints |= HINT_BLOCK_SCOPE; ;}
break;
case 12:
#line 146 "perly.y"
- { yyval.opval = newSTATEOP(0, yyvsp[-1].pval, yyvsp[0].opval); ;}
+ { (yyval.opval) = newSTATEOP(0, (yyvsp[-1].pval), (yyvsp[0].opval)); ;}
break;
case 14:
#line 149 "perly.y"
- { if (yyvsp[-1].pval != Nullch) {
- yyval.opval = newSTATEOP(0, yyvsp[-1].pval, newOP(OP_NULL, 0));
+ { if ((yyvsp[-1].pval) != Nullch) {
+ (yyval.opval) = newSTATEOP(0, (yyvsp[-1].pval), newOP(OP_NULL, 0));
}
else {
- yyval.opval = Nullop;
+ (yyval.opval) = Nullop;
PL_copline = NOLINE;
}
PL_expect = XSTATE; ;}
@@ -77,308 +77,308 @@ case 2:
case 15:
#line 158 "perly.y"
- { yyval.opval = newSTATEOP(0, yyvsp[-2].pval, yyvsp[-1].opval);
+ { (yyval.opval) = newSTATEOP(0, (yyvsp[-2].pval), (yyvsp[-1].opval));
PL_expect = XSTATE; ;}
break;
case 16:
#line 164 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 17:
#line 166 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 18:
#line 168 "perly.y"
- { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[0].opval, yyvsp[-2].opval); ;}
+ { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[0].opval), (yyvsp[-2].opval)); ;}
break;
case 19:
#line 170 "perly.y"
- { yyval.opval = newLOGOP(OP_OR, 0, yyvsp[0].opval, yyvsp[-2].opval); ;}
+ { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[0].opval), (yyvsp[-2].opval)); ;}
break;
case 20:
#line 172 "perly.y"
- { yyval.opval = newLOOPOP(OPf_PARENS, 1, scalar(yyvsp[0].opval), yyvsp[-2].opval); ;}
+ { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((yyvsp[0].opval)), (yyvsp[-2].opval)); ;}
break;
case 21:
#line 174 "perly.y"
- { yyval.opval = newLOOPOP(OPf_PARENS, 1, yyvsp[0].opval, yyvsp[-2].opval);;}
+ { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (yyvsp[0].opval), (yyvsp[-2].opval));;}
break;
case 22:
#line 176 "perly.y"
- { yyval.opval = newFOROP(0, Nullch, (line_t)yyvsp[-1].ival,
- Nullop, yyvsp[0].opval, yyvsp[-2].opval, Nullop); ;}
+ { (yyval.opval) = newFOROP(0, Nullch, (line_t)(yyvsp[-1].ival),
+ Nullop, (yyvsp[0].opval), (yyvsp[-2].opval), Nullop); ;}
break;
case 23:
#line 182 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 24:
#line 184 "perly.y"
- { (yyvsp[0].opval)->op_flags |= OPf_PARENS; yyval.opval = scope(yyvsp[0].opval); ;}
+ { ((yyvsp[0].opval))->op_flags |= OPf_PARENS; (yyval.opval) = scope((yyvsp[0].opval)); ;}
break;
case 25:
#line 186 "perly.y"
- { PL_copline = (line_t)yyvsp[-5].ival;
- yyval.opval = newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval);
+ { PL_copline = (line_t)(yyvsp[-5].ival);
+ (yyval.opval) = newCONDOP(0, (yyvsp[-3].opval), scope((yyvsp[-1].opval)), (yyvsp[0].opval));
PL_hints |= HINT_BLOCK_SCOPE; ;}
break;
case 26:
#line 193 "perly.y"
- { PL_copline = (line_t)yyvsp[-6].ival;
- yyval.opval = block_end(yyvsp[-4].ival,
- newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); ;}
+ { PL_copline = (line_t)(yyvsp[-6].ival);
+ (yyval.opval) = block_end((yyvsp[-4].ival),
+ newCONDOP(0, (yyvsp[-3].opval), scope((yyvsp[-1].opval)), (yyvsp[0].opval))); ;}
break;
case 27:
#line 197 "perly.y"
- { PL_copline = (line_t)yyvsp[-6].ival;
- yyval.opval = block_end(yyvsp[-4].ival,
- newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); ;}
+ { PL_copline = (line_t)(yyvsp[-6].ival);
+ (yyval.opval) = block_end((yyvsp[-4].ival),
+ newCONDOP(0, (yyvsp[-3].opval), scope((yyvsp[-1].opval)), (yyvsp[0].opval))); ;}
break;
case 28:
#line 204 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 29:
#line 206 "perly.y"
- { yyval.opval = scope(yyvsp[0].opval); ;}
+ { (yyval.opval) = scope((yyvsp[0].opval)); ;}
break;
case 30:
#line 211 "perly.y"
- { PL_copline = (line_t)yyvsp[-7].ival;
- yyval.opval = block_end(yyvsp[-5].ival,
- newSTATEOP(0, yyvsp[-8].pval,
+ { PL_copline = (line_t)(yyvsp[-7].ival);
+ (yyval.opval) = block_end((yyvsp[-5].ival),
+ newSTATEOP(0, (yyvsp[-8].pval),
newWHILEOP(0, 1, (LOOP*)Nullop,
- yyvsp[-7].ival, yyvsp[-4].opval, yyvsp[-1].opval, yyvsp[0].opval, yyvsp[-2].ival))); ;}
+ (yyvsp[-7].ival), (yyvsp[-4].opval), (yyvsp[-1].opval), (yyvsp[0].opval), (yyvsp[-2].ival)))); ;}
break;
case 31:
#line 217 "perly.y"
- { PL_copline = (line_t)yyvsp[-7].ival;
- yyval.opval = block_end(yyvsp[-5].ival,
- newSTATEOP(0, yyvsp[-8].pval,
+ { PL_copline = (line_t)(yyvsp[-7].ival);
+ (yyval.opval) = block_end((yyvsp[-5].ival),
+ newSTATEOP(0, (yyvsp[-8].pval),
newWHILEOP(0, 1, (LOOP*)Nullop,
- yyvsp[-7].ival, yyvsp[-4].opval, yyvsp[-1].opval, yyvsp[0].opval, yyvsp[-2].ival))); ;}
+ (yyvsp[-7].ival), (yyvsp[-4].opval), (yyvsp[-1].opval), (yyvsp[0].opval), (yyvsp[-2].ival)))); ;}
break;
case 32:
#line 223 "perly.y"
- { yyval.opval = block_end(yyvsp[-6].ival,
- newFOROP(0, yyvsp[-9].pval, (line_t)yyvsp[-8].ival, yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); ;}
+ { (yyval.opval) = block_end((yyvsp[-6].ival),
+ newFOROP(0, (yyvsp[-9].pval), (line_t)(yyvsp[-8].ival), (yyvsp[-5].opval), (yyvsp[-3].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); ;}
break;
case 33:
#line 226 "perly.y"
- { yyval.opval = block_end(yyvsp[-4].ival,
- newFOROP(0, yyvsp[-8].pval, (line_t)yyvsp[-7].ival, mod(yyvsp[-6].opval, OP_ENTERLOOP),
- yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); ;}
+ { (yyval.opval) = block_end((yyvsp[-4].ival),
+ newFOROP(0, (yyvsp[-8].pval), (line_t)(yyvsp[-7].ival), mod((yyvsp[-6].opval), OP_ENTERLOOP),
+ (yyvsp[-3].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); ;}
break;
case 34:
#line 230 "perly.y"
- { yyval.opval = block_end(yyvsp[-4].ival,
- newFOROP(0, yyvsp[-7].pval, (line_t)yyvsp[-6].ival, Nullop, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); ;}
+ { (yyval.opval) = block_end((yyvsp[-4].ival),
+ newFOROP(0, (yyvsp[-7].pval), (line_t)(yyvsp[-6].ival), Nullop, (yyvsp[-3].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); ;}
break;
case 35:
#line 235 "perly.y"
{ OP *forop;
- PL_copline = (line_t)yyvsp[-10].ival;
- forop = newSTATEOP(0, yyvsp[-11].pval,
+ PL_copline = (line_t)(yyvsp[-10].ival);
+ forop = newSTATEOP(0, (yyvsp[-11].pval),
newWHILEOP(0, 1, (LOOP*)Nullop,
- yyvsp[-10].ival, scalar(yyvsp[-5].opval),
- yyvsp[0].opval, yyvsp[-2].opval, yyvsp[-3].ival));
- if (yyvsp[-7].opval) {
+ (yyvsp[-10].ival), scalar((yyvsp[-5].opval)),
+ (yyvsp[0].opval), (yyvsp[-2].opval), (yyvsp[-3].ival)));
+ if ((yyvsp[-7].opval)) {
forop = append_elem(OP_LINESEQ,
- newSTATEOP(0, (yyvsp[-11].pval?savepv(yyvsp[-11].pval):Nullch),
- yyvsp[-7].opval),
+ newSTATEOP(0, ((yyvsp[-11].pval)?savepv((yyvsp[-11].pval)):Nullch),
+ (yyvsp[-7].opval)),
forop);
}
- yyval.opval = block_end(yyvsp[-8].ival, forop); ;}
+ (yyval.opval) = block_end((yyvsp[-8].ival), forop); ;}
break;
case 36:
#line 250 "perly.y"
- { yyval.opval = newSTATEOP(0, yyvsp[-2].pval,
+ { (yyval.opval) = newSTATEOP(0, (yyvsp[-2].pval),
newWHILEOP(0, 1, (LOOP*)Nullop,
- NOLINE, Nullop, yyvsp[-1].opval, yyvsp[0].opval, 0)); ;}
+ NOLINE, Nullop, (yyvsp[-1].opval), (yyvsp[0].opval), 0)); ;}
break;
case 37:
#line 257 "perly.y"
- { yyval.ival = (PL_min_intro_pending &&
+ { (yyval.ival) = (PL_min_intro_pending &&
PL_max_intro_pending >= PL_min_intro_pending);
intro_my(); ;}
break;
case 38:
#line 263 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 40:
#line 269 "perly.y"
- { (void)scan_num("1", &yylval); yyval.opval = yylval.opval; ;}
+ { (void)scan_num("1", &yylval); (yyval.opval) = yylval.opval; ;}
break;
case 42:
#line 275 "perly.y"
- { yyval.opval = invert(scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = invert(scalar((yyvsp[0].opval))); ;}
break;
case 43:
#line 280 "perly.y"
- { yyval.opval = yyvsp[0].opval; intro_my(); ;}
+ { (yyval.opval) = (yyvsp[0].opval); intro_my(); ;}
break;
case 44:
#line 284 "perly.y"
- { yyval.opval = yyvsp[0].opval; intro_my(); ;}
+ { (yyval.opval) = (yyvsp[0].opval); intro_my(); ;}
break;
case 45:
#line 288 "perly.y"
- { yyval.opval = yyvsp[0].opval; intro_my(); ;}
+ { (yyval.opval) = (yyvsp[0].opval); intro_my(); ;}
break;
case 46:
#line 293 "perly.y"
- { yyval.pval = Nullch; ;}
+ { (yyval.pval) = Nullch; ;}
break;
case 48:
#line 299 "perly.y"
- { yyval.ival = 0; ;}
+ { (yyval.ival) = 0; ;}
break;
case 49:
#line 301 "perly.y"
- { yyval.ival = 0; ;}
+ { (yyval.ival) = 0; ;}
break;
case 50:
#line 303 "perly.y"
- { yyval.ival = 0; ;}
+ { (yyval.ival) = 0; ;}
break;
case 51:
#line 305 "perly.y"
- { yyval.ival = 0; ;}
+ { (yyval.ival) = 0; ;}
break;
case 52:
#line 307 "perly.y"
- { yyval.ival = 0; ;}
+ { (yyval.ival) = 0; ;}
break;
case 53:
#line 311 "perly.y"
- { newFORM(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); ;}
+ { newFORM((yyvsp[-2].ival), (yyvsp[-1].opval), (yyvsp[0].opval)); ;}
break;
case 54:
#line 314 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 55:
#line 315 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 56:
#line 320 "perly.y"
- { newMYSUB(yyvsp[-4].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); ;}
+ { newMYSUB((yyvsp[-4].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); ;}
break;
case 57:
#line 325 "perly.y"
- { newATTRSUB(yyvsp[-4].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); ;}
+ { newATTRSUB((yyvsp[-4].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); ;}
break;
case 58:
#line 329 "perly.y"
- { yyval.ival = start_subparse(FALSE, 0); ;}
+ { (yyval.ival) = start_subparse(FALSE, 0); ;}
break;
case 59:
#line 333 "perly.y"
- { yyval.ival = start_subparse(FALSE, CVf_ANON); ;}
+ { (yyval.ival) = start_subparse(FALSE, CVf_ANON); ;}
break;
case 60:
#line 337 "perly.y"
- { yyval.ival = start_subparse(TRUE, 0); ;}
+ { (yyval.ival) = start_subparse(TRUE, 0); ;}
break;
case 61:
#line 341 "perly.y"
- { STRLEN n_a; const char *name = SvPV_const(((SVOP*)yyvsp[0].opval)->op_sv,n_a);
+ { STRLEN n_a; const char *name = SvPV_const(((SVOP*)(yyvsp[0].opval))->op_sv,n_a);
if (strEQ(name, "BEGIN") || strEQ(name, "END")
|| strEQ(name, "INIT") || strEQ(name, "CHECK"))
CvSPECIAL_on(PL_compcv);
- yyval.opval = yyvsp[0].opval; ;}
+ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 62:
#line 350 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 64:
#line 356 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 65:
#line 358 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 66:
#line 360 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 67:
#line 365 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 68:
#line 367 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 69:
#line 371 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 70:
#line 372 "perly.y"
- { yyval.opval = Nullop; PL_expect = XSTATE; ;}
+ { (yyval.opval) = Nullop; PL_expect = XSTATE; ;}
break;
case 71:
#line 376 "perly.y"
- { package(yyvsp[-1].opval); ;}
+ { package((yyvsp[-1].opval)); ;}
break;
case 72:
@@ -388,659 +388,659 @@ case 2:
case 73:
#line 382 "perly.y"
- { utilize(yyvsp[-6].ival, yyvsp[-5].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval); ;}
+ { utilize((yyvsp[-6].ival), (yyvsp[-5].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval)); ;}
break;
case 74:
#line 387 "perly.y"
- { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
+ { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 75:
#line 389 "perly.y"
- { yyval.opval = newLOGOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
+ { (yyval.opval) = newLOGOP((yyvsp[-1].ival), 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 76:
#line 391 "perly.y"
- { yyval.opval = newLOGOP(OP_DOR, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
+ { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 78:
#line 397 "perly.y"
- { yyval.opval = yyvsp[-1].opval; ;}
+ { (yyval.opval) = (yyvsp[-1].opval); ;}
break;
case 79:
#line 399 "perly.y"
- { yyval.opval = append_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval); ;}
+ { (yyval.opval) = append_elem(OP_LIST, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 81:
#line 405 "perly.y"
- { yyval.opval = convert(yyvsp[-2].ival, OPf_STACKED,
- prepend_elem(OP_LIST, newGVREF(yyvsp[-2].ival,yyvsp[-1].opval), yyvsp[0].opval) ); ;}
+ { (yyval.opval) = convert((yyvsp[-2].ival), OPf_STACKED,
+ prepend_elem(OP_LIST, newGVREF((yyvsp[-2].ival),(yyvsp[-1].opval)), (yyvsp[0].opval)) ); ;}
break;
case 82:
#line 408 "perly.y"
- { yyval.opval = convert(yyvsp[-4].ival, OPf_STACKED,
- prepend_elem(OP_LIST, newGVREF(yyvsp[-4].ival,yyvsp[-2].opval), yyvsp[-1].opval) ); ;}
+ { (yyval.opval) = convert((yyvsp[-4].ival), OPf_STACKED,
+ prepend_elem(OP_LIST, newGVREF((yyvsp[-4].ival),(yyvsp[-2].opval)), (yyvsp[-1].opval)) ); ;}
break;
case 83:
#line 411 "perly.y"
- { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
+ { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST,
- prepend_elem(OP_LIST, scalar(yyvsp[-5].opval), yyvsp[-1].opval),
- newUNOP(OP_METHOD, 0, yyvsp[-3].opval))); ;}
+ prepend_elem(OP_LIST, scalar((yyvsp[-5].opval)), (yyvsp[-1].opval)),
+ newUNOP(OP_METHOD, 0, (yyvsp[-3].opval)))); ;}
break;
case 84:
#line 416 "perly.y"
- { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
- append_elem(OP_LIST, scalar(yyvsp[-2].opval),
- newUNOP(OP_METHOD, 0, yyvsp[0].opval))); ;}
+ { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST, scalar((yyvsp[-2].opval)),
+ newUNOP(OP_METHOD, 0, (yyvsp[0].opval)))); ;}
break;
case 85:
#line 420 "perly.y"
- { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
+ { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST,
- prepend_elem(OP_LIST, yyvsp[-1].opval, yyvsp[0].opval),
- newUNOP(OP_METHOD, 0, yyvsp[-2].opval))); ;}
+ prepend_elem(OP_LIST, (yyvsp[-1].opval), (yyvsp[0].opval)),
+ newUNOP(OP_METHOD, 0, (yyvsp[-2].opval)))); ;}
break;
case 86:
#line 425 "perly.y"
- { yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
+ { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST,
- prepend_elem(OP_LIST, yyvsp[-3].opval, yyvsp[-1].opval),
- newUNOP(OP_METHOD, 0, yyvsp[-4].opval))); ;}
+ prepend_elem(OP_LIST, (yyvsp[-3].opval), (yyvsp[-1].opval)),
+ newUNOP(OP_METHOD, 0, (yyvsp[-4].opval)))); ;}
break;
case 87:
#line 430 "perly.y"
- { yyval.opval = convert(yyvsp[-1].ival, 0, yyvsp[0].opval); ;}
+ { (yyval.opval) = convert((yyvsp[-1].ival), 0, (yyvsp[0].opval)); ;}
break;
case 88:
#line 432 "perly.y"
- { yyval.opval = convert(yyvsp[-3].ival, 0, yyvsp[-1].opval); ;}
+ { (yyval.opval) = convert((yyvsp[-3].ival), 0, (yyvsp[-1].opval)); ;}
break;
case 89:
#line 434 "perly.y"
- { yyvsp[0].opval = newANONATTRSUB(yyvsp[-1].ival, 0, Nullop, yyvsp[0].opval); ;}
+ { (yyvsp[0].opval) = newANONATTRSUB((yyvsp[-1].ival), 0, Nullop, (yyvsp[0].opval)); ;}
break;
case 90:
#line 436 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST,
- prepend_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval), yyvsp[-4].opval)); ;}
+ prepend_elem(OP_LIST, (yyvsp[-2].opval), (yyvsp[0].opval)), (yyvsp[-4].opval))); ;}
break;
case 93:
#line 450 "perly.y"
- { yyval.opval = newBINOP(OP_GELEM, 0, yyvsp[-4].opval, scalar(yyvsp[-2].opval));
+ { (yyval.opval) = newBINOP(OP_GELEM, 0, (yyvsp[-4].opval), scalar((yyvsp[-2].opval)));
PL_expect = XOPERATOR; ;}
break;
case 94:
#line 453 "perly.y"
- { yyval.opval = newBINOP(OP_AELEM, 0, oopsAV(yyvsp[-3].opval), scalar(yyvsp[-1].opval)); ;}
+ { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((yyvsp[-3].opval)), scalar((yyvsp[-1].opval))); ;}
break;
case 95:
#line 455 "perly.y"
- { yyval.opval = newBINOP(OP_AELEM, 0,
- ref(newAVREF(yyvsp[-4].opval),OP_RV2AV),
- scalar(yyvsp[-1].opval));;}
+ { (yyval.opval) = newBINOP(OP_AELEM, 0,
+ ref(newAVREF((yyvsp[-4].opval)),OP_RV2AV),
+ scalar((yyvsp[-1].opval)));;}
break;
case 96:
#line 459 "perly.y"
- { yyval.opval = newBINOP(OP_AELEM, 0,
- ref(newAVREF(yyvsp[-3].opval),OP_RV2AV),
- scalar(yyvsp[-1].opval));;}
+ { (yyval.opval) = newBINOP(OP_AELEM, 0,
+ ref(newAVREF((yyvsp[-3].opval)),OP_RV2AV),
+ scalar((yyvsp[-1].opval)));;}
break;
case 97:
#line 463 "perly.y"
- { yyval.opval = newBINOP(OP_HELEM, 0, oopsHV(yyvsp[-4].opval), jmaybe(yyvsp[-2].opval));
+ { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((yyvsp[-4].opval)), jmaybe((yyvsp[-2].opval)));
PL_expect = XOPERATOR; ;}
break;
case 98:
#line 466 "perly.y"
- { yyval.opval = newBINOP(OP_HELEM, 0,
- ref(newHVREF(yyvsp[-5].opval),OP_RV2HV),
- jmaybe(yyvsp[-2].opval));
+ { (yyval.opval) = newBINOP(OP_HELEM, 0,
+ ref(newHVREF((yyvsp[-5].opval)),OP_RV2HV),
+ jmaybe((yyvsp[-2].opval)));
PL_expect = XOPERATOR; ;}
break;
case 99:
#line 471 "perly.y"
- { yyval.opval = newBINOP(OP_HELEM, 0,
- ref(newHVREF(yyvsp[-4].opval),OP_RV2HV),
- jmaybe(yyvsp[-2].opval));
+ { (yyval.opval) = newBINOP(OP_HELEM, 0,
+ ref(newHVREF((yyvsp[-4].opval)),OP_RV2HV),
+ jmaybe((yyvsp[-2].opval)));
PL_expect = XOPERATOR; ;}
break;
case 100:
#line 476 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
- newCVREF(0, scalar(yyvsp[-3].opval))); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ newCVREF(0, scalar((yyvsp[-3].opval)))); ;}
break;
case 101:
#line 479 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
- append_elem(OP_LIST, yyvsp[-1].opval,
- newCVREF(0, scalar(yyvsp[-4].opval)))); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST, (yyvsp[-1].opval),
+ newCVREF(0, scalar((yyvsp[-4].opval))))); ;}
break;
case 102:
#line 484 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
- append_elem(OP_LIST, yyvsp[-1].opval,
- newCVREF(0, scalar(yyvsp[-3].opval)))); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST, (yyvsp[-1].opval),
+ newCVREF(0, scalar((yyvsp[-3].opval))))); ;}
break;
case 103:
#line 488 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
- newCVREF(0, scalar(yyvsp[-2].opval))); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ newCVREF(0, scalar((yyvsp[-2].opval)))); ;}
break;
case 104:
-#line 494 "perly.y"
- { yyval.opval = newASSIGNOP(OPf_STACKED, yyvsp[-2].opval, yyvsp[-1].ival, yyvsp[0].opval); ;}
+#line 491 "perly.y"
+ { (yyval.opval) = newSLICEOP(0, (yyvsp[-1].opval), (yyvsp[-4].opval)); ;}
break;
case 105:
-#line 496 "perly.y"
- { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
+#line 493 "perly.y"
+ { (yyval.opval) = newSLICEOP(0, (yyvsp[-1].opval), Nullop); ;}
break;
case 106:
#line 498 "perly.y"
- { if (yyvsp[-1].ival != OP_REPEAT)
- scalar(yyvsp[-2].opval);
- yyval.opval = newBINOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = newASSIGNOP(OPf_STACKED, (yyvsp[-2].opval), (yyvsp[-1].ival), (yyvsp[0].opval)); ;}
break;
case 107:
-#line 502 "perly.y"
- { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
+#line 500 "perly.y"
+ { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 108:
-#line 504 "perly.y"
- { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
+#line 502 "perly.y"
+ { if ((yyvsp[-1].ival) != OP_REPEAT)
+ scalar((yyvsp[-2].opval));
+ (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, (yyvsp[-2].opval), scalar((yyvsp[0].opval))); ;}
break;
case 109:
#line 506 "perly.y"
- { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 110:
#line 508 "perly.y"
- { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 111:
#line 510 "perly.y"
- { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 112:
#line 512 "perly.y"
- { yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 113:
#line 514 "perly.y"
- { yyval.opval = newRANGE(yyvsp[-1].ival, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval));;}
+ { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 114:
#line 516 "perly.y"
- { yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
+ { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 115:
#line 518 "perly.y"
- { yyval.opval = newLOGOP(OP_OR, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
+ { (yyval.opval) = newRANGE((yyvsp[-1].ival), scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval)));;}
break;
case 116:
#line 520 "perly.y"
- { yyval.opval = newLOGOP(OP_DOR, 0, yyvsp[-2].opval, yyvsp[0].opval); ;}
+ { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 117:
#line 522 "perly.y"
- { yyval.opval = bind_match(yyvsp[-1].ival, yyvsp[-2].opval, yyvsp[0].opval); ;}
+ { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 118:
-#line 527 "perly.y"
- { yyval.opval = newUNOP(OP_NEGATE, 0, scalar(yyvsp[0].opval)); ;}
+#line 524 "perly.y"
+ { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 119:
-#line 529 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+#line 526 "perly.y"
+ { (yyval.opval) = bind_match((yyvsp[-1].ival), (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 120:
#line 531 "perly.y"
- { yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((yyvsp[0].opval))); ;}
break;
case 121:
#line 533 "perly.y"
- { yyval.opval = newUNOP(OP_COMPLEMENT, 0, scalar(yyvsp[0].opval));;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 122:
#line 535 "perly.y"
- { yyval.opval = newUNOP(OP_POSTINC, 0,
- mod(scalar(yyvsp[-1].opval), OP_POSTINC)); ;}
+ { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[0].opval))); ;}
break;
case 123:
-#line 538 "perly.y"
- { yyval.opval = newUNOP(OP_POSTDEC, 0,
- mod(scalar(yyvsp[-1].opval), OP_POSTDEC)); ;}
+#line 537 "perly.y"
+ { (yyval.opval) = newUNOP(OP_COMPLEMENT, 0, scalar((yyvsp[0].opval)));;}
break;
case 124:
-#line 541 "perly.y"
- { yyval.opval = newUNOP(OP_PREINC, 0,
- mod(scalar(yyvsp[0].opval), OP_PREINC)); ;}
+#line 539 "perly.y"
+ { (yyval.opval) = newUNOP(OP_POSTINC, 0,
+ mod(scalar((yyvsp[-1].opval)), OP_POSTINC)); ;}
break;
case 125:
-#line 544 "perly.y"
- { yyval.opval = newUNOP(OP_PREDEC, 0,
- mod(scalar(yyvsp[0].opval), OP_PREDEC)); ;}
+#line 542 "perly.y"
+ { (yyval.opval) = newUNOP(OP_POSTDEC, 0,
+ mod(scalar((yyvsp[-1].opval)), OP_POSTDEC)); ;}
break;
case 126:
-#line 551 "perly.y"
- { yyval.opval = newANONLIST(yyvsp[-1].opval); ;}
+#line 545 "perly.y"
+ { (yyval.opval) = newUNOP(OP_PREINC, 0,
+ mod(scalar((yyvsp[0].opval)), OP_PREINC)); ;}
break;
case 127:
-#line 553 "perly.y"
- { yyval.opval = newANONLIST(Nullop); ;}
+#line 548 "perly.y"
+ { (yyval.opval) = newUNOP(OP_PREDEC, 0,
+ mod(scalar((yyvsp[0].opval)), OP_PREDEC)); ;}
break;
case 128:
#line 555 "perly.y"
- { yyval.opval = newANONHASH(yyvsp[-2].opval); ;}
+ { (yyval.opval) = newANONLIST((yyvsp[-1].opval)); ;}
break;
case 129:
#line 557 "perly.y"
- { yyval.opval = newANONHASH(Nullop); ;}
+ { (yyval.opval) = newANONLIST(Nullop); ;}
break;
case 130:
#line 559 "perly.y"
- { yyval.opval = newANONATTRSUB(yyvsp[-3].ival, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); ;}
+ { (yyval.opval) = newANONHASH((yyvsp[-2].opval)); ;}
break;
case 131:
-#line 565 "perly.y"
- { yyval.opval = dofile(yyvsp[0].opval); ;}
+#line 561 "perly.y"
+ { (yyval.opval) = newANONHASH(Nullop); ;}
break;
case 132:
-#line 567 "perly.y"
- { yyval.opval = newUNOP(OP_NULL, OPf_SPECIAL, scope(yyvsp[0].opval)); ;}
+#line 563 "perly.y"
+ { (yyval.opval) = newANONATTRSUB((yyvsp[-3].ival), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); ;}
break;
case 133:
#line 569 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB,
+ { (yyval.opval) = dofile((yyvsp[0].opval)); ;}
+ break;
+
+ case 134:
+#line 571 "perly.y"
+ { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, scope((yyvsp[0].opval))); ;}
+ break;
+
+ case 135:
+#line 573 "perly.y"
+ { (yyval.opval) = newUNOP(OP_ENTERSUB,
OPf_SPECIAL|OPf_STACKED,
prepend_elem(OP_LIST,
scalar(newCVREF(
(OPpENTERSUB_AMPER<<8),
- scalar(yyvsp[-2].opval)
+ scalar((yyvsp[-2].opval))
)),Nullop)); dep();;}
break;
- case 134:
-#line 577 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB,
+ case 136:
+#line 581 "perly.y"
+ { (yyval.opval) = newUNOP(OP_ENTERSUB,
OPf_SPECIAL|OPf_STACKED,
append_elem(OP_LIST,
- yyvsp[-1].opval,
+ (yyvsp[-1].opval),
scalar(newCVREF(
(OPpENTERSUB_AMPER<<8),
- scalar(yyvsp[-3].opval)
+ scalar((yyvsp[-3].opval))
)))); dep();;}
break;
- case 135:
-#line 586 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
- prepend_elem(OP_LIST,
- scalar(newCVREF(0,scalar(yyvsp[-2].opval))), Nullop)); dep();;}
- break;
-
- case 136:
+ case 137:
#line 590 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
prepend_elem(OP_LIST,
- yyvsp[-1].opval,
- scalar(newCVREF(0,scalar(yyvsp[-3].opval))))); dep();;}
- break;
-
- case 141:
-#line 602 "perly.y"
- { yyval.opval = newCONDOP(0, yyvsp[-4].opval, yyvsp[-2].opval, yyvsp[0].opval); ;}
+ scalar(newCVREF(0,scalar((yyvsp[-2].opval)))), Nullop)); dep();;}
break;
- case 142:
-#line 604 "perly.y"
- { yyval.opval = newUNOP(OP_REFGEN, 0, mod(yyvsp[0].opval,OP_REFGEN)); ;}
+ case 138:
+#line 594 "perly.y"
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
+ prepend_elem(OP_LIST,
+ (yyvsp[-1].opval),
+ scalar(newCVREF(0,scalar((yyvsp[-3].opval)))))); dep();;}
break;
case 143:
#line 606 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = newCONDOP(0, (yyvsp[-4].opval), (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 144:
#line 608 "perly.y"
- { yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); ;}
+ { (yyval.opval) = newUNOP(OP_REFGEN, 0, mod((yyvsp[0].opval),OP_REFGEN)); ;}
break;
case 145:
#line 610 "perly.y"
- { yyval.opval = sawparens(yyvsp[-1].opval); ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 146:
#line 612 "perly.y"
- { yyval.opval = sawparens(newNULLLIST()); ;}
+ { (yyval.opval) = localize((yyvsp[0].opval),(yyvsp[-1].ival)); ;}
break;
case 147:
#line 614 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = sawparens((yyvsp[-1].opval)); ;}
break;
case 148:
#line 616 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = sawparens(newNULLLIST()); ;}
break;
case 149:
#line 618 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 150:
#line 620 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 151:
#line 622 "perly.y"
- { yyval.opval = newUNOP(OP_AV2ARYLEN, 0, ref(yyvsp[0].opval, OP_AV2ARYLEN));;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 152:
#line 624 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 153:
#line 626 "perly.y"
- { yyval.opval = newSLICEOP(0, yyvsp[-1].opval, yyvsp[-4].opval); ;}
+ { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((yyvsp[0].opval), OP_AV2ARYLEN));;}
break;
case 154:
#line 628 "perly.y"
- { yyval.opval = newSLICEOP(0, yyvsp[-1].opval, Nullop); ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 155:
#line 630 "perly.y"
- { yyval.opval = prepend_elem(OP_ASLICE,
+ { (yyval.opval) = prepend_elem(OP_ASLICE,
newOP(OP_PUSHMARK, 0),
newLISTOP(OP_ASLICE, 0,
- list(yyvsp[-1].opval),
- ref(yyvsp[-3].opval, OP_ASLICE))); ;}
+ list((yyvsp[-1].opval)),
+ ref((yyvsp[-3].opval), OP_ASLICE))); ;}
break;
case 156:
#line 636 "perly.y"
- { yyval.opval = prepend_elem(OP_HSLICE,
+ { (yyval.opval) = prepend_elem(OP_HSLICE,
newOP(OP_PUSHMARK, 0),
newLISTOP(OP_HSLICE, 0,
- list(yyvsp[-2].opval),
- ref(oopsHV(yyvsp[-4].opval), OP_HSLICE)));
+ list((yyvsp[-2].opval)),
+ ref(oopsHV((yyvsp[-4].opval)), OP_HSLICE)));
PL_expect = XOPERATOR; ;}
break;
case 157:
#line 643 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 158:
#line 645 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, 0, scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((yyvsp[0].opval))); ;}
break;
case 159:
#line 647 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar(yyvsp[-2].opval)); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[-2].opval))); ;}
break;
case 160:
#line 649 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
- append_elem(OP_LIST, yyvsp[-1].opval, scalar(yyvsp[-3].opval))); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST, (yyvsp[-1].opval), scalar((yyvsp[-3].opval)))); ;}
break;
case 161:
#line 652 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
- append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST, (yyvsp[0].opval), scalar((yyvsp[-1].opval)))); ;}
break;
case 162:
#line 655 "perly.y"
- { yyval.opval = newOP(yyvsp[0].ival, OPf_SPECIAL);
+ { (yyval.opval) = newOP((yyvsp[0].ival), OPf_SPECIAL);
PL_hints |= HINT_BLOCK_SCOPE; ;}
break;
case 163:
#line 658 "perly.y"
- { yyval.opval = newLOOPEX(yyvsp[-1].ival,yyvsp[0].opval); ;}
+ { (yyval.opval) = newLOOPEX((yyvsp[-1].ival),(yyvsp[0].opval)); ;}
break;
case 164:
#line 660 "perly.y"
- { yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[0].opval))); ;}
break;
case 165:
#line 662 "perly.y"
- { yyval.opval = newOP(yyvsp[0].ival, 0); ;}
+ { (yyval.opval) = newOP((yyvsp[0].ival), 0); ;}
break;
case 166:
#line 664 "perly.y"
- { yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); ;}
+ { (yyval.opval) = newUNOP((yyvsp[-1].ival), 0, (yyvsp[0].opval)); ;}
break;
case 167:
#line 666 "perly.y"
- { yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); ;}
+ { (yyval.opval) = newUNOP((yyvsp[-1].ival), 0, (yyvsp[0].opval)); ;}
break;
case 168:
#line 668 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
- append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST, (yyvsp[0].opval), scalar((yyvsp[-1].opval)))); ;}
break;
case 169:
#line 671 "perly.y"
- { yyval.opval = newOP(yyvsp[0].ival, 0); ;}
+ { (yyval.opval) = newOP((yyvsp[0].ival), 0); ;}
break;
case 170:
#line 673 "perly.y"
- { yyval.opval = newOP(yyvsp[-2].ival, 0); ;}
+ { (yyval.opval) = newOP((yyvsp[-2].ival), 0); ;}
break;
case 171:
#line 675 "perly.y"
- { yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
- scalar(yyvsp[0].opval)); ;}
+ { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ scalar((yyvsp[0].opval))); ;}
break;
case 172:
#line 678 "perly.y"
- { yyval.opval = yyvsp[-2].ival == OP_NOT ? newUNOP(yyvsp[-2].ival, 0, newSVOP(OP_CONST, 0, newSViv(0)))
- : newOP(yyvsp[-2].ival, OPf_SPECIAL); ;}
+ { (yyval.opval) = (yyvsp[-2].ival) == OP_NOT ? newUNOP((yyvsp[-2].ival), 0, newSVOP(OP_CONST, 0, newSViv(0)))
+ : newOP((yyvsp[-2].ival), OPf_SPECIAL); ;}
break;
case 173:
#line 681 "perly.y"
- { yyval.opval = newUNOP(yyvsp[-3].ival, 0, yyvsp[-1].opval); ;}
+ { (yyval.opval) = newUNOP((yyvsp[-3].ival), 0, (yyvsp[-1].opval)); ;}
break;
case 174:
#line 683 "perly.y"
- { yyval.opval = pmruntime(yyvsp[-3].opval, yyvsp[-1].opval, 1); ;}
+ { (yyval.opval) = pmruntime((yyvsp[-3].opval), (yyvsp[-1].opval), 1); ;}
break;
case 177:
#line 690 "perly.y"
- { yyval.opval = my_attrs(yyvsp[-1].opval,yyvsp[0].opval); ;}
+ { (yyval.opval) = my_attrs((yyvsp[-1].opval),(yyvsp[0].opval)); ;}
break;
case 178:
#line 692 "perly.y"
- { yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); ;}
+ { (yyval.opval) = localize((yyvsp[0].opval),(yyvsp[-1].ival)); ;}
break;
case 179:
#line 697 "perly.y"
- { yyval.opval = sawparens(yyvsp[-1].opval); ;}
+ { (yyval.opval) = sawparens((yyvsp[-1].opval)); ;}
break;
case 180:
#line 699 "perly.y"
- { yyval.opval = sawparens(newNULLLIST()); ;}
+ { (yyval.opval) = sawparens(newNULLLIST()); ;}
break;
case 181:
#line 701 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 182:
#line 703 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 183:
#line 705 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 184:
#line 710 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 185:
#line 712 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 186:
#line 716 "perly.y"
- { yyval.opval = Nullop; ;}
+ { (yyval.opval) = Nullop; ;}
break;
case 187:
#line 718 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 188:
#line 720 "perly.y"
- { yyval.opval = yyvsp[-1].opval; ;}
+ { (yyval.opval) = (yyvsp[-1].opval); ;}
break;
case 189:
#line 726 "perly.y"
- { PL_in_my = 0; yyval.opval = my(yyvsp[0].opval); ;}
+ { PL_in_my = 0; (yyval.opval) = my((yyvsp[0].opval)); ;}
break;
case 190:
#line 730 "perly.y"
- { yyval.opval = newCVREF(yyvsp[-1].ival,yyvsp[0].opval); ;}
+ { (yyval.opval) = newCVREF((yyvsp[-1].ival),(yyvsp[0].opval)); ;}
break;
case 191:
#line 734 "perly.y"
- { yyval.opval = newSVREF(yyvsp[0].opval); ;}
+ { (yyval.opval) = newSVREF((yyvsp[0].opval)); ;}
break;
case 192:
#line 738 "perly.y"
- { yyval.opval = newAVREF(yyvsp[0].opval); ;}
+ { (yyval.opval) = newAVREF((yyvsp[0].opval)); ;}
break;
case 193:
#line 742 "perly.y"
- { yyval.opval = newHVREF(yyvsp[0].opval); ;}
+ { (yyval.opval) = newHVREF((yyvsp[0].opval)); ;}
break;
case 194:
#line 746 "perly.y"
- { yyval.opval = newAVREF(yyvsp[0].opval); ;}
+ { (yyval.opval) = newAVREF((yyvsp[0].opval)); ;}
break;
case 195:
#line 750 "perly.y"
- { yyval.opval = newGVREF(0,yyvsp[0].opval); ;}
+ { (yyval.opval) = newGVREF(0,(yyvsp[0].opval)); ;}
break;
case 196:
#line 755 "perly.y"
- { yyval.opval = scalar(yyvsp[0].opval); ;}
+ { (yyval.opval) = scalar((yyvsp[0].opval)); ;}
break;
case 197:
#line 757 "perly.y"
- { yyval.opval = scalar(yyvsp[0].opval); ;}
+ { (yyval.opval) = scalar((yyvsp[0].opval)); ;}
break;
case 198:
#line 759 "perly.y"
- { yyval.opval = scope(yyvsp[0].opval); ;}
+ { (yyval.opval) = scope((yyvsp[0].opval)); ;}
break;
case 199:
#line 762 "perly.y"
- { yyval.opval = yyvsp[0].opval; ;}
+ { (yyval.opval) = (yyvsp[0].opval); ;}
break;
diff --git a/perly.h b/perly.h
index 466c9cced2..32c0f325c8 100644
--- a/perly.h
+++ b/perly.h
@@ -1,8 +1,8 @@
#ifdef PERL_CORE
-/* A Bison parser, made by GNU Bison 1.875c. */
+/* A Bison parser, made by GNU Bison 2.0. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -171,7 +171,7 @@ typedef union YYSTYPE {
OP *opval;
GV *gvval;
} YYSTYPE;
-/* Line 1275 of yacc.c. */
+/* Line 1318 of yacc.c. */
#line 174 "perly.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
diff --git a/perly.tab b/perly.tab
index f4e4c6f656..77eb10b8aa 100644
--- a/perly.tab
+++ b/perly.tab
@@ -59,7 +59,7 @@ static const unsigned char yytranslate[] =
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
-static const unsigned short yyprhs[] =
+static const unsigned short int yyprhs[] =
{
0, 0, 3, 6, 11, 12, 13, 18, 19, 20,
21, 24, 28, 31, 33, 36, 40, 42, 44, 48,
@@ -71,12 +71,12 @@ static const unsigned short yyprhs[] =
233, 235, 239, 240, 248, 252, 256, 260, 262, 265,
269, 271, 275, 281, 288, 292, 296, 302, 305, 310,
311, 317, 319, 321, 327, 332, 338, 343, 349, 356,
- 362, 367, 373, 378, 382, 386, 390, 394, 398, 402,
- 406, 410, 414, 418, 422, 426, 430, 434, 438, 441,
- 444, 447, 450, 453, 456, 459, 462, 466, 469, 474,
- 478, 484, 487, 490, 495, 501, 506, 512, 514, 516,
- 518, 520, 526, 529, 531, 534, 538, 541, 543, 545,
- 547, 549, 551, 553, 560, 566, 571, 577, 579, 581,
+ 362, 367, 373, 378, 382, 389, 395, 399, 403, 407,
+ 411, 415, 419, 423, 427, 431, 435, 439, 443, 447,
+ 451, 454, 457, 460, 463, 466, 469, 472, 475, 479,
+ 482, 487, 491, 497, 500, 503, 508, 514, 519, 525,
+ 527, 529, 531, 533, 539, 542, 544, 547, 551, 554,
+ 556, 558, 560, 562, 564, 566, 571, 577, 579, 581,
585, 590, 594, 596, 599, 602, 604, 607, 610, 613,
615, 619, 621, 625, 630, 635, 637, 639, 643, 646,
650, 653, 655, 657, 659, 660, 662, 663, 665, 668,
@@ -84,7 +84,7 @@ static const unsigned short yyprhs[] =
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const short yyrhs[] =
+static const short int yyrhs[] =
{
86, 0, -1, 89, 93, -1, 3, 88, 93, 76,
-1, -1, -1, 3, 91, 93, 76, -1, -1, -1,
@@ -124,25 +124,25 @@ static const short yyrhs[] =
72, 3, 124, 77, 76, -1, 129, 3, 124, 77,
76, -1, 134, 72, 74, 73, -1, 134, 72, 74,
124, 73, -1, 129, 74, 124, 73, -1, 129, 74,
- 73, -1, 134, 53, 134, -1, 134, 67, 134, -1,
- 134, 36, 134, -1, 134, 37, 134, -1, 134, 61,
- 134, -1, 134, 34, 134, -1, 134, 35, 134, -1,
- 134, 60, 134, -1, 134, 59, 134, -1, 134, 28,
- 134, -1, 134, 58, 134, -1, 134, 57, 134, -1,
- 134, 56, 134, -1, 134, 62, 134, -1, 79, 134,
- -1, 80, 134, -1, 63, 134, -1, 64, 134, -1,
- 134, 69, -1, 134, 68, -1, 71, 134, -1, 70,
- 134, -1, 75, 124, 78, -1, 75, 78, -1, 40,
- 124, 77, 76, -1, 40, 77, 76, -1, 16, 114,
- 117, 118, 87, -1, 39, 134, -1, 39, 87, -1,
- 39, 4, 74, 73, -1, 39, 4, 74, 124, 73,
- -1, 39, 141, 74, 73, -1, 39, 141, 74, 124,
- 73, -1, 130, -1, 131, -1, 132, -1, 133, -1,
- 134, 54, 134, 55, 134, -1, 65, 134, -1, 135,
- -1, 42, 134, -1, 74, 124, 73, -1, 74, 73,
- -1, 141, -1, 145, -1, 143, -1, 142, -1, 144,
- -1, 129, -1, 74, 124, 73, 75, 124, 78, -1,
- 74, 73, 75, 124, 78, -1, 142, 75, 124, 78,
+ 73, -1, 74, 124, 73, 75, 124, 78, -1, 74,
+ 73, 75, 124, 78, -1, 134, 53, 134, -1, 134,
+ 67, 134, -1, 134, 36, 134, -1, 134, 37, 134,
+ -1, 134, 61, 134, -1, 134, 34, 134, -1, 134,
+ 35, 134, -1, 134, 60, 134, -1, 134, 59, 134,
+ -1, 134, 28, 134, -1, 134, 58, 134, -1, 134,
+ 57, 134, -1, 134, 56, 134, -1, 134, 62, 134,
+ -1, 79, 134, -1, 80, 134, -1, 63, 134, -1,
+ 64, 134, -1, 134, 69, -1, 134, 68, -1, 71,
+ 134, -1, 70, 134, -1, 75, 124, 78, -1, 75,
+ 78, -1, 40, 124, 77, 76, -1, 40, 77, 76,
+ -1, 16, 114, 117, 118, 87, -1, 39, 134, -1,
+ 39, 87, -1, 39, 4, 74, 73, -1, 39, 4,
+ 74, 124, 73, -1, 39, 141, 74, 73, -1, 39,
+ 141, 74, 124, 73, -1, 130, -1, 131, -1, 132,
+ -1, 133, -1, 134, 54, 134, 55, 134, -1, 65,
+ 134, -1, 135, -1, 42, 134, -1, 74, 124, 73,
+ -1, 74, 73, -1, 141, -1, 145, -1, 143, -1,
+ 142, -1, 144, -1, 129, -1, 142, 75, 124, 78,
-1, 142, 3, 124, 77, 76, -1, 7, -1, 140,
-1, 140, 74, 73, -1, 140, 74, 124, 73, -1,
41, 4, 137, -1, 27, -1, 27, 134, -1, 51,
@@ -159,7 +159,7 @@ static const short yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short yyrline[] =
+static const unsigned short int yyrline[] =
{
0, 95, 95, 101, 108, 112, 118, 125, 129, 133,
134, 136, 145, 147, 148, 157, 163, 165, 167, 169,
@@ -171,11 +171,11 @@ static const unsigned short yyrline[] =
372, 375, 380, 379, 386, 388, 390, 392, 396, 398,
400, 404, 407, 410, 415, 419, 424, 429, 431, 434,
433, 442, 443, 447, 452, 454, 458, 462, 465, 470,
- 475, 478, 483, 487, 493, 495, 497, 501, 503, 505,
- 507, 509, 511, 513, 515, 517, 519, 521, 526, 528,
- 530, 532, 534, 537, 540, 543, 550, 552, 554, 556,
- 558, 564, 566, 568, 576, 585, 589, 597, 598, 599,
- 600, 601, 603, 605, 607, 609, 611, 613, 615, 617,
+ 475, 478, 483, 487, 490, 492, 497, 499, 501, 505,
+ 507, 509, 511, 513, 515, 517, 519, 521, 523, 525,
+ 530, 532, 534, 536, 538, 541, 544, 547, 554, 556,
+ 558, 560, 562, 568, 570, 572, 580, 589, 593, 601,
+ 602, 603, 604, 605, 607, 609, 611, 613, 615, 617,
619, 621, 623, 625, 627, 629, 635, 642, 644, 646,
648, 651, 654, 657, 659, 661, 663, 665, 667, 670,
672, 674, 677, 680, 682, 684, 685, 689, 691, 696,
@@ -216,7 +216,7 @@ static const char *const yytname[] =
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const unsigned short yytoknum[] =
+static const unsigned short int yytoknum[] =
{
0, 256, 257, 123, 258, 259, 260, 261, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
@@ -243,10 +243,10 @@ static const unsigned char yyr1[] =
120, 121, 123, 122, 124, 124, 124, 124, 125, 125,
125, 126, 126, 126, 126, 126, 126, 126, 126, 127,
126, 128, 128, 129, 129, 129, 129, 129, 129, 129,
- 129, 129, 129, 129, 130, 130, 130, 130, 130, 130,
- 130, 130, 130, 130, 130, 130, 130, 130, 131, 131,
- 131, 131, 131, 131, 131, 131, 132, 132, 132, 132,
- 132, 133, 133, 133, 133, 133, 133, 134, 134, 134,
+ 129, 129, 129, 129, 129, 129, 130, 130, 130, 130,
+ 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+ 131, 131, 131, 131, 131, 131, 131, 131, 132, 132,
+ 132, 132, 132, 133, 133, 133, 133, 133, 133, 134,
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
@@ -268,12 +268,12 @@ static const unsigned char yyr2[] =
1, 3, 0, 7, 3, 3, 3, 1, 2, 3,
1, 3, 5, 6, 3, 3, 5, 2, 4, 0,
5, 1, 1, 5, 4, 5, 4, 5, 6, 5,
- 4, 5, 4, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 2, 2,
- 2, 2, 2, 2, 2, 2, 3, 2, 4, 3,
- 5, 2, 2, 4, 5, 4, 5, 1, 1, 1,
- 1, 5, 2, 1, 2, 3, 2, 1, 1, 1,
- 1, 1, 1, 6, 5, 4, 5, 1, 1, 3,
+ 4, 5, 4, 3, 6, 5, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 2, 2, 2, 2, 2, 2, 2, 2, 3, 2,
+ 4, 3, 5, 2, 2, 4, 5, 4, 5, 1,
+ 1, 1, 1, 5, 2, 1, 2, 3, 2, 1,
+ 1, 1, 1, 1, 1, 4, 5, 1, 1, 3,
4, 3, 1, 2, 2, 1, 2, 2, 2, 1,
3, 1, 3, 4, 4, 1, 1, 3, 2, 3,
2, 1, 1, 1, 0, 1, 0, 1, 2, 1,
@@ -293,42 +293,42 @@ static const unsigned char yydefact[] =
169, 0, 0, 165, 184, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 28, 0, 12,
- 17, 77, 176, 152, 137, 138, 139, 140, 80, 143,
- 158, 147, 150, 149, 151, 148, 53, 63, 64, 0,
+ 17, 77, 176, 154, 139, 140, 141, 142, 80, 145,
+ 158, 149, 152, 151, 153, 150, 53, 63, 64, 0,
64, 9, 196, 199, 198, 197, 184, 0, 0, 168,
0, 62, 4, 4, 4, 4, 4, 4, 0, 163,
0, 0, 186, 166, 167, 196, 185, 87, 197, 0,
- 194, 175, 132, 131, 147, 0, 0, 184, 144, 0,
- 178, 181, 183, 182, 190, 164, 120, 121, 142, 125,
- 124, 146, 0, 127, 0, 118, 119, 191, 192, 193,
+ 194, 175, 134, 133, 149, 0, 0, 184, 146, 0,
+ 178, 181, 183, 182, 190, 164, 122, 123, 144, 127,
+ 126, 148, 0, 129, 0, 120, 121, 191, 192, 193,
195, 0, 36, 15, 0, 0, 0, 0, 0, 0,
0, 0, 78, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 123, 122, 0, 0, 0, 0, 0, 0, 0,
+ 0, 125, 124, 0, 0, 0, 0, 0, 0, 0,
66, 0, 184, 0, 8, 85, 186, 0, 89, 64,
40, 0, 0, 0, 0, 0, 4, 170, 172, 0,
- 187, 0, 0, 81, 0, 0, 129, 0, 161, 180,
- 0, 68, 177, 0, 145, 126, 29, 20, 21, 42,
+ 187, 0, 0, 81, 0, 0, 131, 0, 161, 180,
+ 0, 68, 177, 0, 147, 128, 29, 20, 21, 42,
18, 19, 22, 76, 75, 74, 79, 0, 103, 0,
- 0, 113, 109, 110, 106, 107, 104, 0, 116, 115,
- 114, 112, 111, 108, 117, 105, 0, 91, 0, 0,
+ 0, 115, 111, 112, 108, 109, 106, 0, 118, 117,
+ 116, 114, 113, 110, 119, 107, 0, 91, 0, 0,
84, 92, 159, 0, 0, 0, 0, 0, 0, 65,
70, 69, 57, 0, 56, 3, 0, 174, 184, 0,
0, 41, 0, 0, 43, 45, 0, 0, 189, 39,
- 44, 0, 0, 17, 0, 173, 188, 88, 0, 133,
- 0, 135, 0, 128, 179, 67, 0, 0, 0, 102,
+ 44, 0, 0, 17, 0, 173, 188, 88, 0, 135,
+ 0, 137, 0, 130, 179, 67, 0, 0, 0, 102,
96, 0, 0, 100, 0, 0, 186, 160, 0, 94,
- 0, 155, 0, 73, 86, 90, 130, 37, 37, 0,
- 0, 0, 0, 40, 0, 82, 134, 136, 154, 0,
- 99, 141, 0, 101, 95, 0, 97, 156, 93, 0,
- 0, 7, 23, 23, 0, 28, 0, 0, 153, 98,
+ 0, 155, 0, 73, 86, 90, 132, 37, 37, 0,
+ 0, 0, 0, 40, 0, 82, 136, 138, 105, 0,
+ 99, 143, 0, 101, 95, 0, 97, 156, 93, 0,
+ 0, 7, 23, 23, 0, 28, 0, 0, 104, 98,
83, 28, 28, 9, 0, 0, 26, 27, 0, 34,
37, 28, 30, 31, 8, 24, 0, 28, 0, 33,
6, 0, 32, 0, 0, 0, 23, 35, 25
};
/* YYDEFGOTO[NTERM-NUM]. */
-static const short yydefgoto[] =
+static const short int yydefgoto[] =
{
-1, 1, 104, 101, 2, 362, 373, 10, 4, 23,
299, 376, 79, 162, 24, 359, 300, 290, 238, 293,
@@ -342,7 +342,7 @@ static const short yydefgoto[] =
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -344
-static const short yypact[] =
+static const short int yypact[] =
{
-344, 25, -344, -344, 238, -344, -344, 55, -344, -344,
66, -344, -344, -344, -344, -344, -344, 86, 107, 38,
@@ -387,7 +387,7 @@ static const short yypact[] =
};
/* YYPGOTO[NTERM-NUM]. */
-static const short yypgoto[] =
+static const short int yypgoto[] =
{
-344, -344, -23, -98, -344, 1424, -344, -344, -100, -344,
402, -343, -344, -189, -344, -326, -344, 89, -182, -209,
@@ -403,7 +403,7 @@ static const short yypgoto[] =
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -176
-static const short yytable[] =
+static const short int yytable[] =
{
80, 204, 77, 126, 96, 286, 301, 205, 203, 34,
100, 145, 360, 195, 210, 211, 212, 213, 214, 215,
@@ -571,12 +571,12 @@ static const short yytable[] =
0, 0, 0, 0, 0, 0, 0, 0, 63, 64,
65, 0, 0, 0, 195, 66, 67, 0, 0, 68,
69, 0, 0, 0, 71, 72, 73, 74, 75, 76,
- -147, -147, -147, -147, 0, 0, 0, -147, 0, -147,
- 0, 0, 0, 0, 0, -147, -147, -147, -147, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, -147,
- -147, -147, 0, -147, -147, -147, -147, -147, -147, -147,
- -147, -147, -147, -147, 0, 0, 0, 0, -147, -147,
- -147, 0, 0, -147, -147, 0, 196, 0, -147, -147,
+ -149, -149, -149, -149, 0, 0, 0, -149, 0, -149,
+ 0, 0, 0, 0, 0, -149, -149, -149, -149, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, -149,
+ -149, -149, 0, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, -149, 0, 0, 0, 0, -149, -149,
+ -149, 0, 0, -149, -149, 0, 196, 0, -149, -149,
-175, -175, -175, -175, 0, 0, 0, -175, 0, -175,
0, 0, 0, 0, 0, -175, -175, -175, -175, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, -175,
@@ -604,7 +604,7 @@ static const short yytable[] =
0, 190, 191, 192, 0, 0, 193
};
-static const short yycheck[] =
+static const short int yycheck[] =
{
25, 101, 25, 54, 27, 206, 215, 106, 100, 3,
32, 62, 338, 3, 112, 113, 114, 115, 116, 117,
diff --git a/perly.y b/perly.y
index 16ba650bc1..2e218624c2 100644
--- a/perly.y
+++ b/perly.y
@@ -487,6 +487,10 @@ subscripted: star '{' expr ';' '}' /* *main::{something} */
| subscripted '(' ')' /* $foo->{bar}->() */
{ $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
newCVREF(0, scalar($1))); }
+ | '(' expr ')' '[' expr ']' /* list slice */
+ { $$ = newSLICEOP(0, $5, $2); }
+ | '(' ')' '[' expr ']' /* empty list slice! */
+ { $$ = newSLICEOP(0, $4, Nullop); }
;
/* Binary operators between terms */
@@ -622,10 +626,6 @@ term : termbinop
{ $$ = newUNOP(OP_AV2ARYLEN, 0, ref($1, OP_AV2ARYLEN));}
| subscripted
{ $$ = $1; }
- | '(' expr ')' '[' expr ']' /* list slice */
- { $$ = newSLICEOP(0, $5, $2); }
- | '(' ')' '[' expr ']' /* empty list slice! */
- { $$ = newSLICEOP(0, $4, Nullop); }
| ary '[' expr ']' /* array slice */
{ $$ = prepend_elem(OP_ASLICE,
newOP(OP_PUSHMARK, 0),
diff --git a/t/op/ref.t b/t/op/ref.t
index 53f3facac5..81a6543c34 100755
--- a/t/op/ref.t
+++ b/t/op/ref.t
@@ -8,7 +8,7 @@ BEGIN {
require 'test.pl';
use strict qw(refs subs);
-plan (89);
+plan (96);
# Test glob operations.
@@ -425,6 +425,23 @@ TODO: {
'Accessing via a different NUL-containing name gives nothing');
}
+# test derefs after list slice
+
+is ( ({foo => "bar"})[0]{foo}, "bar", 'hash deref from list slice w/o ->' );
+is ( ({foo => "bar"})[0]->{foo}, "bar", 'hash deref from list slice w/ ->' );
+is ( ([qw/foo bar/])[0][1], "bar", 'array deref from list slice w/o ->' );
+is ( ([qw/foo bar/])[0]->[1], "bar", 'array deref from list slice w/ ->' );
+is ( (sub {"bar"})[0](), "bar", 'code deref from list slice w/o ->' );
+is ( (sub {"bar"})[0]->(), "bar", 'code deref from list slice w/ ->' );
+
+# deref on empty list shouldn't autovivify
+{
+ local $@;
+ eval { ()[0]{foo} };
+ like ( "$@", "Can't use an undefined value as a HASH reference",
+ "deref of undef from list slice fails" );
+}
+
# Bit of a hack to make test.pl happy. There are 3 more tests after it leaves.
$test = curr_test();
curr_test($test + 3);