This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
allow perlbug -ok when STDIN it not a tty
[perl5.git] / perly.y
diff --git a/perly.y b/perly.y
index 4c4f67a..a1a1f0d 100644 (file)
--- 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 '('