#include "EXTERN.h"
#define PERL_IN_PERLY_C
#include "perl.h"
-
+#ifdef EBCDIC
+#undef YYDEBUG
+#endif
#define dep() deprecate("\"do\" to call subroutines")
/* stuff included here to make perly_c.diff apply better */
newFOROP(0, $1, $2, Nullop, $5, $7, $8)); }
| label FOR '(' remember mnexpr ';' mtexpr ';' mnexpr ')' mblock
/* basically fake up an initialize-while lineseq */
- { OP *forop = append_elem(OP_LINESEQ,
- scalar($5),
- newWHILEOP(0, 1, (LOOP*)Nullop,
- $2, scalar($7),
- $11, scalar($9)));
+ { OP *forop;
PL_copline = $2;
- $$ = block_end($4, newSTATEOP(0, $1, forop)); }
+ forop = newSTATEOP(0, $1,
+ newWHILEOP(0, 1, (LOOP*)Nullop,
+ $2, scalar($7),
+ $11, $9));
+ if ($5) {
+ forop = append_elem(OP_LINESEQ,
+ newSTATEOP(0, ($1?savepv($1):Nullch),
+ $5),
+ forop);
+ }
+
+ $$ = block_end($4, forop); }
| label block cont /* a block is a loop that happens once */
{ $$ = newSTATEOP(0, $1,
newWHILEOP(0, 1, (LOOP*)Nullop,