Make parser_free() be called slightly later,
[p5sagit/p5-mst-13.2.git] / perly.y
diff --git a/perly.y b/perly.y
index a1f23ab..9ca64a8 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -391,7 +391,7 @@ loop        :       label WHILE '(' remember texpr ')' mintro mblock cont
                          forop = newUNOP(OP_NULL, 0, append_elem(OP_LINESEQ,
                                newSTATEOP(0,
                                           CopLABEL_alloc(($1)->tk_lval.pval),
-                                          ($5 ? newOP(OP_NULL, 0) : $5) ),
+                                          ($5 ? $5 : newOP(OP_NULL, 0)) ),
                                forop));
 
                          token_getmad($2,forop,'3');
@@ -1178,10 +1178,14 @@ term    :       termbinop
                        { $$ = newUNOP(IVAL($1), 0, $2);
                          TOKEN_GETMAD($1,$$,'o');
                        }
-       |       REQUIRE                              /* require, $_ implied *//* FIMXE for MAD needed? */
-                       { $$ = newOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0); }
-       |       REQUIRE term                         /* require Foo *//* FIMXE for MAD needed? */
-                       { $$ = newUNOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0, $2); }
+       |       REQUIRE                              /* require, $_ implied */
+                       { $$ = newOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0);
+                         TOKEN_GETMAD($1,$$,'o');
+                       }
+       |       REQUIRE term                         /* require Foo */
+                       { $$ = newUNOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0, $2);
+                         TOKEN_GETMAD($1,$$,'o');
+                       }
        |       UNIOPSUB
                        { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); }
        |       UNIOPSUB term                        /* Sub treated as unop */