summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-16 11:09:25 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-16 11:09:25 +0000
commitd58bf5aa3d3631a46847733b1ff1985b30140228 (patch)
tree406c095d697ae0ae82bbf187e5c65151bd41232a /perly.y
parentc7848ba184fac8eca4125f4296d6e09fee2c1846 (diff)
parent50e27ac33704d6fb34d4be7cfb426b2097b27505 (diff)
downloadperl-d58bf5aa3d3631a46847733b1ff1985b30140228.tar.gz
Merge maint-5.004 branch (5.004_04) with mainline.
p4raw-id: //depot/perl@137
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y24
1 files changed, 12 insertions, 12 deletions
diff --git a/perly.y b/perly.y
index 5996527331..4c4f67a770 100644
--- a/perly.y
+++ b/perly.y
@@ -187,13 +187,13 @@ loop : label WHILE '(' remember mtexpr ')' mblock cont
$$ = block_end($4,
newSTATEOP(0, $1,
newWHILEOP(0, 1, (LOOP*)Nullop,
- $5, $7, $8))); }
+ $2, $5, $7, $8))); }
| label UNTIL '(' remember miexpr ')' mblock cont
{ copline = $2;
$$ = block_end($4,
newSTATEOP(0, $1,
newWHILEOP(0, 1, (LOOP*)Nullop,
- $5, $7, $8))); }
+ $2, $5, $7, $8))); }
| label FOR MY remember my_scalar '(' mexpr ')' mblock cont
{ $$ = block_end($4,
newFOROP(0, $1, $2, $5, $7, $9, $10)); }
@@ -206,17 +206,17 @@ loop : label WHILE '(' remember mtexpr ')' mblock cont
newFOROP(0, $1, $2, Nullop, $5, $7, $8)); }
| label FOR '(' remember mnexpr ';' mtexpr ';' mnexpr ')' mblock
/* basically fake up an initialize-while lineseq */
- { copline = $2;
- $$ = block_end($4,
- newSTATEOP(0, $1,
- append_elem(OP_LINESEQ, scalar($5),
- newWHILEOP(0, 1, (LOOP*)Nullop,
- scalar($7),
- $11, scalar($9))))); }
+ { OP *forop = append_elem(OP_LINESEQ,
+ scalar($5),
+ newWHILEOP(0, 1, (LOOP*)Nullop,
+ $2, scalar($7),
+ $11, scalar($9)));
+ copline = $2;
+ $$ = block_end($4, newSTATEOP(0, $1, forop)); }
| label block cont /* a block is a loop that happens once */
- { $$ = newSTATEOP(0,
- $1, newWHILEOP(0, 1, (LOOP*)Nullop,
- Nullop, $2, $3)); }
+ { $$ = newSTATEOP(0, $1,
+ newWHILEOP(0, 1, (LOOP*)Nullop,
+ NOLINE, Nullop, $2, $3)); }
;
nexpr : /* NULL */