b8c914
From 52ef21e43af97a7ed71a9bb7621a3c058196cfc2 Mon Sep 17 00:00:00 2001
b8c914
From: Zefram <zefram@fysh.org>
b8c914
Date: Tue, 16 Jan 2018 08:04:08 +0000
b8c914
Subject: [PATCH] fix parsing of braced subscript after parens
b8c914
MIME-Version: 1.0
b8c914
Content-Type: text/plain; charset=UTF-8
b8c914
Content-Transfer-Encoding: 8bit
b8c914
b8c914
Where an arrow is omitted between subscripts, if a parenthesised
b8c914
subscript is followed by a braced one, PL_expect was getting set to
b8c914
XBLOCK due to code intended for "foreach (...) {...}".  This broke
b8c914
bareword autoquotation, and the parsing of operators following the
b8c914
braced subscript.  Alter PL_expect from XBLOCK to XOPERATOR following
b8c914
a parenthesised subscript.  Fixes [perl #8045].
b8c914
b8c914
Petr Písař: Ported to 5.26.1.
b8c914
b8c914
Signed-off-by: Petr Písař <ppisar@redhat.com>
b8c914
---
b8c914
 perly.act           | 250 +++++++++++++++++++++++++++-------------------------
b8c914
 perly.h             |  10 ++-
b8c914
 perly.tab           |  30 +++----
b8c914
 perly.y             |  20 ++++-
b8c914
 t/op/postfixderef.t |  25 +++++-
b8c914
 5 files changed, 192 insertions(+), 143 deletions(-)
b8c914
b8c914
diff --git a/perly.act b/perly.act
b8c914
index 73c44e5..4f74883 100644
b8c914
--- a/perly.act
b8c914
+++ b/perly.act
b8c914
@@ -1194,65 +1194,77 @@ case 2:
b8c914
   case 141:
b8c914
 #line 931 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
-				   newCVREF(0, scalar((ps[-3].val.opval)))); }
b8c914
+				   newCVREF(0, scalar((ps[-3].val.opval))));
b8c914
+			  if (parser->expect == XBLOCK)
b8c914
+			      parser->expect = XOPERATOR;
b8c914
+			}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 142:
b8c914
-#line 934 "perly.y" /* yacc.c:1646  */
b8c914
+#line 937 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
 				   op_append_elem(OP_LIST, (ps[-1].val.opval),
b8c914
-				       newCVREF(0, scalar((ps[-4].val.opval))))); }
b8c914
+				       newCVREF(0, scalar((ps[-4].val.opval)))));
b8c914
+			  if (parser->expect == XBLOCK)
b8c914
+			      parser->expect = XOPERATOR;
b8c914
+			}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 143:
b8c914
-#line 939 "perly.y" /* yacc.c:1646  */
b8c914
+#line 945 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
 				   op_append_elem(OP_LIST, (ps[-1].val.opval),
b8c914
-					       newCVREF(0, scalar((ps[-3].val.opval))))); }
b8c914
+					       newCVREF(0, scalar((ps[-3].val.opval)))));
b8c914
+			  if (parser->expect == XBLOCK)
b8c914
+			      parser->expect = XOPERATOR;
b8c914
+			}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 144:
b8c914
-#line 943 "perly.y" /* yacc.c:1646  */
b8c914
+#line 952 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
-				   newCVREF(0, scalar((ps[-2].val.opval)))); }
b8c914
+				   newCVREF(0, scalar((ps[-2].val.opval))));
b8c914
+			  if (parser->expect == XBLOCK)
b8c914
+			      parser->expect = XOPERATOR;
b8c914
+			}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 145:
b8c914
-#line 946 "perly.y" /* yacc.c:1646  */
b8c914
+#line 958 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-4].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 146:
b8c914
-#line 948 "perly.y" /* yacc.c:1646  */
b8c914
+#line 960 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-3].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 147:
b8c914
-#line 950 "perly.y" /* yacc.c:1646  */
b8c914
+#line 962 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), NULL); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 148:
b8c914
-#line 955 "perly.y" /* yacc.c:1646  */
b8c914
+#line 967 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newASSIGNOP(OPf_STACKED, (ps[-2].val.opval), (ps[-1].val.ival), (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 149:
b8c914
-#line 957 "perly.y" /* yacc.c:1646  */
b8c914
+#line 969 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 150:
b8c914
-#line 959 "perly.y" /* yacc.c:1646  */
b8c914
+#line 971 "perly.y" /* yacc.c:1646  */
b8c914
     {   if ((ps[-1].val.ival) != OP_REPEAT)
b8c914
 				scalar((ps[-2].val.opval));
b8c914
 			    (yyval.opval) = newBINOP((ps[-1].val.ival), 0, (ps[-2].val.opval), scalar((ps[0].val.opval)));
b8c914
@@ -1261,111 +1273,111 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 151:
b8c914
-#line 964 "perly.y" /* yacc.c:1646  */
b8c914
+#line 976 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 152:
b8c914
-#line 966 "perly.y" /* yacc.c:1646  */
b8c914
+#line 978 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 153:
b8c914
-#line 968 "perly.y" /* yacc.c:1646  */
b8c914
+#line 980 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 154:
b8c914
-#line 970 "perly.y" /* yacc.c:1646  */
b8c914
+#line 982 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 155:
b8c914
-#line 972 "perly.y" /* yacc.c:1646  */
b8c914
+#line 984 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 156:
b8c914
-#line 974 "perly.y" /* yacc.c:1646  */
b8c914
+#line 986 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 157:
b8c914
-#line 976 "perly.y" /* yacc.c:1646  */
b8c914
+#line 988 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newRANGE((ps[-1].val.ival), scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 158:
b8c914
-#line 978 "perly.y" /* yacc.c:1646  */
b8c914
+#line 990 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 159:
b8c914
-#line 980 "perly.y" /* yacc.c:1646  */
b8c914
+#line 992 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 160:
b8c914
-#line 982 "perly.y" /* yacc.c:1646  */
b8c914
+#line 994 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 161:
b8c914
-#line 984 "perly.y" /* yacc.c:1646  */
b8c914
+#line 996 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = bind_match((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 162:
b8c914
-#line 989 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1001 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 163:
b8c914
-#line 991 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1003 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 164:
b8c914
-#line 994 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1006 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 165:
b8c914
-#line 996 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1008 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 166:
b8c914
-#line 998 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1010 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_POSTINC, 0,
b8c914
 					op_lvalue(scalar((ps[-1].val.opval)), OP_POSTINC)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 167:
b8c914
-#line 1001 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1013 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_POSTDEC, 0,
b8c914
 					op_lvalue(scalar((ps[-1].val.opval)), OP_POSTDEC));}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 168:
b8c914
-#line 1004 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1016 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = op_convert_list(OP_JOIN, 0,
b8c914
 				       op_append_elem(
b8c914
 					OP_LIST,
b8c914
@@ -1380,52 +1392,52 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 169:
b8c914
-#line 1015 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1027 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_PREINC, 0,
b8c914
 					op_lvalue(scalar((ps[0].val.opval)), OP_PREINC)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 170:
b8c914
-#line 1018 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1030 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_PREDEC, 0,
b8c914
 					op_lvalue(scalar((ps[0].val.opval)), OP_PREDEC)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 171:
b8c914
-#line 1025 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1037 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newANONLIST((ps[-1].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 172:
b8c914
-#line 1027 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1039 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newANONLIST(NULL);}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 173:
b8c914
-#line 1029 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1041 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newANONHASH((ps[-2].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 174:
b8c914
-#line 1031 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1043 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newANONHASH(NULL); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 175:
b8c914
-#line 1033 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1045 "perly.y" /* yacc.c:1646  */
b8c914
     { SvREFCNT_inc_simple_void(PL_compcv);
b8c914
 			  (yyval.opval) = newANONATTRSUB((ps[-3].val.ival), (ps[-2].val.opval), (ps[-1].val.opval), (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 176:
b8c914
-#line 1036 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1048 "perly.y" /* yacc.c:1646  */
b8c914
     {
b8c914
 			  OP *body;
b8c914
 			  if (parser->copline > (line_t)(ps[-2].val.ival))
b8c914
@@ -1439,103 +1451,103 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 177:
b8c914
-#line 1050 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1062 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = dofile((ps[0].val.opval), (ps[-1].val.ival));}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 178:
b8c914
-#line 1052 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1064 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, op_scope((ps[0].val.opval)));}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 183:
b8c914
-#line 1060 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1072 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newCONDOP(0, (ps[-4].val.opval), (ps[-2].val.opval), (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 184:
b8c914
-#line 1062 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1074 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_REFGEN, 0, (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 185:
b8c914
-#line 1064 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1076 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_REFGEN, 0, localize((ps[0].val.opval),1)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 186:
b8c914
-#line 1066 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1078 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 187:
b8c914
-#line 1068 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1080 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = localize((ps[0].val.opval),0); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 188:
b8c914
-#line 1070 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1082 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = sawparens((ps[-1].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 189:
b8c914
-#line 1072 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1084 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 190:
b8c914
-#line 1074 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1086 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = sawparens(newNULLLIST()); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 191:
b8c914
-#line 1076 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1088 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 192:
b8c914
-#line 1078 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1090 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 193:
b8c914
-#line 1080 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1092 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 194:
b8c914
-#line 1082 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1094 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 195:
b8c914
-#line 1084 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1096 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((ps[0].val.opval), OP_AV2ARYLEN));}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 196:
b8c914
-#line 1086 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1098 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 197:
b8c914
-#line 1088 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1100 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = op_prepend_elem(OP_ASLICE,
b8c914
 				newOP(OP_PUSHMARK, 0),
b8c914
 				    newLISTOP(OP_ASLICE, 0,
b8c914
@@ -1549,7 +1561,7 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 198:
b8c914
-#line 1098 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1110 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = op_prepend_elem(OP_KVASLICE,
b8c914
 				newOP(OP_PUSHMARK, 0),
b8c914
 				    newLISTOP(OP_KVASLICE, 0,
b8c914
@@ -1563,7 +1575,7 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 199:
b8c914
-#line 1108 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1120 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = op_prepend_elem(OP_HSLICE,
b8c914
 				newOP(OP_PUSHMARK, 0),
b8c914
 				    newLISTOP(OP_HSLICE, 0,
b8c914
@@ -1577,7 +1589,7 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 200:
b8c914
-#line 1118 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1130 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = op_prepend_elem(OP_KVHSLICE,
b8c914
 				newOP(OP_PUSHMARK, 0),
b8c914
 				    newLISTOP(OP_KVHSLICE, 0,
b8c914
@@ -1591,26 +1603,26 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 201:
b8c914
-#line 1128 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1140 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 202:
b8c914
-#line 1130 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1142 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 203:
b8c914
-#line 1132 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1144 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[-2].val.opval)));
b8c914
 			}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 204:
b8c914
-#line 1135 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1147 "perly.y" /* yacc.c:1646  */
b8c914
     {
b8c914
 			  (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
 				op_append_elem(OP_LIST, (ps[-1].val.opval), scalar((ps[-3].val.opval))));
b8c914
@@ -1619,7 +1631,7 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 205:
b8c914
-#line 1140 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1152 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
 			    op_append_elem(OP_LIST, (ps[0].val.opval), scalar((ps[-1].val.opval))));
b8c914
 			}
b8c914
@@ -1627,130 +1639,130 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 206:
b8c914
-#line 1144 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1156 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newSVREF((ps[-3].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 207:
b8c914
-#line 1146 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1158 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newAVREF((ps[-3].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 208:
b8c914
-#line 1148 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1160 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newHVREF((ps[-3].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 209:
b8c914
-#line 1150 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1162 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, 0,
b8c914
 				       scalar(newCVREF((ps[-1].val.ival),(ps[-3].val.opval)))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 210:
b8c914
-#line 1153 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1165 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newGVREF(0,(ps[-3].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 211:
b8c914
-#line 1155 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1167 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newOP((ps[0].val.ival), OPf_SPECIAL);
b8c914
 			    PL_hints |= HINT_BLOCK_SCOPE; }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 212:
b8c914
-#line 1158 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1170 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newLOOPEX((ps[-1].val.ival),(ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 213:
b8c914
-#line 1160 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1172 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 214:
b8c914
-#line 1162 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1174 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newOP((ps[0].val.ival), 0); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 215:
b8c914
-#line 1164 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1176 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 216:
b8c914
-#line 1166 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1178 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 217:
b8c914
-#line 1168 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1180 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newOP(OP_REQUIRE, (ps[0].val.ival) ? OPf_SPECIAL : 0); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 218:
b8c914
-#line 1170 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1182 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_REQUIRE, (ps[-1].val.ival) ? OPf_SPECIAL : 0, (ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 219:
b8c914
-#line 1172 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1184 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 220:
b8c914
-#line 1174 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1186 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
 			    op_append_elem(OP_LIST, (ps[0].val.opval), scalar((ps[-1].val.opval)))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 221:
b8c914
-#line 1177 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1189 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newOP((ps[0].val.ival), 0); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 222:
b8c914
-#line 1179 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1191 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newOP((ps[-2].val.ival), 0);}
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 223:
b8c914
-#line 1181 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1193 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 224:
b8c914
-#line 1183 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1195 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[-2].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 225:
b8c914
-#line 1185 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1197 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 226:
b8c914
-#line 1187 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1199 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = ((ps[-2].val.ival) == OP_NOT)
b8c914
                           ? newUNOP((ps[-2].val.ival), 0, newSVOP(OP_CONST, 0, newSViv(0)))
b8c914
                           : newOP((ps[-2].val.ival), OPf_SPECIAL); }
b8c914
@@ -1758,13 +1770,13 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 227:
b8c914
-#line 1191 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1203 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP((ps[-3].val.ival), 0, (ps[-1].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 228:
b8c914
-#line 1193 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1205 "perly.y" /* yacc.c:1646  */
b8c914
     {
b8c914
 			    if (   (ps[0].val.opval)->op_type != OP_TRANS
b8c914
 			        && (ps[0].val.opval)->op_type != OP_TRANSR
b8c914
@@ -1779,13 +1791,13 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 229:
b8c914
-#line 1204 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1216 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = pmruntime((ps[-5].val.opval), (ps[-2].val.opval), (ps[-1].val.opval), 1, (ps[-4].val.ival)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 232:
b8c914
-#line 1208 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1220 "perly.y" /* yacc.c:1646  */
b8c914
     {
b8c914
 			  (yyval.opval) = newLISTOP(OP_DIE, 0, newOP(OP_PUSHMARK, 0),
b8c914
 				newSVOP(OP_CONST, 0, newSVpvs("Unimplemented")));
b8c914
@@ -1794,109 +1806,109 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 234:
b8c914
-#line 1217 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1229 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = my_attrs((ps[-1].val.opval),(ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 235:
b8c914
-#line 1219 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1231 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = localize((ps[0].val.opval),1); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 236:
b8c914
-#line 1221 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1233 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newUNOP(OP_REFGEN, 0, my_attrs((ps[-1].val.opval),(ps[0].val.opval))); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 237:
b8c914
-#line 1226 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1238 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = sawparens((ps[-1].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 238:
b8c914
-#line 1228 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1240 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = sawparens(newNULLLIST()); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 239:
b8c914
-#line 1231 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1243 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 240:
b8c914
-#line 1233 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1245 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 241:
b8c914
-#line 1235 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1247 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 242:
b8c914
-#line 1240 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1252 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = NULL; }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 243:
b8c914
-#line 1242 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1254 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 244:
b8c914
-#line 1246 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1258 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = NULL; }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 245:
b8c914
-#line 1248 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1260 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 246:
b8c914
-#line 1252 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1264 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = NULL; }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 247:
b8c914
-#line 1254 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1266 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 248:
b8c914
-#line 1260 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1272 "perly.y" /* yacc.c:1646  */
b8c914
     { parser->in_my = 0; (yyval.opval) = my((ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 256:
b8c914
-#line 1277 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1289 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newCVREF((ps[-1].val.ival),(ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 257:
b8c914
-#line 1281 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1293 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newSVREF((ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 258:
b8c914
-#line 1285 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1297 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newAVREF((ps[0].val.opval));
b8c914
 			  if ((yyval.opval)) (yyval.opval)->op_private |= (ps[-1].val.ival);
b8c914
 			}
b8c914
@@ -1904,7 +1916,7 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 259:
b8c914
-#line 1291 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1303 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newHVREF((ps[0].val.opval));
b8c914
 			  if ((yyval.opval)) (yyval.opval)->op_private |= (ps[-1].val.ival);
b8c914
 			}
b8c914
@@ -1912,61 +1924,61 @@ case 2:
b8c914
     break;
b8c914
 
b8c914
   case 260:
b8c914
-#line 1297 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1309 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newAVREF((ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 261:
b8c914
-#line 1299 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1311 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newAVREF((ps[-3].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 262:
b8c914
-#line 1303 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1315 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newGVREF(0,(ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 264:
b8c914
-#line 1308 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1320 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newAVREF((ps[-2].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 266:
b8c914
-#line 1313 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1325 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newHVREF((ps[-2].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 268:
b8c914
-#line 1318 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1330 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = newGVREF(0,(ps[-2].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 269:
b8c914
-#line 1323 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1335 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = scalar((ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 270:
b8c914
-#line 1325 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1337 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = scalar((ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 271:
b8c914
-#line 1327 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1339 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = op_scope((ps[0].val.opval)); }
b8c914
 
b8c914
     break;
b8c914
 
b8c914
   case 272:
b8c914
-#line 1330 "perly.y" /* yacc.c:1646  */
b8c914
+#line 1342 "perly.y" /* yacc.c:1646  */
b8c914
     { (yyval.opval) = (ps[0].val.opval); }
b8c914
 
b8c914
     break;
b8c914
@@ -1977,6 +1989,6 @@ case 2:
b8c914
     
b8c914
 
b8c914
 /* Generated from:
b8c914
- * a8b5527eacb1205d15c8c01acb4a8f99b494e5b453ddd68a2a2e7fca4be3302a perly.y
b8c914
+ * c44aaa81abd3fc5c53b5aee014f9e6e11ef70a4c8470b767618f5938627ef0e7 perly.y
b8c914
  * 153cba5d215c1a083a0459c43f4d55c45fd0a7093c197d7247a456dcde21ea53 regen_perly.pl
b8c914
  * ex: set ro: */
b8c914
diff --git a/perly.h b/perly.h
b8c914
index a7e9a43..256d797 100644
b8c914
--- a/perly.h
b8c914
+++ b/perly.h
b8c914
@@ -7,11 +7,11 @@
b8c914
 #define PERL_BISON_VERSION  30000
b8c914
 
b8c914
 #ifdef PERL_CORE
b8c914
-/* A Bison parser, made by GNU Bison 3.0.2.  */
b8c914
+/* A Bison parser, made by GNU Bison 3.0.4.  */
b8c914
 
b8c914
 /* Bison interface for Yacc-like parsers in C
b8c914
 
b8c914
-   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
b8c914
+   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
b8c914
 
b8c914
    This program is free software: you can redistribute it and/or modify
b8c914
    it under the terms of the GNU General Public License as published by
b8c914
@@ -160,7 +160,7 @@ S_is_opval_token(int type) {
b8c914
 #endif /* PERL_IN_TOKE_C */
b8c914
 #endif /* PERL_CORE */
b8c914
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
b8c914
-typedef union YYSTYPE YYSTYPE;
b8c914
+
b8c914
 union YYSTYPE
b8c914
 {
b8c914
 
b8c914
@@ -171,6 +171,8 @@ union YYSTYPE
b8c914
     GV *gvval;
b8c914
 
b8c914
 };
b8c914
+
b8c914
+typedef union YYSTYPE YYSTYPE;
b8c914
 # define YYSTYPE_IS_TRIVIAL 1
b8c914
 # define YYSTYPE_IS_DECLARED 1
b8c914
 #endif
b8c914
@@ -181,6 +183,6 @@ int yyparse (void);
b8c914
 
b8c914
 
b8c914
 /* Generated from:
b8c914
- * a8b5527eacb1205d15c8c01acb4a8f99b494e5b453ddd68a2a2e7fca4be3302a perly.y
b8c914
+ * c44aaa81abd3fc5c53b5aee014f9e6e11ef70a4c8470b767618f5938627ef0e7 perly.y
b8c914
  * 153cba5d215c1a083a0459c43f4d55c45fd0a7093c197d7247a456dcde21ea53 regen_perly.pl
b8c914
  * ex: set ro: */
b8c914
diff --git a/perly.tab b/perly.tab
b8c914
index e4065de..fe19874 100644
b8c914
--- a/perly.tab
b8c914
+++ b/perly.tab
b8c914
@@ -83,20 +83,20 @@ static const yytype_uint16 yyrline[] =
b8c914
      769,   774,   773,   825,   826,   830,   832,   834,   836,   840,
b8c914
      842,   847,   851,   855,   859,   865,   870,   876,   882,   884,
b8c914
      887,   886,   897,   898,   902,   906,   909,   914,   919,   922,
b8c914
-     926,   930,   933,   938,   942,   945,   947,   949,   954,   956,
b8c914
-     958,   963,   965,   967,   969,   971,   973,   975,   977,   979,
b8c914
-     981,   983,   988,   990,   993,   995,   997,  1000,  1003,  1014,
b8c914
-    1017,  1024,  1026,  1028,  1030,  1032,  1035,  1049,  1051,  1055,
b8c914
-    1056,  1057,  1058,  1059,  1061,  1063,  1065,  1067,  1069,  1071,
b8c914
-    1073,  1075,  1077,  1079,  1081,  1083,  1085,  1087,  1097,  1107,
b8c914
-    1117,  1127,  1129,  1131,  1134,  1139,  1143,  1145,  1147,  1149,
b8c914
-    1152,  1154,  1157,  1159,  1161,  1163,  1165,  1167,  1169,  1171,
b8c914
-    1173,  1176,  1178,  1180,  1182,  1184,  1186,  1190,  1193,  1192,
b8c914
-    1205,  1206,  1207,  1212,  1216,  1218,  1220,  1225,  1227,  1230,
b8c914
-    1232,  1234,  1239,  1241,  1246,  1247,  1252,  1253,  1259,  1263,
b8c914
-    1264,  1265,  1268,  1269,  1272,  1273,  1276,  1280,  1284,  1290,
b8c914
-    1296,  1298,  1302,  1306,  1307,  1311,  1312,  1316,  1317,  1322,
b8c914
-    1324,  1326,  1329
b8c914
+     926,   930,   936,   944,   951,   957,   959,   961,   966,   968,
b8c914
+     970,   975,   977,   979,   981,   983,   985,   987,   989,   991,
b8c914
+     993,   995,  1000,  1002,  1005,  1007,  1009,  1012,  1015,  1026,
b8c914
+    1029,  1036,  1038,  1040,  1042,  1044,  1047,  1061,  1063,  1067,
b8c914
+    1068,  1069,  1070,  1071,  1073,  1075,  1077,  1079,  1081,  1083,
b8c914
+    1085,  1087,  1089,  1091,  1093,  1095,  1097,  1099,  1109,  1119,
b8c914
+    1129,  1139,  1141,  1143,  1146,  1151,  1155,  1157,  1159,  1161,
b8c914
+    1164,  1166,  1169,  1171,  1173,  1175,  1177,  1179,  1181,  1183,
b8c914
+    1185,  1188,  1190,  1192,  1194,  1196,  1198,  1202,  1205,  1204,
b8c914
+    1217,  1218,  1219,  1224,  1228,  1230,  1232,  1237,  1239,  1242,
b8c914
+    1244,  1246,  1251,  1253,  1258,  1259,  1264,  1265,  1271,  1275,
b8c914
+    1276,  1277,  1280,  1281,  1284,  1285,  1288,  1292,  1296,  1302,
b8c914
+    1308,  1310,  1314,  1318,  1319,  1323,  1324,  1328,  1329,  1334,
b8c914
+    1336,  1338,  1341
b8c914
 };
b8c914
 #endif
b8c914
 
b8c914
@@ -1109,6 +1109,6 @@ static const toketypes yy_type_tab[] =
b8c914
 };
b8c914
 
b8c914
 /* Generated from:
b8c914
- * a8b5527eacb1205d15c8c01acb4a8f99b494e5b453ddd68a2a2e7fca4be3302a perly.y
b8c914
+ * c44aaa81abd3fc5c53b5aee014f9e6e11ef70a4c8470b767618f5938627ef0e7 perly.y
b8c914
  * 153cba5d215c1a083a0459c43f4d55c45fd0a7093c197d7247a456dcde21ea53 regen_perly.pl
b8c914
  * ex: set ro: */
b8c914
diff --git a/perly.y b/perly.y
b8c914
index 7d57dea..14d48d6 100644
b8c914
--- a/perly.y
b8c914
+++ b/perly.y
b8c914
@@ -929,19 +929,31 @@ subscripted:    gelem '{' expr ';' '}'        /* *main::{something} */
b8c914
 					jmaybe($3)); }
b8c914
 	|	term ARROW '(' ')'          /* $subref->() */
b8c914
 			{ $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
-				   newCVREF(0, scalar($1))); }
b8c914
+				   newCVREF(0, scalar($1)));
b8c914
+			  if (parser->expect == XBLOCK)
b8c914
+			      parser->expect = XOPERATOR;
b8c914
+			}
b8c914
 	|	term ARROW '(' expr ')'     /* $subref->(@args) */
b8c914
 			{ $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
 				   op_append_elem(OP_LIST, $4,
b8c914
-				       newCVREF(0, scalar($1)))); }
b8c914
+				       newCVREF(0, scalar($1))));
b8c914
+			  if (parser->expect == XBLOCK)
b8c914
+			      parser->expect = XOPERATOR;
b8c914
+			}
b8c914
 
b8c914
 	|	subscripted '(' expr ')'   /* $foo->{bar}->(@args) */
b8c914
 			{ $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
 				   op_append_elem(OP_LIST, $3,
b8c914
-					       newCVREF(0, scalar($1)))); }
b8c914
+					       newCVREF(0, scalar($1))));
b8c914
+			  if (parser->expect == XBLOCK)
b8c914
+			      parser->expect = XOPERATOR;
b8c914
+			}
b8c914
 	|	subscripted '(' ')'        /* $foo->{bar}->() */
b8c914
 			{ $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
b8c914
-				   newCVREF(0, scalar($1))); }
b8c914
+				   newCVREF(0, scalar($1)));
b8c914
+			  if (parser->expect == XBLOCK)
b8c914
+			      parser->expect = XOPERATOR;
b8c914
+			}
b8c914
 	|	'(' expr ')' '[' expr ']'            /* list slice */
b8c914
 			{ $$ = newSLICEOP(0, $5, $2); }
b8c914
 	|	QWLIST '[' expr ']'            /* list literal slice */
b8c914
diff --git a/t/op/postfixderef.t b/t/op/postfixderef.t
b8c914
index ba69f06..c2983cf 100644
b8c914
--- a/t/op/postfixderef.t
b8c914
+++ b/t/op/postfixderef.t
b8c914
@@ -16,7 +16,7 @@ BEGIN {
b8c914
 
b8c914
 use strict qw(refs subs);
b8c914
 
b8c914
-plan(116);
b8c914
+plan(130);
b8c914
 
b8c914
 {
b8c914
     no strict 'refs';
b8c914
@@ -365,3 +365,26 @@ is "$_->@{foo}", "foo->7 8 9", '->@{ does not interpolate without feature';
b8c914
     is "foo$ref->$*bar", "foo plus overload plus bar",
b8c914
        '"foo $s->$* bar" does concat overloading';
b8c914
 }
b8c914
+
b8c914
+# parsing of {} subscript as subscript rather than block
b8c914
+{
b8c914
+    sub ppp { "qqq" }
b8c914
+    my $h = { ppp => "pp", qqq => "qq", rrr => 7 };
b8c914
+    is ${$h}{ppp}, "pp";
b8c914
+    is ${$h}{"rrr"} - 2, 5;
b8c914
+    my $ar = [$h];
b8c914
+    is $ar->[0]->{ppp}, "pp";
b8c914
+    is $ar->[0]->{"rrr"} - 2, 5;
b8c914
+    is $ar->[0]{ppp}, "pp";
b8c914
+    is $ar->[0]{"rrr"} - 2, 5;
b8c914
+    my $hr = {h=>$h};
b8c914
+    is $hr->{"h"}->{ppp}, "pp";
b8c914
+    is $hr->{"h"}->{"rrr"} - 2, 5;
b8c914
+    is $hr->{"h"}{ppp}, "pp";
b8c914
+    is $hr->{"h"}{"rrr"} - 2, 5;
b8c914
+    my $cr = sub { $h };
b8c914
+    is $cr->()->{ppp}, "pp";
b8c914
+    is $cr->()->{"rrr"} - 2, 5;
b8c914
+    is $cr->(){ppp}, "pp";
b8c914
+    is $cr->(){"rrr"} - 2, 5;
b8c914
+}
b8c914
-- 
b8c914
2.13.6
b8c914