Fix label on C<for(;;)> statement
Chip Salzenberg [Thu, 6 Mar 1997 15:46:36 +0000 (03:46 +1200)]
perly.c
perly.y

diff --git a/perly.c b/perly.c
index 8480949..b25b2fa 100644 (file)
--- a/perly.c
+++ b/perly.c
@@ -1628,8 +1628,8 @@ case 32:
 #line 209 "perly.y"
 { copline = yyvsp[-9].ival;
                            yyval.opval = block_end(yyvsp[-7].ival,
-                                  append_elem(OP_LINESEQ, scalar(yyvsp[-6].opval),
-                                    newSTATEOP(0, yyvsp[-10].pval,
+                                  newSTATEOP(0, yyvsp[-10].pval,
+                                    append_elem(OP_LINESEQ, scalar(yyvsp[-6].opval),
                                       newWHILEOP(0, 1, (LOOP*)Nullop,
                                                  scalar(yyvsp[-4].opval),
                                                  yyvsp[0].opval, scalar(yyvsp[-2].opval))))); }
diff --git a/perly.y b/perly.y
index b181d5f..3bf1fda 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -208,8 +208,8 @@ loop        :       label WHILE '(' remember mtexpr ')' mblock cont
                        /* basically fake up an initialize-while lineseq */
                        { copline = $2;
                            $$ = block_end($4,
-                                  append_elem(OP_LINESEQ, scalar($5),
-                                    newSTATEOP(0, $1,
+                                  newSTATEOP(0, $1,
+                                    append_elem(OP_LINESEQ, scalar($5),
                                       newWHILEOP(0, 1, (LOOP*)Nullop,
                                                  scalar($7),
                                                  $11, scalar($9))))); }