summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perly.act371
-rw-r--r--perly.h13
-rw-r--r--perly.tab50
-rw-r--r--perly.y1
-rw-r--r--regen_perly.pl8
5 files changed, 222 insertions, 221 deletions
diff --git a/perly.act b/perly.act
index 243dfcb1b3..590c0a5328 100644
--- a/perly.act
+++ b/perly.act
@@ -1,56 +1,56 @@
case 2:
-#line 97 "perly.y"
+#line 98 "perly.y"
{ (yyval.ival) = (yyvsp[-1].ival); newPROG(block_end((yyvsp[-1].ival),(yyvsp[0].opval))); ;}
break;
case 3:
-#line 102 "perly.y"
+#line 103 "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)); ;}
break;
case 4:
-#line 108 "perly.y"
+#line 109 "perly.y"
{ (yyval.ival) = block_start(TRUE); ;}
break;
case 5:
-#line 112 "perly.y"
+#line 113 "perly.y"
{
PL_expect = XSTATE; (yyval.ival) = block_start(TRUE);
;}
break;
case 6:
-#line 119 "perly.y"
+#line 120 "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)); ;}
break;
case 7:
-#line 125 "perly.y"
+#line 126 "perly.y"
{ (yyval.ival) = block_start(FALSE); ;}
break;
case 8:
-#line 129 "perly.y"
+#line 130 "perly.y"
{ (yyval.ival) = PL_savestack_ix; ;}
break;
case 9:
-#line 133 "perly.y"
+#line 134 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 10:
-#line 135 "perly.y"
+#line 136 "perly.y"
{ (yyval.opval) = (yyvsp[-1].opval); ;}
break;
case 11:
-#line 137 "perly.y"
+#line 138 "perly.y"
{ LEAVE_SCOPE((yyvsp[-1].ival));
(yyval.opval) = append_list(OP_LINESEQ,
(LISTOP*)(yyvsp[-2].opval), (LISTOP*)(yyvsp[0].opval));
@@ -59,12 +59,12 @@ case 2:
break;
case 12:
-#line 146 "perly.y"
+#line 147 "perly.y"
{ (yyval.opval) = newSTATEOP(0, (yyvsp[-1].pval), (yyvsp[0].opval)); ;}
break;
case 14:
-#line 149 "perly.y"
+#line 150 "perly.y"
{ if ((yyvsp[-1].pval) != Nullch) {
(yyval.opval) = newSTATEOP(0, (yyvsp[-1].pval), newOP(OP_NULL, 0));
}
@@ -76,90 +76,90 @@ case 2:
break;
case 15:
-#line 158 "perly.y"
+#line 159 "perly.y"
{ (yyval.opval) = newSTATEOP(0, (yyvsp[-2].pval), (yyvsp[-1].opval));
PL_expect = XSTATE; ;}
break;
case 16:
-#line 164 "perly.y"
+#line 165 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 17:
-#line 166 "perly.y"
+#line 167 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 18:
-#line 168 "perly.y"
+#line 169 "perly.y"
{ (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[0].opval), (yyvsp[-2].opval)); ;}
break;
case 19:
-#line 170 "perly.y"
+#line 171 "perly.y"
{ (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[0].opval), (yyvsp[-2].opval)); ;}
break;
case 20:
-#line 172 "perly.y"
+#line 173 "perly.y"
{ (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((yyvsp[0].opval)), (yyvsp[-2].opval)); ;}
break;
case 21:
-#line 174 "perly.y"
+#line 175 "perly.y"
{ (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (yyvsp[0].opval), (yyvsp[-2].opval));;}
break;
case 22:
-#line 176 "perly.y"
+#line 177 "perly.y"
{ (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"
+#line 183 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 24:
-#line 184 "perly.y"
+#line 185 "perly.y"
{ ((yyvsp[0].opval))->op_flags |= OPf_PARENS; (yyval.opval) = scope((yyvsp[0].opval)); ;}
break;
case 25:
-#line 186 "perly.y"
+#line 187 "perly.y"
{ 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"
+#line 194 "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))); ;}
break;
case 27:
-#line 197 "perly.y"
+#line 198 "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))); ;}
break;
case 28:
-#line 204 "perly.y"
+#line 205 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 29:
-#line 206 "perly.y"
+#line 207 "perly.y"
{ (yyval.opval) = scope((yyvsp[0].opval)); ;}
break;
case 30:
-#line 211 "perly.y"
+#line 212 "perly.y"
{ PL_copline = (line_t)(yyvsp[-7].ival);
(yyval.opval) = block_end((yyvsp[-5].ival),
newSTATEOP(0, (yyvsp[-8].pval),
@@ -168,7 +168,7 @@ case 2:
break;
case 31:
-#line 217 "perly.y"
+#line 218 "perly.y"
{ PL_copline = (line_t)(yyvsp[-7].ival);
(yyval.opval) = block_end((yyvsp[-5].ival),
newSTATEOP(0, (yyvsp[-8].pval),
@@ -177,26 +177,26 @@ case 2:
break;
case 32:
-#line 223 "perly.y"
+#line 224 "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))); ;}
break;
case 33:
-#line 226 "perly.y"
+#line 227 "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))); ;}
break;
case 34:
-#line 230 "perly.y"
+#line 231 "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))); ;}
break;
case 35:
-#line 235 "perly.y"
+#line 236 "perly.y"
{ OP *forop;
PL_copline = (line_t)(yyvsp[-10].ival);
forop = newSTATEOP(0, (yyvsp[-11].pval),
@@ -214,121 +214,121 @@ case 2:
break;
case 36:
-#line 250 "perly.y"
+#line 251 "perly.y"
{ (yyval.opval) = newSTATEOP(0, (yyvsp[-2].pval),
newWHILEOP(0, 1, (LOOP*)Nullop,
NOLINE, Nullop, (yyvsp[-1].opval), (yyvsp[0].opval), 0)); ;}
break;
case 37:
-#line 257 "perly.y"
+#line 258 "perly.y"
{ (yyval.ival) = (PL_min_intro_pending &&
PL_max_intro_pending >= PL_min_intro_pending);
intro_my(); ;}
break;
case 38:
-#line 263 "perly.y"
+#line 264 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 40:
-#line 269 "perly.y"
+#line 270 "perly.y"
{ (void)scan_num("1", &yylval); (yyval.opval) = yylval.opval; ;}
break;
case 42:
-#line 275 "perly.y"
+#line 276 "perly.y"
{ (yyval.opval) = invert(scalar((yyvsp[0].opval))); ;}
break;
case 43:
-#line 280 "perly.y"
+#line 281 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); intro_my(); ;}
break;
case 44:
-#line 284 "perly.y"
+#line 285 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); intro_my(); ;}
break;
case 45:
-#line 288 "perly.y"
+#line 289 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); intro_my(); ;}
break;
case 46:
-#line 293 "perly.y"
+#line 294 "perly.y"
{ (yyval.pval) = Nullch; ;}
break;
case 48:
-#line 299 "perly.y"
+#line 300 "perly.y"
{ (yyval.ival) = 0; ;}
break;
case 49:
-#line 301 "perly.y"
+#line 302 "perly.y"
{ (yyval.ival) = 0; ;}
break;
case 50:
-#line 303 "perly.y"
+#line 304 "perly.y"
{ (yyval.ival) = 0; ;}
break;
case 51:
-#line 305 "perly.y"
+#line 306 "perly.y"
{ (yyval.ival) = 0; ;}
break;
case 52:
-#line 307 "perly.y"
+#line 308 "perly.y"
{ (yyval.ival) = 0; ;}
break;
case 53:
-#line 311 "perly.y"
+#line 312 "perly.y"
{ newFORM((yyvsp[-2].ival), (yyvsp[-1].opval), (yyvsp[0].opval)); ;}
break;
case 54:
-#line 314 "perly.y"
+#line 315 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 55:
-#line 315 "perly.y"
+#line 316 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 56:
-#line 320 "perly.y"
+#line 321 "perly.y"
{ newMYSUB((yyvsp[-4].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); ;}
break;
case 57:
-#line 325 "perly.y"
+#line 326 "perly.y"
{ newATTRSUB((yyvsp[-4].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); ;}
break;
case 58:
-#line 329 "perly.y"
+#line 330 "perly.y"
{ (yyval.ival) = start_subparse(FALSE, 0); ;}
break;
case 59:
-#line 333 "perly.y"
+#line 334 "perly.y"
{ (yyval.ival) = start_subparse(FALSE, CVf_ANON); ;}
break;
case 60:
-#line 337 "perly.y"
+#line 338 "perly.y"
{ (yyval.ival) = start_subparse(TRUE, 0); ;}
break;
case 61:
-#line 341 "perly.y"
+#line 342 "perly.y"
{ const char *const name = SvPV_nolen_const(((SVOP*)(yyvsp[0].opval))->op_sv);
if (strEQ(name, "BEGIN") || strEQ(name, "END")
|| strEQ(name, "INIT") || strEQ(name, "CHECK"))
@@ -337,99 +337,99 @@ case 2:
break;
case 62:
-#line 350 "perly.y"
+#line 351 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 64:
-#line 356 "perly.y"
+#line 357 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 65:
-#line 358 "perly.y"
+#line 359 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 66:
-#line 360 "perly.y"
+#line 361 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 67:
-#line 365 "perly.y"
+#line 366 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 68:
-#line 367 "perly.y"
+#line 368 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 69:
-#line 371 "perly.y"
+#line 372 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 70:
-#line 372 "perly.y"
+#line 373 "perly.y"
{ (yyval.opval) = Nullop; PL_expect = XSTATE; ;}
break;
case 71:
-#line 376 "perly.y"
+#line 377 "perly.y"
{ package((yyvsp[-1].opval)); ;}
break;
case 72:
-#line 380 "perly.y"
+#line 381 "perly.y"
{ CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ ;}
break;
case 73:
-#line 382 "perly.y"
+#line 383 "perly.y"
{ utilize((yyvsp[-6].ival), (yyvsp[-5].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval)); ;}
break;
case 74:
-#line 387 "perly.y"
+#line 388 "perly.y"
{ (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 75:
-#line 389 "perly.y"
+#line 390 "perly.y"
{ (yyval.opval) = newLOGOP((yyvsp[-1].ival), 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 76:
-#line 391 "perly.y"
+#line 392 "perly.y"
{ (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 78:
-#line 397 "perly.y"
+#line 398 "perly.y"
{ (yyval.opval) = (yyvsp[-1].opval); ;}
break;
case 79:
-#line 399 "perly.y"
+#line 400 "perly.y"
{ (yyval.opval) = append_elem(OP_LIST, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 81:
-#line 405 "perly.y"
+#line 406 "perly.y"
{ (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"
+#line 409 "perly.y"
{ (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"
+#line 412 "perly.y"
{ (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST,
prepend_elem(OP_LIST, scalar((yyvsp[-5].opval)), (yyvsp[-1].opval)),
@@ -437,14 +437,14 @@ case 2:
break;
case 84:
-#line 416 "perly.y"
+#line 417 "perly.y"
{ (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"
+#line 421 "perly.y"
{ (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST,
prepend_elem(OP_LIST, (yyvsp[-1].opval), (yyvsp[0].opval)),
@@ -452,7 +452,7 @@ case 2:
break;
case 86:
-#line 425 "perly.y"
+#line 426 "perly.y"
{ (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST,
prepend_elem(OP_LIST, (yyvsp[-3].opval), (yyvsp[-1].opval)),
@@ -460,60 +460,60 @@ case 2:
break;
case 87:
-#line 430 "perly.y"
+#line 431 "perly.y"
{ (yyval.opval) = convert((yyvsp[-1].ival), 0, (yyvsp[0].opval)); ;}
break;
case 88:
-#line 432 "perly.y"
+#line 433 "perly.y"
{ (yyval.opval) = convert((yyvsp[-3].ival), 0, (yyvsp[-1].opval)); ;}
break;
case 89:
-#line 434 "perly.y"
+#line 435 "perly.y"
{ (yyvsp[0].opval) = newANONATTRSUB((yyvsp[-1].ival), 0, Nullop, (yyvsp[0].opval)); ;}
break;
case 90:
-#line 436 "perly.y"
+#line 437 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST,
prepend_elem(OP_LIST, (yyvsp[-2].opval), (yyvsp[0].opval)), (yyvsp[-4].opval))); ;}
break;
case 93:
-#line 450 "perly.y"
+#line 451 "perly.y"
{ (yyval.opval) = newBINOP(OP_GELEM, 0, (yyvsp[-4].opval), scalar((yyvsp[-2].opval)));
PL_expect = XOPERATOR; ;}
break;
case 94:
-#line 453 "perly.y"
+#line 454 "perly.y"
{ (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((yyvsp[-3].opval)), scalar((yyvsp[-1].opval))); ;}
break;
case 95:
-#line 455 "perly.y"
+#line 456 "perly.y"
{ (yyval.opval) = newBINOP(OP_AELEM, 0,
ref(newAVREF((yyvsp[-4].opval)),OP_RV2AV),
scalar((yyvsp[-1].opval)));;}
break;
case 96:
-#line 459 "perly.y"
+#line 460 "perly.y"
{ (yyval.opval) = newBINOP(OP_AELEM, 0,
ref(newAVREF((yyvsp[-3].opval)),OP_RV2AV),
scalar((yyvsp[-1].opval)));;}
break;
case 97:
-#line 463 "perly.y"
+#line 464 "perly.y"
{ (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((yyvsp[-4].opval)), jmaybe((yyvsp[-2].opval)));
PL_expect = XOPERATOR; ;}
break;
case 98:
-#line 466 "perly.y"
+#line 467 "perly.y"
{ (yyval.opval) = newBINOP(OP_HELEM, 0,
ref(newHVREF((yyvsp[-5].opval)),OP_RV2HV),
jmaybe((yyvsp[-2].opval)));
@@ -521,7 +521,7 @@ case 2:
break;
case 99:
-#line 471 "perly.y"
+#line 472 "perly.y"
{ (yyval.opval) = newBINOP(OP_HELEM, 0,
ref(newHVREF((yyvsp[-4].opval)),OP_RV2HV),
jmaybe((yyvsp[-2].opval)));
@@ -529,194 +529,194 @@ case 2:
break;
case 100:
-#line 476 "perly.y"
+#line 477 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
newCVREF(0, scalar((yyvsp[-3].opval)))); ;}
break;
case 101:
-#line 479 "perly.y"
+#line 480 "perly.y"
{ (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"
+#line 485 "perly.y"
{ (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"
+#line 489 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
newCVREF(0, scalar((yyvsp[-2].opval)))); ;}
break;
case 104:
-#line 491 "perly.y"
+#line 492 "perly.y"
{ (yyval.opval) = newSLICEOP(0, (yyvsp[-1].opval), (yyvsp[-4].opval)); ;}
break;
case 105:
-#line 493 "perly.y"
+#line 494 "perly.y"
{ (yyval.opval) = newSLICEOP(0, (yyvsp[-1].opval), Nullop); ;}
break;
case 106:
-#line 498 "perly.y"
+#line 499 "perly.y"
{ (yyval.opval) = newASSIGNOP(OPf_STACKED, (yyvsp[-2].opval), (yyvsp[-1].ival), (yyvsp[0].opval)); ;}
break;
case 107:
-#line 500 "perly.y"
+#line 501 "perly.y"
{ (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 108:
-#line 502 "perly.y"
+#line 503 "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"
+#line 507 "perly.y"
{ (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 110:
-#line 508 "perly.y"
+#line 509 "perly.y"
{ (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 111:
-#line 510 "perly.y"
+#line 511 "perly.y"
{ (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 112:
-#line 512 "perly.y"
+#line 513 "perly.y"
{ (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 113:
-#line 514 "perly.y"
+#line 515 "perly.y"
{ (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 114:
-#line 516 "perly.y"
+#line 517 "perly.y"
{ (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;}
break;
case 115:
-#line 518 "perly.y"
+#line 519 "perly.y"
{ (yyval.opval) = newRANGE((yyvsp[-1].ival), scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval)));;}
break;
case 116:
-#line 520 "perly.y"
+#line 521 "perly.y"
{ (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 117:
-#line 522 "perly.y"
+#line 523 "perly.y"
{ (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 118:
-#line 524 "perly.y"
+#line 525 "perly.y"
{ (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 119:
-#line 526 "perly.y"
+#line 527 "perly.y"
{ (yyval.opval) = bind_match((yyvsp[-1].ival), (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 120:
-#line 531 "perly.y"
+#line 532 "perly.y"
{ (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((yyvsp[0].opval))); ;}
break;
case 121:
-#line 533 "perly.y"
+#line 534 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 122:
-#line 535 "perly.y"
+#line 536 "perly.y"
{ (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[0].opval))); ;}
break;
case 123:
-#line 537 "perly.y"
+#line 538 "perly.y"
{ (yyval.opval) = newUNOP(OP_COMPLEMENT, 0, scalar((yyvsp[0].opval)));;}
break;
case 124:
-#line 539 "perly.y"
+#line 540 "perly.y"
{ (yyval.opval) = newUNOP(OP_POSTINC, 0,
mod(scalar((yyvsp[-1].opval)), OP_POSTINC)); ;}
break;
case 125:
-#line 542 "perly.y"
+#line 543 "perly.y"
{ (yyval.opval) = newUNOP(OP_POSTDEC, 0,
mod(scalar((yyvsp[-1].opval)), OP_POSTDEC)); ;}
break;
case 126:
-#line 545 "perly.y"
+#line 546 "perly.y"
{ (yyval.opval) = newUNOP(OP_PREINC, 0,
mod(scalar((yyvsp[0].opval)), OP_PREINC)); ;}
break;
case 127:
-#line 548 "perly.y"
+#line 549 "perly.y"
{ (yyval.opval) = newUNOP(OP_PREDEC, 0,
mod(scalar((yyvsp[0].opval)), OP_PREDEC)); ;}
break;
case 128:
-#line 555 "perly.y"
+#line 556 "perly.y"
{ (yyval.opval) = newANONLIST((yyvsp[-1].opval)); ;}
break;
case 129:
-#line 557 "perly.y"
+#line 558 "perly.y"
{ (yyval.opval) = newANONLIST(Nullop); ;}
break;
case 130:
-#line 559 "perly.y"
+#line 560 "perly.y"
{ (yyval.opval) = newANONHASH((yyvsp[-2].opval)); ;}
break;
case 131:
-#line 561 "perly.y"
+#line 562 "perly.y"
{ (yyval.opval) = newANONHASH(Nullop); ;}
break;
case 132:
-#line 563 "perly.y"
+#line 564 "perly.y"
{ (yyval.opval) = newANONATTRSUB((yyvsp[-3].ival), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); ;}
break;
case 133:
-#line 569 "perly.y"
+#line 570 "perly.y"
{ (yyval.opval) = dofile((yyvsp[0].opval), (yyvsp[-1].ival)); ;}
break;
case 134:
-#line 571 "perly.y"
+#line 572 "perly.y"
{ (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, scope((yyvsp[0].opval))); ;}
break;
case 135:
-#line 573 "perly.y"
+#line 574 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB,
OPf_SPECIAL|OPf_STACKED,
prepend_elem(OP_LIST,
@@ -727,7 +727,7 @@ case 2:
break;
case 136:
-#line 581 "perly.y"
+#line 582 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB,
OPf_SPECIAL|OPf_STACKED,
append_elem(OP_LIST,
@@ -739,14 +739,14 @@ case 2:
break;
case 137:
-#line 590 "perly.y"
+#line 591 "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 138:
-#line 594 "perly.y"
+#line 595 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
prepend_elem(OP_LIST,
(yyvsp[-1].opval),
@@ -754,67 +754,67 @@ case 2:
break;
case 143:
-#line 606 "perly.y"
+#line 607 "perly.y"
{ (yyval.opval) = newCONDOP(0, (yyvsp[-4].opval), (yyvsp[-2].opval), (yyvsp[0].opval)); ;}
break;
case 144:
-#line 608 "perly.y"
+#line 609 "perly.y"
{ (yyval.opval) = newUNOP(OP_REFGEN, 0, mod((yyvsp[0].opval),OP_REFGEN)); ;}
break;
case 145:
-#line 610 "perly.y"
+#line 611 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 146:
-#line 612 "perly.y"
+#line 613 "perly.y"
{ (yyval.opval) = localize((yyvsp[0].opval),(yyvsp[-1].ival)); ;}
break;
case 147:
-#line 614 "perly.y"
+#line 615 "perly.y"
{ (yyval.opval) = sawparens((yyvsp[-1].opval)); ;}
break;
case 148:
-#line 616 "perly.y"
+#line 617 "perly.y"
{ (yyval.opval) = sawparens(newNULLLIST()); ;}
break;
case 149:
-#line 618 "perly.y"
+#line 619 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 150:
-#line 620 "perly.y"
+#line 621 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 151:
-#line 622 "perly.y"
+#line 623 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 152:
-#line 624 "perly.y"
+#line 625 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 153:
-#line 626 "perly.y"
+#line 627 "perly.y"
{ (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((yyvsp[0].opval), OP_AV2ARYLEN));;}
break;
case 154:
-#line 628 "perly.y"
+#line 629 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 155:
-#line 630 "perly.y"
+#line 631 "perly.y"
{ (yyval.opval) = prepend_elem(OP_ASLICE,
newOP(OP_PUSHMARK, 0),
newLISTOP(OP_ASLICE, 0,
@@ -823,7 +823,7 @@ case 2:
break;
case 156:
-#line 636 "perly.y"
+#line 637 "perly.y"
{ (yyval.opval) = prepend_elem(OP_HSLICE,
newOP(OP_PUSHMARK, 0),
newLISTOP(OP_HSLICE, 0,
@@ -833,225 +833,226 @@ case 2:
break;
case 157:
-#line 643 "perly.y"
+#line 644 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 158:
-#line 645 "perly.y"
+#line 646 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((yyvsp[0].opval))); ;}
break;
case 159:
-#line 647 "perly.y"
+#line 648 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[-2].opval))); ;}
break;
case 160:
-#line 649 "perly.y"
+#line 650 "perly.y"
{ (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"
+#line 653 "perly.y"
{ (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"
+#line 656 "perly.y"
{ (yyval.opval) = newOP((yyvsp[0].ival), OPf_SPECIAL);
PL_hints |= HINT_BLOCK_SCOPE; ;}
break;
case 163:
-#line 658 "perly.y"
+#line 659 "perly.y"
{ (yyval.opval) = newLOOPEX((yyvsp[-1].ival),(yyvsp[0].opval)); ;}
break;
case 164:
-#line 660 "perly.y"
+#line 661 "perly.y"
{ (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[0].opval))); ;}
break;
case 165:
-#line 662 "perly.y"
+#line 663 "perly.y"
{ (yyval.opval) = newOP((yyvsp[0].ival), 0); ;}
break;
case 166:
-#line 664 "perly.y"
+#line 665 "perly.y"
{ (yyval.opval) = newUNOP((yyvsp[-1].ival), 0, (yyvsp[0].opval)); ;}
break;
case 167:
-#line 666 "perly.y"
+#line 667 "perly.y"
{ (yyval.opval) = newUNOP((yyvsp[-1].ival), 0, (yyvsp[0].opval)); ;}
break;
case 168:
-#line 668 "perly.y"
+#line 669 "perly.y"
{ (yyval.opval) = newOP(OP_REQUIRE, (yyvsp[0].ival) ? OPf_SPECIAL : 0); ;}
break;
case 169:
-#line 670 "perly.y"
+#line 671 "perly.y"
{ (yyval.opval) = newUNOP(OP_REQUIRE, (yyvsp[-1].ival) ? OPf_SPECIAL : 0, (yyvsp[0].opval)); ;}
break;
case 170:
-#line 672 "perly.y"
+#line 673 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST, (yyvsp[0].opval), scalar((yyvsp[-1].opval)))); ;}
break;
case 171:
-#line 675 "perly.y"
+#line 676 "perly.y"
{ (yyval.opval) = newOP((yyvsp[0].ival), 0); ;}
break;
case 172:
-#line 677 "perly.y"
+#line 678 "perly.y"
{ (yyval.opval) = newOP((yyvsp[-2].ival), 0); ;}
break;
case 173:
-#line 679 "perly.y"
+#line 680 "perly.y"
{ (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
scalar((yyvsp[0].opval))); ;}
break;
case 174:
-#line 682 "perly.y"
+#line 683 "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); ;}
break;
case 175:
-#line 685 "perly.y"
+#line 686 "perly.y"
{ (yyval.opval) = newUNOP((yyvsp[-3].ival), 0, (yyvsp[-1].opval)); ;}
break;
case 176:
-#line 687 "perly.y"
+#line 688 "perly.y"
{ (yyval.opval) = pmruntime((yyvsp[-3].opval), (yyvsp[-1].opval), 1); ;}
break;
case 179:
-#line 694 "perly.y"
+#line 695 "perly.y"
{ (yyval.opval) = my_attrs((yyvsp[-1].opval),(yyvsp[0].opval)); ;}
break;
case 180:
-#line 696 "perly.y"
+#line 697 "perly.y"
{ (yyval.opval) = localize((yyvsp[0].opval),(yyvsp[-1].ival)); ;}
break;
case 181:
-#line 701 "perly.y"
+#line 702 "perly.y"
{ (yyval.opval) = sawparens((yyvsp[-1].opval)); ;}
break;
case 182:
-#line 703 "perly.y"
+#line 704 "perly.y"
{ (yyval.opval) = sawparens(newNULLLIST()); ;}
break;
case 183:
-#line 705 "perly.y"
+#line 706 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 184:
-#line 707 "perly.y"
+#line 708 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 185:
-#line 709 "perly.y"
+#line 710 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 186:
-#line 714 "perly.y"
+#line 715 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 187:
-#line 716 "perly.y"
+#line 717 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 188:
-#line 720 "perly.y"
+#line 721 "perly.y"
{ (yyval.opval) = Nullop; ;}
break;
case 189:
-#line 722 "perly.y"
+#line 723 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
case 190:
-#line 724 "perly.y"
+#line 725 "perly.y"
{ (yyval.opval) = (yyvsp[-1].opval); ;}
break;
case 191:
-#line 730 "perly.y"
+#line 731 "perly.y"
{ PL_in_my = 0; (yyval.opval) = my((yyvsp[0].opval)); ;}
break;
case 192:
-#line 734 "perly.y"
+#line 735 "perly.y"
{ (yyval.opval) = newCVREF((yyvsp[-1].ival),(yyvsp[0].opval)); ;}
break;
case 193:
-#line 738 "perly.y"
+#line 739 "perly.y"
{ (yyval.opval) = newSVREF((yyvsp[0].opval)); ;}
break;
case 194:
-#line 742 "perly.y"
+#line 743 "perly.y"
{ (yyval.opval) = newAVREF((yyvsp[0].opval)); ;}
break;
case 195:
-#line 746 "perly.y"
+#line 747 "perly.y"
{ (yyval.opval) = newHVREF((yyvsp[0].opval)); ;}
break;
case 196:
-#line 750 "perly.y"
+#line 751 "perly.y"
{ (yyval.opval) = newAVREF((yyvsp[0].opval)); ;}
break;
case 197:
-#line 754 "perly.y"
+#line 755 "perly.y"
{ (yyval.opval) = newGVREF(0,(yyvsp[0].opval)); ;}
break;
case 198:
-#line 759 "perly.y"
+#line 760 "perly.y"
{ (yyval.opval) = scalar((yyvsp[0].opval)); ;}
break;
case 199:
-#line 761 "perly.y"
+#line 762 "perly.y"
{ (yyval.opval) = scalar((yyvsp[0].opval)); ;}
break;
case 200:
-#line 763 "perly.y"
+#line 764 "perly.y"
{ (yyval.opval) = scope((yyvsp[0].opval)); ;}
break;
case 201:
-#line 766 "perly.y"
+#line 767 "perly.y"
{ (yyval.opval) = (yyvsp[0].opval); ;}
break;
+ default: break;
diff --git a/perly.h b/perly.h
index 13044e6002..cbcebc5a99 100644
--- a/perly.h
+++ b/perly.h
@@ -1,8 +1,8 @@
#ifdef PERL_CORE
-/* A Bison parser, made by GNU Bison 2.0. */
+/* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -96,6 +96,7 @@
ARROW = 321
};
#endif
+/* Tokens. */
#define WORD 258
#define METHOD 259
#define FUNCMETH 260
@@ -173,8 +174,8 @@ typedef union YYSTYPE {
OP *opval;
GV *gvval;
} YYSTYPE;
-/* Line 1318 of yacc.c. */
-#line 176 "perly.h"
+/* Line 1447 of yacc.c. */
+#line 177 "perly.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
diff --git a/perly.tab b/perly.tab
index 09c2306290..48ac1b308e 100644
--- a/perly.tab
+++ b/perly.tab
@@ -15,7 +15,7 @@
#define YYUNDEFTOK 2
#define YYMAXUTOK 321
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
@@ -163,32 +163,32 @@ static const short int yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
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, 173, 175, 182, 183, 185, 192, 196, 204, 205,
- 210, 216, 222, 225, 229, 232, 249, 257, 263, 264,
- 269, 270, 274, 279, 283, 287, 293, 294, 298, 300,
- 302, 304, 306, 310, 314, 315, 319, 324, 329, 333,
- 337, 341, 350, 351, 356, 357, 359, 364, 366, 371,
- 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, 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, 669,
- 671, 674, 676, 678, 681, 684, 686, 688, 689, 693,
- 695, 700, 702, 704, 706, 708, 713, 715, 720, 721,
- 723, 729, 733, 737, 741, 745, 749, 753, 758, 760,
- 762, 765
+ 0, 96, 96, 102, 109, 113, 119, 126, 130, 134,
+ 135, 137, 146, 148, 149, 158, 164, 166, 168, 170,
+ 172, 174, 176, 183, 184, 186, 193, 197, 205, 206,
+ 211, 217, 223, 226, 230, 233, 250, 258, 264, 265,
+ 270, 271, 275, 280, 284, 288, 294, 295, 299, 301,
+ 303, 305, 307, 311, 315, 316, 320, 325, 330, 334,
+ 338, 342, 351, 352, 357, 358, 360, 365, 367, 372,
+ 373, 376, 381, 380, 387, 389, 391, 393, 397, 399,
+ 401, 405, 408, 411, 416, 420, 425, 430, 432, 435,
+ 434, 443, 444, 448, 453, 455, 459, 463, 466, 471,
+ 476, 479, 484, 488, 491, 493, 498, 500, 502, 506,
+ 508, 510, 512, 514, 516, 518, 520, 522, 524, 526,
+ 531, 533, 535, 537, 539, 542, 545, 548, 555, 557,
+ 559, 561, 563, 569, 571, 573, 581, 590, 594, 602,
+ 603, 604, 605, 606, 608, 610, 612, 614, 616, 618,
+ 620, 622, 624, 626, 628, 630, 636, 643, 645, 647,
+ 649, 652, 655, 658, 660, 662, 664, 666, 668, 670,
+ 672, 675, 677, 679, 682, 685, 687, 689, 690, 694,
+ 696, 701, 703, 705, 707, 709, 714, 716, 721, 722,
+ 724, 730, 734, 738, 742, 746, 750, 754, 759, 761,
+ 763, 766
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
@@ -364,7 +364,7 @@ static const short int yypact[] =
308, 64, 68, -352, -352, -352, -352, -352, -352, 120,
1860, 126, 1068, 574, -352, 308, 1770, 117, -352, 1709,
1642, -352, 128, -352, 308, 52, 135, 108, 1642, 308,
- 1150, 148, -352, -352, -352, 1860, -352, 117, 266, 266,
+ 1150, 148, -352, -352, -352, 308, -352, 117, 266, 266,
266, -9, -9, 161, -21, -352, 118, 266, 266, -352,
-352, -352, -352, 64, -352, -352, 1642, 1642, 1642, 1642,
1642, 1642, 1642, 1642, 1642, 1642, 1232, 1642, 1642, 1642,
diff --git a/perly.y b/perly.y
index 1d20b04ce0..250176ac9e 100644
--- a/perly.y
+++ b/perly.y
@@ -77,6 +77,7 @@
%nonassoc EQOP
%nonassoc RELOP
%nonassoc UNIOP UNIOPSUB
+%nonassoc REQUIRE
%left <ival> SHIFTOP
%left ADDOP
%left MULOP
diff --git a/regen_perly.pl b/regen_perly.pl
index 02b6ba0845..67f763f455 100644
--- a/regen_perly.pl
+++ b/regen_perly.pl
@@ -65,13 +65,11 @@ die "$0: must be run on an ASCII system\n" unless ord 'A' == 65;
# the test below to allow that version too. DAPM Feb 04.
my $version = `$bison -V`;
-unless ($version =~ /\b(1\.875[a-z]?|2\.0)\b/) { die <<EOF; }
+unless ($version =~ /\b(1\.875[a-z]?|2\.[01])\b/) { die <<EOF; }
You have the wrong version of bison in your path; currently 1.875
-or 2.0 is required. Try installing
- http://ftp.gnu.org/gnu/bison/bison-2.0.tar.gz
-or
- http://ftp.gnu.org/gnu/bison/bison-1.875.tar.bz2
+2.0 or 2.1 is required. Try installing
+ http://ftp.gnu.org/gnu/bison/bison-2.1.tar.gz
or similar. Your bison identifies itself as:
$version