#include "EXTERN.h"
#include "perl.h"
+#define yydebug PL_yydebug
+#define yynerrs PL_yynerrs
+#define yyerrflag PL_yyerrflag
+#define yychar PL_yychar
+#define yyval PL_yyval
+#define yylval PL_yylval
+
+#ifdef PERL_OBJECT
+static void
+Dep(CPerlObj *pPerl)
+{
+ pPerl->deprecate("\"do\" to call subroutines");
+}
+#define dep() Dep(this)
+#else
static void
dep(void)
{
deprecate("\"do\" to call subroutines");
}
+#endif
-#line 16 "perly.c"
+#line 30 "perly.y"
#define YYERRCODE 256
short yylhs[] = { -1,
45, 0, 9, 7, 10, 8, 11, 11, 11, 12,
#define YYMAXDEPTH 500
#endif
#endif
-int yydebug;
-int yynerrs;
-int yyerrflag;
-int yychar;
-YYSTYPE yyval;
-YYSTYPE yylval;
-#line 636 "perly.y"
+#line 643 "perly.y"
/* PROGRAM */
-#line 1349 "y.tab.c"
+#line 1353 "perly.c"
#define YYABORT goto yyabort
#define YYACCEPT goto yyaccept
#define YYERROR goto yyerrlab
yys = 0;
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
if (!yys) yys = "illegal-symbol";
- fprintf(stderr, "yydebug: state %d, reading %d (%s)\n", yystate,
+ PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", yystate,
yychar, yys);
}
#endif
{
#if YYDEBUG
if (yydebug)
- fprintf(stderr, "yydebug: state %d, shifting to state %d\n",
+ PerlIO_printf(Perl_debug_log, "yydebug: state %d, shifting to state %d\n",
yystate, yytable[yyn]);
#endif
if (yyssp >= yyss + yystacksize - 1)
int yypv_index = (yyvsp - yyvs);
yystacksize += YYSTACKSIZE;
ysave->yyvs = yyvs =
- (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
+ (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
ysave->yyss = yyss =
- (short*)realloc((char*)yyss,yystacksize * sizeof(short));
+ (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short));
if (!yyvs || !yyss)
goto yyoverflow;
yyssp = yyss + yyps_index;
{
#if YYDEBUG
if (yydebug)
- fprintf(stderr,
+ PerlIO_printf(Perl_debug_log,
"yydebug: state %d, error recovery shifting to state %d\n",
*yyssp, yytable[yyn]);
#endif
int yyps_index = (yyssp - yyss);
int yypv_index = (yyvsp - yyvs);
yystacksize += YYSTACKSIZE;
- ysave->yyvs = yyvs = (YYSTYPE*)realloc((char*)yyvs,
+ ysave->yyvs = yyvs = (YYSTYPE*)PerlMem_realloc((char*)yyvs,
yystacksize * sizeof(YYSTYPE));
- ysave->yyss = yyss = (short*)realloc((char*)yyss,
+ ysave->yyss = yyss = (short*)PerlMem_realloc((char*)yyss,
yystacksize * sizeof(short));
if (!yyvs || !yyss)
goto yyoverflow;
{
#if YYDEBUG
if (yydebug)
- fprintf(stderr,
+ PerlIO_printf(Perl_debug_log,
"yydebug: error recovery discarding state %d\n",
*yyssp);
#endif
yys = 0;
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
if (!yys) yys = "illegal-symbol";
- fprintf(stderr,
+ PerlIO_printf(Perl_debug_log,
"yydebug: state %d, error recovery discards token %d (%s)\n",
yystate, yychar, yys);
}
yyreduce:
#if YYDEBUG
if (yydebug)
- fprintf(stderr, "yydebug: state %d, reducing by rule %d (%s)\n",
+ PerlIO_printf(Perl_debug_log, "yydebug: state %d, reducing by rule %d (%s)\n",
yystate, yyn, yyrule[yyn]);
#endif
yym = yylen[yyn];
switch (yyn)
{
case 1:
-#line 86 "perly.y"
+#line 94 "perly.y"
{
#if defined(YYDEBUG) && defined(DEBUGGING)
- yydebug = (debug & 1);
+ yydebug = (PL_debug & 1);
#endif
- expect = XSTATE;
+ PL_expect = XSTATE;
}
break;
case 2:
-#line 93 "perly.y"
+#line 101 "perly.y"
{ newPROG(yyvsp[0].opval); }
break;
case 3:
-#line 97 "perly.y"
-{ if (copline > (line_t)yyvsp[-3].ival)
- copline = yyvsp[-3].ival;
+#line 105 "perly.y"
+{ if (PL_copline > (line_t)yyvsp[-3].ival)
+ PL_copline = yyvsp[-3].ival;
yyval.opval = block_end(yyvsp[-2].ival, yyvsp[-1].opval); }
break;
case 4:
-#line 103 "perly.y"
+#line 111 "perly.y"
{ yyval.ival = block_start(TRUE); }
break;
case 5:
-#line 107 "perly.y"
-{ if (copline > (line_t)yyvsp[-3].ival)
- copline = yyvsp[-3].ival;
+#line 115 "perly.y"
+{ if (PL_copline > (line_t)yyvsp[-3].ival)
+ PL_copline = yyvsp[-3].ival;
yyval.opval = block_end(yyvsp[-2].ival, yyvsp[-1].opval); }
break;
case 6:
-#line 113 "perly.y"
+#line 121 "perly.y"
{ yyval.ival = block_start(FALSE); }
break;
case 7:
-#line 117 "perly.y"
+#line 125 "perly.y"
{ yyval.opval = Nullop; }
break;
case 8:
-#line 119 "perly.y"
+#line 127 "perly.y"
{ yyval.opval = yyvsp[-1].opval; }
break;
case 9:
-#line 121 "perly.y"
+#line 129 "perly.y"
{ yyval.opval = append_list(OP_LINESEQ,
(LISTOP*)yyvsp[-1].opval, (LISTOP*)yyvsp[0].opval);
- pad_reset_pending = TRUE;
- if (yyvsp[-1].opval && yyvsp[0].opval) hints |= HINT_BLOCK_SCOPE; }
+ PL_pad_reset_pending = TRUE;
+ if (yyvsp[-1].opval && yyvsp[0].opval) PL_hints |= HINT_BLOCK_SCOPE; }
break;
case 10:
-#line 128 "perly.y"
+#line 136 "perly.y"
{ yyval.opval = newSTATEOP(0, yyvsp[-1].pval, yyvsp[0].opval); }
break;
case 12:
-#line 131 "perly.y"
+#line 139 "perly.y"
{ if (yyvsp[-1].pval != Nullch) {
yyval.opval = newSTATEOP(0, yyvsp[-1].pval, newOP(OP_NULL, 0));
}
else {
yyval.opval = Nullop;
- copline = NOLINE;
+ PL_copline = NOLINE;
}
- expect = XSTATE; }
+ PL_expect = XSTATE; }
break;
case 13:
-#line 140 "perly.y"
+#line 148 "perly.y"
{ yyval.opval = newSTATEOP(0, yyvsp[-2].pval, yyvsp[-1].opval);
- expect = XSTATE; }
+ PL_expect = XSTATE; }
break;
case 14:
-#line 145 "perly.y"
+#line 153 "perly.y"
{ yyval.opval = Nullop; }
break;
case 15:
-#line 147 "perly.y"
+#line 155 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 16:
-#line 149 "perly.y"
+#line 157 "perly.y"
{ yyval.opval = newLOGOP(OP_AND, 0, yyvsp[0].opval, yyvsp[-2].opval); }
break;
case 17:
-#line 151 "perly.y"
+#line 159 "perly.y"
{ yyval.opval = newLOGOP(OP_OR, 0, yyvsp[0].opval, yyvsp[-2].opval); }
break;
case 18:
-#line 153 "perly.y"
+#line 161 "perly.y"
{ yyval.opval = newLOOPOP(OPf_PARENS, 1, scalar(yyvsp[0].opval), yyvsp[-2].opval); }
break;
case 19:
-#line 155 "perly.y"
+#line 163 "perly.y"
{ yyval.opval = newLOOPOP(OPf_PARENS, 1, yyvsp[0].opval, yyvsp[-2].opval);}
break;
case 20:
-#line 157 "perly.y"
+#line 165 "perly.y"
{ yyval.opval = newFOROP(0, Nullch, yyvsp[-1].ival,
Nullop, yyvsp[0].opval, yyvsp[-2].opval, Nullop); }
break;
case 21:
-#line 162 "perly.y"
+#line 170 "perly.y"
{ yyval.opval = Nullop; }
break;
case 22:
-#line 164 "perly.y"
+#line 172 "perly.y"
{ yyval.opval = scope(yyvsp[0].opval); }
break;
case 23:
-#line 166 "perly.y"
-{ copline = yyvsp[-5].ival;
+#line 174 "perly.y"
+{ PL_copline = yyvsp[-5].ival;
yyval.opval = newSTATEOP(0, Nullch,
newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval));
- hints |= HINT_BLOCK_SCOPE; }
+ PL_hints |= HINT_BLOCK_SCOPE; }
break;
case 24:
-#line 173 "perly.y"
-{ copline = yyvsp[-6].ival;
+#line 181 "perly.y"
+{ PL_copline = yyvsp[-6].ival;
yyval.opval = block_end(yyvsp[-4].ival,
newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); }
break;
case 25:
-#line 177 "perly.y"
-{ copline = yyvsp[-6].ival;
+#line 185 "perly.y"
+{ PL_copline = yyvsp[-6].ival;
yyval.opval = block_end(yyvsp[-4].ival,
newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval)); }
break;
case 26:
-#line 183 "perly.y"
+#line 191 "perly.y"
{ yyval.opval = Nullop; }
break;
case 27:
-#line 185 "perly.y"
+#line 193 "perly.y"
{ yyval.opval = scope(yyvsp[0].opval); }
break;
case 28:
-#line 189 "perly.y"
-{ copline = yyvsp[-6].ival;
+#line 197 "perly.y"
+{ PL_copline = yyvsp[-6].ival;
yyval.opval = block_end(yyvsp[-4].ival,
newSTATEOP(0, yyvsp[-7].pval,
newWHILEOP(0, 1, (LOOP*)Nullop,
yyvsp[-6].ival, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); }
break;
case 29:
-#line 195 "perly.y"
-{ copline = yyvsp[-6].ival;
+#line 203 "perly.y"
+{ PL_copline = yyvsp[-6].ival;
yyval.opval = block_end(yyvsp[-4].ival,
newSTATEOP(0, yyvsp[-7].pval,
newWHILEOP(0, 1, (LOOP*)Nullop,
yyvsp[-6].ival, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); }
break;
case 30:
-#line 201 "perly.y"
+#line 209 "perly.y"
{ yyval.opval = block_end(yyvsp[-6].ival,
newFOROP(0, yyvsp[-9].pval, yyvsp[-8].ival, yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); }
break;
case 31:
-#line 204 "perly.y"
+#line 212 "perly.y"
{ yyval.opval = block_end(yyvsp[-4].ival,
newFOROP(0, yyvsp[-8].pval, yyvsp[-7].ival, mod(yyvsp[-6].opval, OP_ENTERLOOP),
yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); }
break;
case 32:
-#line 208 "perly.y"
+#line 216 "perly.y"
{ yyval.opval = block_end(yyvsp[-4].ival,
newFOROP(0, yyvsp[-7].pval, yyvsp[-6].ival, Nullop, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval)); }
break;
case 33:
-#line 212 "perly.y"
+#line 220 "perly.y"
{ OP *forop = append_elem(OP_LINESEQ,
scalar(yyvsp[-6].opval),
newWHILEOP(0, 1, (LOOP*)Nullop,
yyvsp[-9].ival, scalar(yyvsp[-4].opval),
yyvsp[0].opval, scalar(yyvsp[-2].opval)));
- copline = yyvsp[-9].ival;
+ PL_copline = yyvsp[-9].ival;
yyval.opval = block_end(yyvsp[-7].ival, newSTATEOP(0, yyvsp[-10].pval, forop)); }
break;
case 34:
-#line 220 "perly.y"
+#line 228 "perly.y"
{ yyval.opval = newSTATEOP(0, yyvsp[-2].pval,
newWHILEOP(0, 1, (LOOP*)Nullop,
NOLINE, Nullop, yyvsp[-1].opval, yyvsp[0].opval)); }
break;
case 35:
-#line 226 "perly.y"
+#line 234 "perly.y"
{ yyval.opval = Nullop; }
break;
case 37:
-#line 231 "perly.y"
+#line 239 "perly.y"
{ (void)scan_num("1"); yyval.opval = yylval.opval; }
break;
case 39:
-#line 236 "perly.y"
+#line 244 "perly.y"
{ yyval.opval = invert(scalar(yyvsp[0].opval)); }
break;
case 40:
-#line 240 "perly.y"
+#line 248 "perly.y"
{ yyval.opval = yyvsp[0].opval; intro_my(); }
break;
case 41:
-#line 244 "perly.y"
+#line 252 "perly.y"
{ yyval.opval = yyvsp[0].opval; intro_my(); }
break;
case 42:
-#line 248 "perly.y"
+#line 256 "perly.y"
{ yyval.opval = yyvsp[0].opval; intro_my(); }
break;
case 43:
-#line 252 "perly.y"
+#line 260 "perly.y"
{ yyval.opval = yyvsp[0].opval; intro_my(); }
break;
case 44:
-#line 256 "perly.y"
+#line 264 "perly.y"
{ yyval.pval = Nullch; }
break;
case 46:
-#line 261 "perly.y"
+#line 269 "perly.y"
{ yyval.ival = 0; }
break;
case 47:
-#line 263 "perly.y"
+#line 271 "perly.y"
{ yyval.ival = 0; }
break;
case 48:
-#line 265 "perly.y"
+#line 273 "perly.y"
{ yyval.ival = 0; }
break;
case 49:
-#line 267 "perly.y"
+#line 275 "perly.y"
{ yyval.ival = 0; }
break;
case 50:
-#line 271 "perly.y"
+#line 279 "perly.y"
{ newFORM(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); }
break;
case 51:
-#line 274 "perly.y"
+#line 282 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 52:
-#line 275 "perly.y"
+#line 283 "perly.y"
{ yyval.opval = Nullop; }
break;
case 53:
-#line 279 "perly.y"
+#line 287 "perly.y"
{ newSUB(yyvsp[-3].ival, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); }
break;
case 54:
-#line 283 "perly.y"
+#line 291 "perly.y"
{ yyval.ival = start_subparse(FALSE, 0); }
break;
case 55:
-#line 287 "perly.y"
+#line 295 "perly.y"
{ yyval.ival = start_subparse(FALSE, CVf_ANON); }
break;
case 56:
-#line 291 "perly.y"
+#line 299 "perly.y"
{ yyval.ival = start_subparse(TRUE, 0); }
break;
case 57:
-#line 294 "perly.y"
-{ char *name = SvPV(((SVOP*)yyvsp[0].opval)->op_sv, na);
+#line 302 "perly.y"
+{ char *name = SvPV(((SVOP*)yyvsp[0].opval)->op_sv, PL_na);
if (strEQ(name, "BEGIN") || strEQ(name, "END")
|| strEQ(name, "INIT"))
- CvUNIQUE_on(compcv);
+ CvUNIQUE_on(PL_compcv);
yyval.opval = yyvsp[0].opval; }
break;
case 58:
-#line 302 "perly.y"
+#line 310 "perly.y"
{ yyval.opval = Nullop; }
break;
case 60:
-#line 306 "perly.y"
+#line 314 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 61:
-#line 307 "perly.y"
-{ yyval.opval = Nullop; expect = XSTATE; }
+#line 315 "perly.y"
+{ yyval.opval = Nullop; PL_expect = XSTATE; }
break;
case 62:
-#line 311 "perly.y"
+#line 319 "perly.y"
{ package(yyvsp[-1].opval); }
break;
case 63:
-#line 313 "perly.y"
+#line 321 "perly.y"
{ package(Nullop); }
break;
case 64:
-#line 317 "perly.y"
-{ CvUNIQUE_on(compcv); /* It's a BEGIN {} */ }
+#line 325 "perly.y"
+{ CvUNIQUE_on(PL_compcv); /* It's a BEGIN {} */ }
break;
case 65:
-#line 319 "perly.y"
+#line 327 "perly.y"
{ utilize(yyvsp[-6].ival, yyvsp[-5].ival, yyvsp[-3].opval, yyvsp[-2].opval, yyvsp[-1].opval); }
break;
case 66:
-#line 323 "perly.y"
+#line 331 "perly.y"
{ yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); }
break;
case 67:
-#line 325 "perly.y"
+#line 333 "perly.y"
{ yyval.opval = newLOGOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, yyvsp[0].opval); }
break;
case 69:
-#line 330 "perly.y"
+#line 338 "perly.y"
{ yyval.opval = yyvsp[-1].opval; }
break;
case 70:
-#line 332 "perly.y"
+#line 340 "perly.y"
{ yyval.opval = append_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval); }
break;
case 72:
-#line 337 "perly.y"
+#line 345 "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 73:
-#line 340 "perly.y"
+#line 348 "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 74:
-#line 343 "perly.y"
+#line 351 "perly.y"
{ 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))); }
break;
case 75:
-#line 348 "perly.y"
+#line 356 "perly.y"
{ 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))); }
break;
case 76:
-#line 353 "perly.y"
+#line 361 "perly.y"
{ 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))); }
break;
case 77:
-#line 358 "perly.y"
+#line 366 "perly.y"
{ yyval.opval = convert(yyvsp[-1].ival, 0, yyvsp[0].opval); }
break;
case 78:
-#line 360 "perly.y"
+#line 368 "perly.y"
{ yyval.opval = convert(yyvsp[-3].ival, 0, yyvsp[-1].opval); }
break;
case 79:
-#line 362 "perly.y"
+#line 370 "perly.y"
{ yyvsp[0].opval = newANONSUB(yyvsp[-1].ival, 0, yyvsp[0].opval); }
break;
case 80:
-#line 364 "perly.y"
+#line 372 "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 83:
-#line 374 "perly.y"
+#line 382 "perly.y"
{ yyval.opval = newASSIGNOP(OPf_STACKED, yyvsp[-2].opval, yyvsp[-1].ival, yyvsp[0].opval); }
break;
case 84:
-#line 376 "perly.y"
+#line 384 "perly.y"
{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
break;
case 85:
-#line 378 "perly.y"
+#line 386 "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 86:
-#line 382 "perly.y"
+#line 390 "perly.y"
{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
break;
case 87:
-#line 384 "perly.y"
+#line 392 "perly.y"
{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
break;
case 88:
-#line 386 "perly.y"
+#line 394 "perly.y"
{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
break;
case 89:
-#line 388 "perly.y"
+#line 396 "perly.y"
{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
break;
case 90:
-#line 390 "perly.y"
+#line 398 "perly.y"
{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
break;
case 91:
-#line 392 "perly.y"
+#line 400 "perly.y"
{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
break;
case 92:
-#line 394 "perly.y"
+#line 402 "perly.y"
{ yyval.opval = newRANGE(yyvsp[-1].ival, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval));}
break;
case 93:
-#line 396 "perly.y"
+#line 404 "perly.y"
{ yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); }
break;
case 94:
-#line 398 "perly.y"
+#line 406 "perly.y"
{ yyval.opval = newLOGOP(OP_OR, 0, yyvsp[-2].opval, yyvsp[0].opval); }
break;
case 95:
-#line 400 "perly.y"
+#line 408 "perly.y"
{ yyval.opval = newCONDOP(0, yyvsp[-4].opval, yyvsp[-2].opval, yyvsp[0].opval); }
break;
case 96:
-#line 402 "perly.y"
+#line 410 "perly.y"
{ yyval.opval = bind_match(yyvsp[-1].ival, yyvsp[-2].opval, yyvsp[0].opval); }
break;
case 97:
-#line 405 "perly.y"
+#line 413 "perly.y"
{ yyval.opval = newUNOP(OP_NEGATE, 0, scalar(yyvsp[0].opval)); }
break;
case 98:
-#line 407 "perly.y"
+#line 415 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 99:
-#line 409 "perly.y"
+#line 417 "perly.y"
{ yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); }
break;
case 100:
-#line 411 "perly.y"
+#line 419 "perly.y"
{ yyval.opval = newUNOP(OP_COMPLEMENT, 0, scalar(yyvsp[0].opval));}
break;
case 101:
-#line 413 "perly.y"
+#line 421 "perly.y"
{ yyval.opval = newUNOP(OP_REFGEN, 0, mod(yyvsp[0].opval,OP_REFGEN)); }
break;
case 102:
-#line 415 "perly.y"
+#line 423 "perly.y"
{ yyval.opval = newUNOP(OP_POSTINC, 0,
mod(scalar(yyvsp[-1].opval), OP_POSTINC)); }
break;
case 103:
-#line 418 "perly.y"
+#line 426 "perly.y"
{ yyval.opval = newUNOP(OP_POSTDEC, 0,
mod(scalar(yyvsp[-1].opval), OP_POSTDEC)); }
break;
case 104:
-#line 421 "perly.y"
+#line 429 "perly.y"
{ yyval.opval = newUNOP(OP_PREINC, 0,
mod(scalar(yyvsp[0].opval), OP_PREINC)); }
break;
case 105:
-#line 424 "perly.y"
+#line 432 "perly.y"
{ yyval.opval = newUNOP(OP_PREDEC, 0,
mod(scalar(yyvsp[0].opval), OP_PREDEC)); }
break;
case 106:
-#line 427 "perly.y"
+#line 435 "perly.y"
{ yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); }
break;
case 107:
-#line 429 "perly.y"
+#line 437 "perly.y"
{ yyval.opval = sawparens(yyvsp[-1].opval); }
break;
case 108:
-#line 431 "perly.y"
+#line 439 "perly.y"
{ yyval.opval = sawparens(newNULLLIST()); }
break;
case 109:
-#line 433 "perly.y"
+#line 441 "perly.y"
{ yyval.opval = newANONLIST(yyvsp[-1].opval); }
break;
case 110:
-#line 435 "perly.y"
+#line 443 "perly.y"
{ yyval.opval = newANONLIST(Nullop); }
break;
case 111:
-#line 437 "perly.y"
+#line 445 "perly.y"
{ yyval.opval = newANONHASH(yyvsp[-2].opval); }
break;
case 112:
-#line 439 "perly.y"
+#line 447 "perly.y"
{ yyval.opval = newANONHASH(Nullop); }
break;
case 113:
-#line 441 "perly.y"
+#line 449 "perly.y"
{ yyval.opval = newANONSUB(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); }
break;
case 114:
-#line 443 "perly.y"
+#line 451 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 115:
-#line 445 "perly.y"
-{ yyval.opval = newBINOP(OP_GELEM, 0, newGVREF(0,yyvsp[-4].opval),
- scalar(yyvsp[-2].opval)); }
+#line 453 "perly.y"
+{ yyval.opval = newBINOP(OP_GELEM, 0, yyvsp[-4].opval, scalar(yyvsp[-2].opval)); }
break;
case 116:
-#line 448 "perly.y"
+#line 455 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 117:
-#line 450 "perly.y"
+#line 457 "perly.y"
{ yyval.opval = newBINOP(OP_AELEM, 0, oopsAV(yyvsp[-3].opval), scalar(yyvsp[-1].opval)); }
break;
case 118:
-#line 452 "perly.y"
+#line 459 "perly.y"
{ yyval.opval = newBINOP(OP_AELEM, 0,
ref(newAVREF(yyvsp[-4].opval),OP_RV2AV),
scalar(yyvsp[-1].opval));}
break;
case 119:
-#line 456 "perly.y"
+#line 463 "perly.y"
{ assertref(yyvsp[-3].opval); yyval.opval = newBINOP(OP_AELEM, 0,
ref(newAVREF(yyvsp[-3].opval),OP_RV2AV),
scalar(yyvsp[-1].opval));}
break;
case 120:
-#line 460 "perly.y"
+#line 467 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 121:
-#line 462 "perly.y"
+#line 469 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 122:
-#line 464 "perly.y"
+#line 471 "perly.y"
{ yyval.opval = newUNOP(OP_AV2ARYLEN, 0, ref(yyvsp[0].opval, OP_AV2ARYLEN));}
break;
case 123:
-#line 466 "perly.y"
+#line 473 "perly.y"
{ yyval.opval = newBINOP(OP_HELEM, 0, oopsHV(yyvsp[-4].opval), jmaybe(yyvsp[-2].opval));
- expect = XOPERATOR; }
+ PL_expect = XOPERATOR; }
break;
case 124:
-#line 469 "perly.y"
+#line 476 "perly.y"
{ yyval.opval = newBINOP(OP_HELEM, 0,
ref(newHVREF(yyvsp[-5].opval),OP_RV2HV),
jmaybe(yyvsp[-2].opval));
- expect = XOPERATOR; }
+ PL_expect = XOPERATOR; }
break;
case 125:
-#line 474 "perly.y"
+#line 481 "perly.y"
{ assertref(yyvsp[-4].opval); yyval.opval = newBINOP(OP_HELEM, 0,
ref(newHVREF(yyvsp[-4].opval),OP_RV2HV),
jmaybe(yyvsp[-2].opval));
- expect = XOPERATOR; }
+ PL_expect = XOPERATOR; }
break;
case 126:
-#line 479 "perly.y"
+#line 486 "perly.y"
{ yyval.opval = newSLICEOP(0, yyvsp[-1].opval, yyvsp[-4].opval); }
break;
case 127:
-#line 481 "perly.y"
+#line 488 "perly.y"
{ yyval.opval = newSLICEOP(0, yyvsp[-1].opval, Nullop); }
break;
case 128:
-#line 483 "perly.y"
+#line 490 "perly.y"
{ yyval.opval = prepend_elem(OP_ASLICE,
newOP(OP_PUSHMARK, 0),
newLISTOP(OP_ASLICE, 0,
ref(yyvsp[-3].opval, OP_ASLICE))); }
break;
case 129:
-#line 489 "perly.y"
+#line 496 "perly.y"
{ 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)));
- expect = XOPERATOR; }
+ PL_expect = XOPERATOR; }
break;
case 130:
-#line 496 "perly.y"
+#line 503 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 131:
-#line 498 "perly.y"
+#line 505 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB, 0, scalar(yyvsp[0].opval)); }
break;
case 132:
-#line 500 "perly.y"
+#line 507 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar(yyvsp[-2].opval)); }
break;
case 133:
-#line 502 "perly.y"
+#line 509 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST, yyvsp[-1].opval, scalar(yyvsp[-3].opval))); }
break;
case 134:
-#line 505 "perly.y"
+#line 512 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); }
break;
case 135:
-#line 508 "perly.y"
-{ yyval.opval = newUNOP(OP_DOFILE, 0, scalar(yyvsp[0].opval)); }
+#line 515 "perly.y"
+{ yyval.opval = dofile(yyvsp[0].opval); }
break;
case 136:
-#line 510 "perly.y"
+#line 517 "perly.y"
{ yyval.opval = newUNOP(OP_NULL, OPf_SPECIAL, scope(yyvsp[0].opval)); }
break;
case 137:
-#line 512 "perly.y"
+#line 519 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB,
OPf_SPECIAL|OPf_STACKED,
prepend_elem(OP_LIST,
)),Nullop)); dep();}
break;
case 138:
-#line 520 "perly.y"
+#line 527 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB,
OPf_SPECIAL|OPf_STACKED,
append_elem(OP_LIST,
)))); dep();}
break;
case 139:
-#line 529 "perly.y"
+#line 536 "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 140:
-#line 533 "perly.y"
+#line 540 "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 141:
-#line 538 "perly.y"
+#line 545 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
newCVREF(0, scalar(yyvsp[-3].opval))); }
break;
case 142:
-#line 541 "perly.y"
+#line 548 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST, yyvsp[-1].opval,
newCVREF(0, scalar(yyvsp[-4].opval)))); }
break;
case 143:
-#line 545 "perly.y"
+#line 552 "perly.y"
{ yyval.opval = newOP(yyvsp[0].ival, OPf_SPECIAL);
- hints |= HINT_BLOCK_SCOPE; }
+ PL_hints |= HINT_BLOCK_SCOPE; }
break;
case 144:
-#line 548 "perly.y"
+#line 555 "perly.y"
{ yyval.opval = newLOOPEX(yyvsp[-1].ival,yyvsp[0].opval); }
break;
case 145:
-#line 550 "perly.y"
+#line 557 "perly.y"
{ yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); }
break;
case 146:
-#line 552 "perly.y"
+#line 559 "perly.y"
{ yyval.opval = newOP(yyvsp[0].ival, 0); }
break;
case 147:
-#line 554 "perly.y"
+#line 561 "perly.y"
{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); }
break;
case 148:
-#line 556 "perly.y"
+#line 563 "perly.y"
{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); }
break;
case 149:
-#line 558 "perly.y"
+#line 565 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].opval))); }
break;
case 150:
-#line 561 "perly.y"
+#line 568 "perly.y"
{ yyval.opval = newOP(yyvsp[0].ival, 0); }
break;
case 151:
-#line 563 "perly.y"
+#line 570 "perly.y"
{ yyval.opval = newOP(yyvsp[-2].ival, 0); }
break;
case 152:
-#line 565 "perly.y"
+#line 572 "perly.y"
{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
scalar(yyvsp[0].opval)); }
break;
case 153:
-#line 568 "perly.y"
+#line 575 "perly.y"
{ yyval.opval = newOP(yyvsp[-2].ival, OPf_SPECIAL); }
break;
case 154:
-#line 570 "perly.y"
+#line 577 "perly.y"
{ yyval.opval = newUNOP(yyvsp[-3].ival, 0, yyvsp[-1].opval); }
break;
case 155:
-#line 572 "perly.y"
+#line 579 "perly.y"
{ yyval.opval = pmruntime(yyvsp[-3].opval, yyvsp[-1].opval, Nullop); }
break;
case 156:
-#line 574 "perly.y"
+#line 581 "perly.y"
{ yyval.opval = pmruntime(yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval); }
break;
case 159:
-#line 580 "perly.y"
+#line 587 "perly.y"
{ yyval.opval = Nullop; }
break;
case 160:
-#line 582 "perly.y"
+#line 589 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 161:
-#line 586 "perly.y"
+#line 593 "perly.y"
{ yyval.opval = Nullop; }
break;
case 162:
-#line 588 "perly.y"
+#line 595 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
case 163:
-#line 590 "perly.y"
+#line 597 "perly.y"
{ yyval.opval = yyvsp[-1].opval; }
break;
case 164:
-#line 593 "perly.y"
+#line 600 "perly.y"
{ yyval.ival = 0; }
break;
case 165:
-#line 594 "perly.y"
+#line 601 "perly.y"
{ yyval.ival = 1; }
break;
case 166:
-#line 598 "perly.y"
-{ in_my = 0; yyval.opval = my(yyvsp[0].opval); }
+#line 605 "perly.y"
+{ PL_in_my = 0; yyval.opval = my(yyvsp[0].opval); }
break;
case 167:
-#line 602 "perly.y"
+#line 609 "perly.y"
{ yyval.opval = newCVREF(yyvsp[-1].ival,yyvsp[0].opval); }
break;
case 168:
-#line 606 "perly.y"
+#line 613 "perly.y"
{ yyval.opval = newSVREF(yyvsp[0].opval); }
break;
case 169:
-#line 610 "perly.y"
+#line 617 "perly.y"
{ yyval.opval = newAVREF(yyvsp[0].opval); }
break;
case 170:
-#line 614 "perly.y"
+#line 621 "perly.y"
{ yyval.opval = newHVREF(yyvsp[0].opval); }
break;
case 171:
-#line 618 "perly.y"
+#line 625 "perly.y"
{ yyval.opval = newAVREF(yyvsp[0].opval); }
break;
case 172:
-#line 622 "perly.y"
+#line 629 "perly.y"
{ yyval.opval = newGVREF(0,yyvsp[0].opval); }
break;
case 173:
-#line 626 "perly.y"
+#line 633 "perly.y"
{ yyval.opval = scalar(yyvsp[0].opval); }
break;
case 174:
-#line 628 "perly.y"
+#line 635 "perly.y"
{ yyval.opval = scalar(yyvsp[0].opval); }
break;
case 175:
-#line 630 "perly.y"
+#line 637 "perly.y"
{ yyval.opval = scope(yyvsp[0].opval); }
break;
case 176:
-#line 633 "perly.y"
+#line 640 "perly.y"
{ yyval.opval = yyvsp[0].opval; }
break;
-#line 2267 "y.tab.c"
+#line 2270 "perly.c"
}
yyssp -= yym;
yystate = *yyssp;
{
#if YYDEBUG
if (yydebug)
- fprintf(stderr,
+ PerlIO_printf(Perl_debug_log,
"yydebug: after reduction, shifting from state 0 to state %d\n",
YYFINAL);
#endif
yys = 0;
if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
if (!yys) yys = "illegal-symbol";
- fprintf(stderr, "yydebug: state %d, reading %d (%s)\n",
+ PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n",
YYFINAL, yychar, yys);
}
#endif
yystate = yydgoto[yym];
#if YYDEBUG
if (yydebug)
- fprintf(stderr,
+ PerlIO_printf(Perl_debug_log,
"yydebug: after reduction, shifting from state %d to state %d\n",
*yyssp, yystate);
#endif
int yypv_index = (yyvsp - yyvs);
yystacksize += YYSTACKSIZE;
ysave->yyvs = yyvs =
- (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
+ (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
ysave->yyss = yyss =
- (short*)realloc((char*)yyss,yystacksize * sizeof(short));
+ (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short));
if (!yyvs || !yyss)
goto yyoverflow;
yyssp = yyss + yyps_index;