X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perly.y;h=a1a1f0da7501beea4598c0d829f752c9095f2a24;hb=c73bb82c00a639630ef310b1ac1d896f5afcedab;hp=4c4f67a770f572f705cac362ffaa4634586eccd3;hpb=d58bf5aa3d3631a46847733b1ff1985b30140228;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perly.y b/perly.y index 4c4f67a..a1a1f0d 100644 --- a/perly.y +++ b/perly.y @@ -17,7 +17,7 @@ #include "perl.h" static void -dep() +dep(void) { deprecate("\"do\" to call subroutines"); } @@ -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 */ @@ -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 '('