diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2007-05-04 00:41:51 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2007-05-04 00:41:51 +0000 |
commit | 53a7735b62aee14640bc8ca619b4267f07d686b9 (patch) | |
tree | eb7cf7f4d631f6b83cd24d9c98ce0cc2821df29f /perly.y | |
parent | d932daed4961bf485d739adcee3fa2136d8ca8ca (diff) | |
download | perl-53a7735b62aee14640bc8ca619b4267f07d686b9.tar.gz |
move PL_expect and PL_copline into the PL_parser structure
p4raw-id: //depot/perl@31134
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 42 |
1 files changed, 21 insertions, 21 deletions
@@ -139,8 +139,8 @@ prog : progstart /* An ordinary block */ block : '{' remember lineseq '}' - { if (PL_copline > (line_t)IVAL($1)) - PL_copline = (line_t)IVAL($1); + { if (PL_parser->copline > (line_t)IVAL($1)) + PL_parser->copline = (line_t)IVAL($1); $$ = block_end($2, $3); TOKEN_GETMAD($1,$$,'{'); TOKEN_GETMAD($4,$$,'}'); @@ -157,14 +157,14 @@ mydefsv: /* NULL */ /* lexicalize $_ */ progstart: { - PL_expect = XSTATE; $$ = block_start(TRUE); + PL_parser->expect = XSTATE; $$ = block_start(TRUE); } ; mblock : '{' mremember lineseq '}' - { if (PL_copline > (line_t)IVAL($1)) - PL_copline = (line_t)IVAL($1); + { if (PL_parser->copline > (line_t)IVAL($1)) + PL_parser->copline = (line_t)IVAL($1); $$ = block_end($2, $3); TOKEN_GETMAD($1,$$,'{'); TOKEN_GETMAD($4,$$,'}'); @@ -216,16 +216,16 @@ line : label cond $$ = IF_MAD( newOP(OP_NULL, 0), Nullop); - PL_copline = NOLINE; + PL_parser->copline = NOLINE; TOKEN_FREE($1); TOKEN_GETMAD($2,$$,';'); } - PL_expect = XSTATE; + PL_parser->expect = XSTATE; } | label sideff ';' { $$ = newSTATEOP(0, PVAL($1), $2); - PL_expect = XSTATE; + PL_parser->expect = XSTATE; DO_MAD( /* sideff might already have a nexstate */ OP* op = ((LISTOP*)$$)->op_first; @@ -276,7 +276,7 @@ else : /* NULL */ TOKEN_GETMAD($1,$$,'o'); } | ELSIF '(' mexpr ')' mblock else - { PL_copline = (line_t)IVAL($1); + { PL_parser->copline = (line_t)IVAL($1); $$ = newCONDOP(0, $3, scope($5), $6); PL_hints |= HINT_BLOCK_SCOPE; TOKEN_GETMAD($1,$$,'I'); @@ -287,7 +287,7 @@ else : /* NULL */ /* Real conditional expressions */ cond : IF '(' remember mexpr ')' mblock else - { PL_copline = (line_t)IVAL($1); + { PL_parser->copline = (line_t)IVAL($1); $$ = block_end($3, newCONDOP(0, $4, scope($6), $7)); TOKEN_GETMAD($1,$$,'I'); @@ -295,7 +295,7 @@ cond : IF '(' remember mexpr ')' mblock else TOKEN_GETMAD($5,$$,')'); } | UNLESS '(' remember miexpr ')' mblock else - { PL_copline = (line_t)IVAL($1); + { PL_parser->copline = (line_t)IVAL($1); $$ = block_end($3, newCONDOP(0, $4, scope($6), $7)); TOKEN_GETMAD($1,$$,'I'); @@ -324,7 +324,7 @@ cont : /* NULL */ /* Loops: while, until, for, and a bare block */ loop : label WHILE '(' remember texpr ')' mintro mblock cont { OP *innerop; - PL_copline = (line_t)$2; + PL_parser->copline = (line_t)$2; $$ = block_end($4, newSTATEOP(0, PVAL($1), innerop = newWHILEOP(0, 1, (LOOP*)Nullop, @@ -337,7 +337,7 @@ loop : label WHILE '(' remember texpr ')' mintro mblock cont | label UNTIL '(' remember iexpr ')' mintro mblock cont { OP *innerop; - PL_copline = (line_t)$2; + PL_parser->copline = (line_t)$2; $$ = block_end($4, newSTATEOP(0, PVAL($1), innerop = newWHILEOP(0, 1, (LOOP*)Nullop, @@ -382,7 +382,7 @@ loop : label WHILE '(' remember texpr ')' mintro mblock cont mblock /* basically fake up an initialize-while lineseq */ { OP *forop; - PL_copline = (line_t)IVAL($2); + PL_parser->copline = (line_t)IVAL($2); forop = newSTATEOP(0, PVAL($1), newWHILEOP(0, 1, (LOOP*)Nullop, IVAL($2), scalar($7), @@ -419,7 +419,7 @@ loop : label WHILE '(' remember texpr ')' mintro mblock cont /* Switch blocks */ switch : label GIVEN '(' remember mydefsv mexpr ')' mblock - { PL_copline = (line_t) $2; + { PL_parser->copline = (line_t) $2; $$ = block_end($4, newSTATEOP(0, PVAL($1), newGIVENOP($6, scope($8), @@ -621,7 +621,7 @@ subbody : block { $$ = $1; } newOP(OP_NULL,0), Nullop ); - PL_expect = XSTATE; + PL_parser->expect = XSTATE; TOKEN_GETMAD($1,$$,';'); } ; @@ -767,7 +767,7 @@ subscripted: star '{' expr ';' '}' /* *main::{something} */ /* In this and all the hash accessors, ';' is * provided by the tokeniser */ { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3)); - PL_expect = XOPERATOR; + PL_parser->expect = XOPERATOR; TOKEN_GETMAD($2,$$,'{'); TOKEN_GETMAD($4,$$,';'); TOKEN_GETMAD($5,$$,'}'); @@ -794,7 +794,7 @@ subscripted: star '{' expr ';' '}' /* *main::{something} */ } | scalar '{' expr ';' '}' /* $foo->{bar();} */ { $$ = newBINOP(OP_HELEM, 0, oopsHV($1), jmaybe($3)); - PL_expect = XOPERATOR; + PL_parser->expect = XOPERATOR; TOKEN_GETMAD($2,$$,'{'); TOKEN_GETMAD($4,$$,';'); TOKEN_GETMAD($5,$$,'}'); @@ -803,7 +803,7 @@ subscripted: star '{' expr ';' '}' /* *main::{something} */ { $$ = newBINOP(OP_HELEM, 0, ref(newHVREF($1),OP_RV2HV), jmaybe($4)); - PL_expect = XOPERATOR; + PL_parser->expect = XOPERATOR; TOKEN_GETMAD($2,$$,'a'); TOKEN_GETMAD($3,$$,'{'); TOKEN_GETMAD($5,$$,';'); @@ -813,7 +813,7 @@ subscripted: star '{' expr ';' '}' /* *main::{something} */ { $$ = newBINOP(OP_HELEM, 0, ref(newHVREF($1),OP_RV2HV), jmaybe($3)); - PL_expect = XOPERATOR; + PL_parser->expect = XOPERATOR; TOKEN_GETMAD($2,$$,'{'); TOKEN_GETMAD($4,$$,';'); TOKEN_GETMAD($5,$$,'}'); @@ -1121,7 +1121,7 @@ term : termbinop newLISTOP(OP_HSLICE, 0, list($3), ref(oopsHV($1), OP_HSLICE))); - PL_expect = XOPERATOR; + PL_parser->expect = XOPERATOR; TOKEN_GETMAD($2,$$,'{'); TOKEN_GETMAD($4,$$,';'); TOKEN_GETMAD($5,$$,'}'); |