X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perly.y;h=a1a1f0da7501beea4598c0d829f752c9095f2a24;hb=0c815be9f490bd7db5177b102e9ec25d74b97f4f;hp=fa0e0f5f59e1a85fe7bb508b3319ac830ec04cea;hpb=0da4822f11e97ce202166899552c06d720eb835a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perly.y b/perly.y index fa0e0f5..a1a1f0d 100644 --- a/perly.y +++ b/perly.y @@ -153,6 +153,9 @@ sideff : error { $$ = newLOOPOP(OPf_PARENS, 1, scalar($3), $1); } | expr UNTIL iexpr { $$ = newLOOPOP(OPf_PARENS, 1, $3, $1);} + | expr FOR expr + { $$ = newFOROP(0, Nullch, $2, + Nullop, $3, $1, Nullop); } ; else : /* NULL */ @@ -291,7 +294,7 @@ startformsub: /* NULL */ /* start a format subroutine scope */ subname : WORD { char *name = SvPV(((SVOP*)$1)->op_sv, na); if (strEQ(name, "BEGIN") || strEQ(name, "END") || strEQ(name, "INIT")) - { CvUNIQUE_on(compcv); subline = -subline; } + CvUNIQUE_on(compcv); $$ = $1; } ; @@ -439,7 +442,7 @@ term : term ASSIGNOP term | scalar %prec '(' { $$ = $1; } | star '{' expr ';' '}' - { $$ = newBINOP(OP_GELEM, 0, newGVREF(0,$1), $3); } + { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3)); } | star %prec '(' { $$ = $1; } | scalar '[' expr ']' %prec '('