From: Dave Mitchell Date: Sun, 17 Dec 2006 22:21:40 +0000 (+0000) Subject: merge the four parser stacks into one X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1654d59374622f7e3936c1480c6dd5a043f5d77b;p=p5sagit%2Fp5-mst-13.2.git merge the four parser stacks into one p4raw-id: //depot/perl@29569 --- diff --git a/perly.act b/perly.act index 60c7f79..921df69 100644 --- a/perly.act +++ b/perly.act @@ -1,15 +1,15 @@ case 2: #line 137 "perly.y" - { (yyval.ival) = (yyvsp[(1) - (2)].ival); newPROG(block_end((yyvsp[(1) - (2)].ival),(yyvsp[(2) - (2)].opval))); ;} + { (yyval.ival) = (ps[(1) - (2)].val.ival); newPROG(block_end((ps[(1) - (2)].val.ival),(ps[(2) - (2)].val.opval))); ;} break; case 3: #line 142 "perly.y" - { if (PL_copline > (line_t)IVAL((yyvsp[(1) - (4)].i_tkval))) - PL_copline = (line_t)IVAL((yyvsp[(1) - (4)].i_tkval)); - (yyval.opval) = block_end((yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'{'); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),'}'); + { if (PL_copline > (line_t)IVAL((ps[(1) - (4)].val.i_tkval))) + PL_copline = (line_t)IVAL((ps[(1) - (4)].val.i_tkval)); + (yyval.opval) = block_end((ps[(2) - (4)].val.ival), (ps[(3) - (4)].val.opval)); + TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'{'); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),'}'); ;} break; @@ -32,11 +32,11 @@ case 2: case 7: #line 166 "perly.y" - { if (PL_copline > (line_t)IVAL((yyvsp[(1) - (4)].i_tkval))) - PL_copline = (line_t)IVAL((yyvsp[(1) - (4)].i_tkval)); - (yyval.opval) = block_end((yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'{'); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),'}'); + { if (PL_copline > (line_t)IVAL((ps[(1) - (4)].val.i_tkval))) + PL_copline = (line_t)IVAL((ps[(1) - (4)].val.i_tkval)); + (yyval.opval) = block_end((ps[(2) - (4)].val.ival), (ps[(3) - (4)].val.opval)); + TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'{'); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),'}'); ;} break; @@ -60,51 +60,51 @@ case 2: { (yyval.opval) = IF_MAD( append_list(OP_LINESEQ, - (LISTOP*)(yyvsp[(1) - (2)].opval), (LISTOP*)(yyvsp[(2) - (2)].opval)), - (yyvsp[(1) - (2)].opval)); + (LISTOP*)(ps[(1) - (2)].val.opval), (LISTOP*)(ps[(2) - (2)].val.opval)), + (ps[(1) - (2)].val.opval)); ;} break; case 12: #line 192 "perly.y" - { LEAVE_SCOPE((yyvsp[(2) - (3)].ival)); + { LEAVE_SCOPE((ps[(2) - (3)].val.ival)); (yyval.opval) = append_list(OP_LINESEQ, - (LISTOP*)(yyvsp[(1) - (3)].opval), (LISTOP*)(yyvsp[(3) - (3)].opval)); + (LISTOP*)(ps[(1) - (3)].val.opval), (LISTOP*)(ps[(3) - (3)].val.opval)); PL_pad_reset_pending = TRUE; - if ((yyvsp[(1) - (3)].opval) && (yyvsp[(3) - (3)].opval)) PL_hints |= HINT_BLOCK_SCOPE; ;} + if ((ps[(1) - (3)].val.opval) && (ps[(3) - (3)].val.opval)) PL_hints |= HINT_BLOCK_SCOPE; ;} break; case 13: #line 201 "perly.y" - { (yyval.opval) = newSTATEOP(0, PVAL((yyvsp[(1) - (2)].p_tkval)), (yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].p_tkval),((LISTOP*)(yyval.opval))->op_first,'L'); ;} + { (yyval.opval) = newSTATEOP(0, PVAL((ps[(1) - (2)].val.p_tkval)), (ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.p_tkval),((LISTOP*)(yyval.opval))->op_first,'L'); ;} break; case 15: #line 205 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 16: #line 207 "perly.y" - { (yyval.opval) = newSTATEOP(0, PVAL((yyvsp[(1) - (2)].p_tkval)), (yyvsp[(2) - (2)].opval)); ;} + { (yyval.opval) = newSTATEOP(0, PVAL((ps[(1) - (2)].val.p_tkval)), (ps[(2) - (2)].val.opval)); ;} break; case 17: #line 209 "perly.y" { - if (PVAL((yyvsp[(1) - (2)].p_tkval))) { - (yyval.opval) = newSTATEOP(0, PVAL((yyvsp[(1) - (2)].p_tkval)), newOP(OP_NULL, 0)); - TOKEN_GETMAD((yyvsp[(1) - (2)].p_tkval),(yyval.opval),'L'); - TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),((LISTOP*)(yyval.opval))->op_first,';'); + if (PVAL((ps[(1) - (2)].val.p_tkval))) { + (yyval.opval) = newSTATEOP(0, PVAL((ps[(1) - (2)].val.p_tkval)), newOP(OP_NULL, 0)); + TOKEN_GETMAD((ps[(1) - (2)].val.p_tkval),(yyval.opval),'L'); + TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),((LISTOP*)(yyval.opval))->op_first,';'); } else { (yyval.opval) = IF_MAD( newOP(OP_NULL, 0), Nullop); PL_copline = NOLINE; - TOKEN_FREE((yyvsp[(1) - (2)].p_tkval)); - TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),';'); + TOKEN_FREE((ps[(1) - (2)].val.p_tkval)); + TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),';'); } PL_expect = XSTATE; ;} @@ -113,7 +113,7 @@ case 2: case 18: #line 226 "perly.y" { - (yyval.opval) = newSTATEOP(0, PVAL((yyvsp[(1) - (3)].p_tkval)), (yyvsp[(2) - (3)].opval)); + (yyval.opval) = newSTATEOP(0, PVAL((ps[(1) - (3)].val.p_tkval)), (ps[(2) - (3)].val.opval)); PL_expect = XSTATE; DO_MAD( /* sideff might already have a nexstate */ @@ -122,8 +122,8 @@ case 2: while (op->op_sibling && op->op_sibling->op_type == OP_NEXTSTATE) op = op->op_sibling; - token_getmad((yyvsp[(1) - (3)].p_tkval),op,'L'); - token_getmad((yyvsp[(3) - (3)].i_tkval),op,';'); + token_getmad((ps[(1) - (3)].val.p_tkval),op,'L'); + token_getmad((ps[(3) - (3)].val.i_tkval),op,';'); } ) ;} @@ -136,42 +136,42 @@ case 2: case 20: #line 247 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 21: #line 249 "perly.y" - { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[(3) - (3)].opval), (yyvsp[(1) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'i'); + { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[(3) - (3)].val.opval), (ps[(1) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'i'); ;} break; case 22: #line 253 "perly.y" - { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[(3) - (3)].opval), (yyvsp[(1) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'i'); + { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[(3) - (3)].val.opval), (ps[(1) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'i'); ;} break; case 23: #line 257 "perly.y" - { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((yyvsp[(3) - (3)].opval)), (yyvsp[(1) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'w'); + { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((ps[(3) - (3)].val.opval)), (ps[(1) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'w'); ;} break; case 24: #line 261 "perly.y" - { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (yyvsp[(3) - (3)].opval), (yyvsp[(1) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'w'); + { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (ps[(3) - (3)].val.opval), (ps[(1) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'w'); ;} break; case 25: #line 265 "perly.y" - { (yyval.opval) = newFOROP(0, Nullch, (line_t)IVAL((yyvsp[(2) - (3)].i_tkval)), - Nullop, (yyvsp[(3) - (3)].opval), (yyvsp[(1) - (3)].opval), Nullop); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),((LISTOP*)(yyval.opval))->op_first->op_sibling,'w'); + { (yyval.opval) = newFOROP(0, Nullch, (line_t)IVAL((ps[(2) - (3)].val.i_tkval)), + Nullop, (ps[(3) - (3)].val.opval), (ps[(1) - (3)].val.opval), Nullop); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),((LISTOP*)(yyval.opval))->op_first->op_sibling,'w'); ;} break; @@ -182,53 +182,53 @@ case 2: case 27: #line 275 "perly.y" - { ((yyvsp[(2) - (2)].opval))->op_flags |= OPf_PARENS; (yyval.opval) = scope((yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { ((ps[(2) - (2)].val.opval))->op_flags |= OPf_PARENS; (yyval.opval) = scope((ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 28: #line 279 "perly.y" - { PL_copline = (line_t)IVAL((yyvsp[(1) - (6)].i_tkval)); - (yyval.opval) = newCONDOP(0, (yyvsp[(3) - (6)].opval), scope((yyvsp[(5) - (6)].opval)), (yyvsp[(6) - (6)].opval)); + { PL_copline = (line_t)IVAL((ps[(1) - (6)].val.i_tkval)); + (yyval.opval) = newCONDOP(0, (ps[(3) - (6)].val.opval), scope((ps[(5) - (6)].val.opval)), (ps[(6) - (6)].val.opval)); PL_hints |= HINT_BLOCK_SCOPE; - TOKEN_GETMAD((yyvsp[(1) - (6)].i_tkval),(yyval.opval),'I'); - TOKEN_GETMAD((yyvsp[(2) - (6)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(4) - (6)].i_tkval),(yyval.opval),')'); + TOKEN_GETMAD((ps[(1) - (6)].val.i_tkval),(yyval.opval),'I'); + TOKEN_GETMAD((ps[(2) - (6)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(4) - (6)].val.i_tkval),(yyval.opval),')'); ;} break; case 29: #line 290 "perly.y" - { PL_copline = (line_t)IVAL((yyvsp[(1) - (7)].i_tkval)); - (yyval.opval) = block_end((yyvsp[(3) - (7)].ival), - newCONDOP(0, (yyvsp[(4) - (7)].opval), scope((yyvsp[(6) - (7)].opval)), (yyvsp[(7) - (7)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (7)].i_tkval),(yyval.opval),'I'); - TOKEN_GETMAD((yyvsp[(2) - (7)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(5) - (7)].i_tkval),(yyval.opval),')'); + { PL_copline = (line_t)IVAL((ps[(1) - (7)].val.i_tkval)); + (yyval.opval) = block_end((ps[(3) - (7)].val.ival), + newCONDOP(0, (ps[(4) - (7)].val.opval), scope((ps[(6) - (7)].val.opval)), (ps[(7) - (7)].val.opval))); + TOKEN_GETMAD((ps[(1) - (7)].val.i_tkval),(yyval.opval),'I'); + TOKEN_GETMAD((ps[(2) - (7)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(5) - (7)].val.i_tkval),(yyval.opval),')'); ;} break; case 30: #line 298 "perly.y" - { PL_copline = (line_t)IVAL((yyvsp[(1) - (7)].i_tkval)); - (yyval.opval) = block_end((yyvsp[(3) - (7)].ival), - newCONDOP(0, (yyvsp[(4) - (7)].opval), scope((yyvsp[(6) - (7)].opval)), (yyvsp[(7) - (7)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (7)].i_tkval),(yyval.opval),'I'); - TOKEN_GETMAD((yyvsp[(2) - (7)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(5) - (7)].i_tkval),(yyval.opval),')'); + { PL_copline = (line_t)IVAL((ps[(1) - (7)].val.i_tkval)); + (yyval.opval) = block_end((ps[(3) - (7)].val.ival), + newCONDOP(0, (ps[(4) - (7)].val.opval), scope((ps[(6) - (7)].val.opval)), (ps[(7) - (7)].val.opval))); + TOKEN_GETMAD((ps[(1) - (7)].val.i_tkval),(yyval.opval),'I'); + TOKEN_GETMAD((ps[(2) - (7)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(5) - (7)].val.i_tkval),(yyval.opval),')'); ;} break; case 31: #line 309 "perly.y" - { (yyval.opval) = block_end((yyvsp[(3) - (6)].ival), - newWHENOP((yyvsp[(4) - (6)].opval), scope((yyvsp[(6) - (6)].opval)))); ;} + { (yyval.opval) = block_end((ps[(3) - (6)].val.ival), + newWHENOP((ps[(4) - (6)].val.opval), scope((ps[(6) - (6)].val.opval)))); ;} break; case 32: #line 312 "perly.y" - { (yyval.opval) = newWHENOP(0, scope((yyvsp[(2) - (2)].opval))); ;} + { (yyval.opval) = newWHENOP(0, scope((ps[(2) - (2)].val.opval))); ;} break; case 33: @@ -238,131 +238,131 @@ case 2: case 34: #line 319 "perly.y" - { (yyval.opval) = scope((yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = scope((ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 35: #line 326 "perly.y" { OP *innerop; - PL_copline = (line_t)(yyvsp[(2) - (9)].i_tkval); - (yyval.opval) = block_end((yyvsp[(4) - (9)].ival), - newSTATEOP(0, PVAL((yyvsp[(1) - (9)].p_tkval)), + PL_copline = (line_t)(ps[(2) - (9)].val.i_tkval); + (yyval.opval) = block_end((ps[(4) - (9)].val.ival), + newSTATEOP(0, PVAL((ps[(1) - (9)].val.p_tkval)), innerop = newWHILEOP(0, 1, (LOOP*)Nullop, - IVAL((yyvsp[(2) - (9)].i_tkval)), (yyvsp[(5) - (9)].opval), (yyvsp[(8) - (9)].opval), (yyvsp[(9) - (9)].opval), (yyvsp[(7) - (9)].ival)))); - TOKEN_GETMAD((yyvsp[(1) - (9)].p_tkval),innerop,'L'); - TOKEN_GETMAD((yyvsp[(2) - (9)].i_tkval),innerop,'W'); - TOKEN_GETMAD((yyvsp[(3) - (9)].i_tkval),innerop,'('); - TOKEN_GETMAD((yyvsp[(6) - (9)].i_tkval),innerop,')'); + IVAL((ps[(2) - (9)].val.i_tkval)), (ps[(5) - (9)].val.opval), (ps[(8) - (9)].val.opval), (ps[(9) - (9)].val.opval), (ps[(7) - (9)].val.ival)))); + TOKEN_GETMAD((ps[(1) - (9)].val.p_tkval),innerop,'L'); + TOKEN_GETMAD((ps[(2) - (9)].val.i_tkval),innerop,'W'); + TOKEN_GETMAD((ps[(3) - (9)].val.i_tkval),innerop,'('); + TOKEN_GETMAD((ps[(6) - (9)].val.i_tkval),innerop,')'); ;} break; case 36: #line 339 "perly.y" { OP *innerop; - PL_copline = (line_t)(yyvsp[(2) - (9)].i_tkval); - (yyval.opval) = block_end((yyvsp[(4) - (9)].ival), - newSTATEOP(0, PVAL((yyvsp[(1) - (9)].p_tkval)), + PL_copline = (line_t)(ps[(2) - (9)].val.i_tkval); + (yyval.opval) = block_end((ps[(4) - (9)].val.ival), + newSTATEOP(0, PVAL((ps[(1) - (9)].val.p_tkval)), innerop = newWHILEOP(0, 1, (LOOP*)Nullop, - IVAL((yyvsp[(2) - (9)].i_tkval)), (yyvsp[(5) - (9)].opval), (yyvsp[(8) - (9)].opval), (yyvsp[(9) - (9)].opval), (yyvsp[(7) - (9)].ival)))); - TOKEN_GETMAD((yyvsp[(1) - (9)].p_tkval),innerop,'L'); - TOKEN_GETMAD((yyvsp[(2) - (9)].i_tkval),innerop,'W'); - TOKEN_GETMAD((yyvsp[(3) - (9)].i_tkval),innerop,'('); - TOKEN_GETMAD((yyvsp[(6) - (9)].i_tkval),innerop,')'); + IVAL((ps[(2) - (9)].val.i_tkval)), (ps[(5) - (9)].val.opval), (ps[(8) - (9)].val.opval), (ps[(9) - (9)].val.opval), (ps[(7) - (9)].val.ival)))); + TOKEN_GETMAD((ps[(1) - (9)].val.p_tkval),innerop,'L'); + TOKEN_GETMAD((ps[(2) - (9)].val.i_tkval),innerop,'W'); + TOKEN_GETMAD((ps[(3) - (9)].val.i_tkval),innerop,'('); + TOKEN_GETMAD((ps[(6) - (9)].val.i_tkval),innerop,')'); ;} break; case 37: #line 351 "perly.y" { OP *innerop; - (yyval.opval) = block_end((yyvsp[(4) - (10)].ival), - innerop = newFOROP(0, PVAL((yyvsp[(1) - (10)].p_tkval)), (line_t)IVAL((yyvsp[(2) - (10)].i_tkval)), - (yyvsp[(5) - (10)].opval), (yyvsp[(7) - (10)].opval), (yyvsp[(9) - (10)].opval), (yyvsp[(10) - (10)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (10)].p_tkval),((LISTOP*)innerop)->op_first,'L'); - TOKEN_GETMAD((yyvsp[(2) - (10)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); - TOKEN_GETMAD((yyvsp[(3) - (10)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'d'); - TOKEN_GETMAD((yyvsp[(6) - (10)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); - TOKEN_GETMAD((yyvsp[(8) - (10)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); + (yyval.opval) = block_end((ps[(4) - (10)].val.ival), + innerop = newFOROP(0, PVAL((ps[(1) - (10)].val.p_tkval)), (line_t)IVAL((ps[(2) - (10)].val.i_tkval)), + (ps[(5) - (10)].val.opval), (ps[(7) - (10)].val.opval), (ps[(9) - (10)].val.opval), (ps[(10) - (10)].val.opval))); + TOKEN_GETMAD((ps[(1) - (10)].val.p_tkval),((LISTOP*)innerop)->op_first,'L'); + TOKEN_GETMAD((ps[(2) - (10)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); + TOKEN_GETMAD((ps[(3) - (10)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'d'); + TOKEN_GETMAD((ps[(6) - (10)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); + TOKEN_GETMAD((ps[(8) - (10)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); ;} break; case 38: #line 362 "perly.y" { OP *innerop; - (yyval.opval) = block_end((yyvsp[(5) - (9)].ival), - innerop = newFOROP(0, PVAL((yyvsp[(1) - (9)].p_tkval)), (line_t)IVAL((yyvsp[(2) - (9)].i_tkval)), - mod((yyvsp[(3) - (9)].opval), OP_ENTERLOOP), (yyvsp[(6) - (9)].opval), (yyvsp[(8) - (9)].opval), (yyvsp[(9) - (9)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (9)].p_tkval),((LISTOP*)innerop)->op_first,'L'); - TOKEN_GETMAD((yyvsp[(2) - (9)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); - TOKEN_GETMAD((yyvsp[(4) - (9)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); - TOKEN_GETMAD((yyvsp[(7) - (9)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); + (yyval.opval) = block_end((ps[(5) - (9)].val.ival), + innerop = newFOROP(0, PVAL((ps[(1) - (9)].val.p_tkval)), (line_t)IVAL((ps[(2) - (9)].val.i_tkval)), + mod((ps[(3) - (9)].val.opval), OP_ENTERLOOP), (ps[(6) - (9)].val.opval), (ps[(8) - (9)].val.opval), (ps[(9) - (9)].val.opval))); + TOKEN_GETMAD((ps[(1) - (9)].val.p_tkval),((LISTOP*)innerop)->op_first,'L'); + TOKEN_GETMAD((ps[(2) - (9)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); + TOKEN_GETMAD((ps[(4) - (9)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); + TOKEN_GETMAD((ps[(7) - (9)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); ;} break; case 39: #line 372 "perly.y" { OP *innerop; - (yyval.opval) = block_end((yyvsp[(4) - (8)].ival), - innerop = newFOROP(0, PVAL((yyvsp[(1) - (8)].p_tkval)), (line_t)IVAL((yyvsp[(2) - (8)].i_tkval)), - Nullop, (yyvsp[(5) - (8)].opval), (yyvsp[(7) - (8)].opval), (yyvsp[(8) - (8)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (8)].p_tkval),((LISTOP*)innerop)->op_first,'L'); - TOKEN_GETMAD((yyvsp[(2) - (8)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); - TOKEN_GETMAD((yyvsp[(3) - (8)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); - TOKEN_GETMAD((yyvsp[(6) - (8)].i_tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); + (yyval.opval) = block_end((ps[(4) - (8)].val.ival), + innerop = newFOROP(0, PVAL((ps[(1) - (8)].val.p_tkval)), (line_t)IVAL((ps[(2) - (8)].val.i_tkval)), + Nullop, (ps[(5) - (8)].val.opval), (ps[(7) - (8)].val.opval), (ps[(8) - (8)].val.opval))); + TOKEN_GETMAD((ps[(1) - (8)].val.p_tkval),((LISTOP*)innerop)->op_first,'L'); + TOKEN_GETMAD((ps[(2) - (8)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); + TOKEN_GETMAD((ps[(3) - (8)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); + TOKEN_GETMAD((ps[(6) - (8)].val.i_tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); ;} break; case 40: #line 384 "perly.y" { OP *forop; - PL_copline = (line_t)IVAL((yyvsp[(2) - (12)].i_tkval)); - forop = newSTATEOP(0, PVAL((yyvsp[(1) - (12)].p_tkval)), + PL_copline = (line_t)IVAL((ps[(2) - (12)].val.i_tkval)); + forop = newSTATEOP(0, PVAL((ps[(1) - (12)].val.p_tkval)), newWHILEOP(0, 1, (LOOP*)Nullop, - IVAL((yyvsp[(2) - (12)].i_tkval)), scalar((yyvsp[(7) - (12)].opval)), - (yyvsp[(12) - (12)].opval), (yyvsp[(10) - (12)].opval), (yyvsp[(9) - (12)].ival))); + IVAL((ps[(2) - (12)].val.i_tkval)), scalar((ps[(7) - (12)].val.opval)), + (ps[(12) - (12)].val.opval), (ps[(10) - (12)].val.opval), (ps[(9) - (12)].val.ival))); #ifdef MAD forop = newUNOP(OP_NULL, 0, append_elem(OP_LINESEQ, newSTATEOP(0, - (((yyvsp[(1) - (12)].p_tkval))->tk_lval.pval - ?savepv(((yyvsp[(1) - (12)].p_tkval))->tk_lval.pval):Nullch), - ((yyvsp[(5) - (12)].opval) ? newOP(OP_NULL, 0) : (yyvsp[(5) - (12)].opval)) ), + (((ps[(1) - (12)].val.p_tkval))->tk_lval.pval + ?savepv(((ps[(1) - (12)].val.p_tkval))->tk_lval.pval):Nullch), + ((ps[(5) - (12)].val.opval) ? newOP(OP_NULL, 0) : (ps[(5) - (12)].val.opval)) ), forop)); - token_getmad((yyvsp[(2) - (12)].i_tkval),forop,'3'); - token_getmad((yyvsp[(3) - (12)].i_tkval),forop,'('); - token_getmad((yyvsp[(6) - (12)].i_tkval),forop,'1'); - token_getmad((yyvsp[(8) - (12)].i_tkval),forop,'2'); - token_getmad((yyvsp[(11) - (12)].i_tkval),forop,')'); - token_getmad((yyvsp[(1) - (12)].p_tkval),forop,'L'); + token_getmad((ps[(2) - (12)].val.i_tkval),forop,'3'); + token_getmad((ps[(3) - (12)].val.i_tkval),forop,'('); + token_getmad((ps[(6) - (12)].val.i_tkval),forop,'1'); + token_getmad((ps[(8) - (12)].val.i_tkval),forop,'2'); + token_getmad((ps[(11) - (12)].val.i_tkval),forop,')'); + token_getmad((ps[(1) - (12)].val.p_tkval),forop,'L'); #else - if ((yyvsp[(5) - (12)].opval)) { + if ((ps[(5) - (12)].val.opval)) { forop = append_elem(OP_LINESEQ, - newSTATEOP(0, ((yyvsp[(1) - (12)].p_tkval)?savepv((yyvsp[(1) - (12)].p_tkval)):Nullch), - (yyvsp[(5) - (12)].opval)), + newSTATEOP(0, ((ps[(1) - (12)].val.p_tkval)?savepv((ps[(1) - (12)].val.p_tkval)):Nullch), + (ps[(5) - (12)].val.opval)), forop); } #endif - (yyval.opval) = block_end((yyvsp[(4) - (12)].ival), forop); ;} + (yyval.opval) = block_end((ps[(4) - (12)].val.ival), forop); ;} break; case 41: #line 416 "perly.y" - { (yyval.opval) = newSTATEOP(0, PVAL((yyvsp[(1) - (3)].p_tkval)), + { (yyval.opval) = newSTATEOP(0, PVAL((ps[(1) - (3)].val.p_tkval)), newWHILEOP(0, 1, (LOOP*)Nullop, - NOLINE, Nullop, (yyvsp[(2) - (3)].opval), (yyvsp[(3) - (3)].opval), 0)); - TOKEN_GETMAD((yyvsp[(1) - (3)].p_tkval),((LISTOP*)(yyval.opval))->op_first,'L'); ;} + NOLINE, Nullop, (ps[(2) - (3)].val.opval), (ps[(3) - (3)].val.opval), 0)); + TOKEN_GETMAD((ps[(1) - (3)].val.p_tkval),((LISTOP*)(yyval.opval))->op_first,'L'); ;} break; case 42: #line 424 "perly.y" - { PL_copline = (line_t) (yyvsp[(2) - (8)].i_tkval); - (yyval.opval) = block_end((yyvsp[(4) - (8)].ival), - newSTATEOP(0, PVAL((yyvsp[(1) - (8)].p_tkval)), - newGIVENOP((yyvsp[(6) - (8)].opval), scope((yyvsp[(8) - (8)].opval)), - (PADOFFSET) (yyvsp[(5) - (8)].ival)) )); ;} + { PL_copline = (line_t) (ps[(2) - (8)].val.i_tkval); + (yyval.opval) = block_end((ps[(4) - (8)].val.ival), + newSTATEOP(0, PVAL((ps[(1) - (8)].val.p_tkval)), + newGIVENOP((ps[(6) - (8)].val.opval), scope((ps[(8) - (8)].val.opval)), + (PADOFFSET) (ps[(5) - (8)].val.ival)) )); ;} break; case 43: @@ -386,22 +386,22 @@ case 2: case 48: #line 453 "perly.y" - { (yyval.opval) = invert(scalar((yyvsp[(1) - (1)].opval))); ;} + { (yyval.opval) = invert(scalar((ps[(1) - (1)].val.opval))); ;} break; case 49: #line 458 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); intro_my(); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); intro_my(); ;} break; case 50: #line 462 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); intro_my(); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); intro_my(); ;} break; case 51: #line 466 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); intro_my(); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); intro_my(); ;} break; case 52: @@ -419,38 +419,38 @@ case 2: case 54: #line 485 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 55: #line 487 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 56: #line 489 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 57: #line 491 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 58: #line 493 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 59: #line 498 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 60: #line 502 "perly.y" { (yyval.opval) = newOP(OP_NULL,0); - TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),'p'); + TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),'p'); ;} break; @@ -458,12 +458,12 @@ case 2: #line 508 "perly.y" { SvREFCNT_inc(PL_compcv); #ifdef MAD - (yyval.opval) = newFORM((yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].opval), (yyvsp[(4) - (4)].opval)); - prepend_madprops((yyvsp[(1) - (4)].i_tkval)->tk_mad, (yyval.opval), 'F'); - (yyvsp[(1) - (4)].i_tkval)->tk_mad = 0; - token_free((yyvsp[(1) - (4)].i_tkval)); + (yyval.opval) = newFORM((ps[(2) - (4)].val.ival), (ps[(3) - (4)].val.opval), (ps[(4) - (4)].val.opval)); + prepend_madprops((ps[(1) - (4)].val.i_tkval)->tk_mad, (yyval.opval), 'F'); + (ps[(1) - (4)].val.i_tkval)->tk_mad = 0; + token_free((ps[(1) - (4)].val.i_tkval)); #else - newFORM((yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].opval), (yyvsp[(4) - (4)].opval)); + newFORM((ps[(2) - (4)].val.ival), (ps[(3) - (4)].val.opval), (ps[(4) - (4)].val.opval)); (yyval.opval) = Nullop; #endif ;} @@ -471,7 +471,7 @@ case 2: case 62: #line 521 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 63: @@ -483,10 +483,10 @@ case 2: #line 527 "perly.y" { SvREFCNT_inc(PL_compcv); #ifdef MAD - (yyval.opval) = newMYSUB((yyvsp[(2) - (6)].ival), (yyvsp[(3) - (6)].opval), (yyvsp[(4) - (6)].opval), (yyvsp[(5) - (6)].opval), (yyvsp[(6) - (6)].opval)); - token_getmad((yyvsp[(1) - (6)].i_tkval),(yyval.opval),'d'); + (yyval.opval) = newMYSUB((ps[(2) - (6)].val.ival), (ps[(3) - (6)].val.opval), (ps[(4) - (6)].val.opval), (ps[(5) - (6)].val.opval), (ps[(6) - (6)].val.opval)); + token_getmad((ps[(1) - (6)].val.i_tkval),(yyval.opval),'d'); #else - newMYSUB((yyvsp[(2) - (6)].ival), (yyvsp[(3) - (6)].opval), (yyvsp[(4) - (6)].opval), (yyvsp[(5) - (6)].opval), (yyvsp[(6) - (6)].opval)); + newMYSUB((ps[(2) - (6)].val.ival), (ps[(3) - (6)].val.opval), (ps[(4) - (6)].val.opval), (ps[(5) - (6)].val.opval), (ps[(6) - (6)].val.opval)); (yyval.opval) = Nullop; #endif ;} @@ -497,17 +497,17 @@ case 2: { SvREFCNT_inc(PL_compcv); #ifdef MAD OP* o = newSVOP(OP_ANONCODE, 0, - (SV*)newATTRSUB((yyvsp[(2) - (6)].ival), (yyvsp[(3) - (6)].opval), (yyvsp[(4) - (6)].opval), (yyvsp[(5) - (6)].opval), (yyvsp[(6) - (6)].opval))); + (SV*)newATTRSUB((ps[(2) - (6)].val.ival), (ps[(3) - (6)].val.opval), (ps[(4) - (6)].val.opval), (ps[(5) - (6)].val.opval), (ps[(6) - (6)].val.opval))); (yyval.opval) = newOP(OP_NULL,0); op_getmad(o,(yyval.opval),'&'); - op_getmad((yyvsp[(3) - (6)].opval),(yyval.opval),'n'); - op_getmad((yyvsp[(4) - (6)].opval),(yyval.opval),'s'); - op_getmad((yyvsp[(5) - (6)].opval),(yyval.opval),'a'); - token_getmad((yyvsp[(1) - (6)].i_tkval),(yyval.opval),'d'); - append_madprops((yyvsp[(6) - (6)].opval)->op_madprop, (yyval.opval), 0); - (yyvsp[(6) - (6)].opval)->op_madprop = 0; + op_getmad((ps[(3) - (6)].val.opval),(yyval.opval),'n'); + op_getmad((ps[(4) - (6)].val.opval),(yyval.opval),'s'); + op_getmad((ps[(5) - (6)].val.opval),(yyval.opval),'a'); + token_getmad((ps[(1) - (6)].val.i_tkval),(yyval.opval),'d'); + append_madprops((ps[(6) - (6)].val.opval)->op_madprop, (yyval.opval), 0); + (ps[(6) - (6)].val.opval)->op_madprop = 0; #else - newATTRSUB((yyvsp[(2) - (6)].ival), (yyvsp[(3) - (6)].opval), (yyvsp[(4) - (6)].opval), (yyvsp[(5) - (6)].opval), (yyvsp[(6) - (6)].opval)); + newATTRSUB((ps[(2) - (6)].val.ival), (ps[(3) - (6)].val.opval), (ps[(4) - (6)].val.opval), (ps[(5) - (6)].val.opval), (ps[(6) - (6)].val.opval)); (yyval.opval) = Nullop; #endif ;} @@ -533,12 +533,12 @@ case 2: case 69: #line 576 "perly.y" - { const char *const name = SvPV_nolen_const(((SVOP*)(yyvsp[(1) - (1)].opval))->op_sv); + { const char *const name = SvPV_nolen_const(((SVOP*)(ps[(1) - (1)].val.opval))->op_sv); if (strEQ(name, "BEGIN") || strEQ(name, "END") || strEQ(name, "INIT") || strEQ(name, "CHECK") || strEQ(name, "UNITCHECK")) CvSPECIAL_on(PL_compcv); - (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 70: @@ -553,8 +553,8 @@ case 2: case 73: #line 594 "perly.y" - { (yyval.opval) = (yyvsp[(2) - (2)].opval); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),':'); + { (yyval.opval) = (ps[(2) - (2)].val.opval); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),':'); ;} break; @@ -564,14 +564,14 @@ case 2: newOP(OP_NULL, 0), Nullop ); - TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),':'); + TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),':'); ;} break; case 75: #line 608 "perly.y" - { (yyval.opval) = (yyvsp[(2) - (2)].opval); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),':'); + { (yyval.opval) = (ps[(2) - (2)].val.opval); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),':'); ;} break; @@ -581,13 +581,13 @@ case 2: newOP(OP_NULL, 0), Nullop ); - TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),':'); + TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),':'); ;} break; case 77: #line 621 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 78: @@ -597,7 +597,7 @@ case 2: Nullop ); PL_expect = XSTATE; - TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),';'); + TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),';'); ;} break; @@ -605,11 +605,11 @@ case 2: #line 632 "perly.y" { #ifdef MAD - (yyval.opval) = package((yyvsp[(2) - (3)].opval)); - token_getmad((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'o'); - token_getmad((yyvsp[(3) - (3)].i_tkval),(yyval.opval),';'); + (yyval.opval) = package((ps[(2) - (3)].val.opval)); + token_getmad((ps[(1) - (3)].val.i_tkval),(yyval.opval),'o'); + token_getmad((ps[(3) - (3)].val.i_tkval),(yyval.opval),';'); #else - package((yyvsp[(2) - (3)].opval)); + package((ps[(2) - (3)].val.opval)); (yyval.opval) = Nullop; #endif ;} @@ -624,13 +624,13 @@ case 2: #line 647 "perly.y" { SvREFCNT_inc(PL_compcv); #ifdef MAD - (yyval.opval) = utilize(IVAL((yyvsp[(1) - (7)].i_tkval)), (yyvsp[(2) - (7)].ival), (yyvsp[(4) - (7)].opval), (yyvsp[(5) - (7)].opval), (yyvsp[(6) - (7)].opval)); - token_getmad((yyvsp[(1) - (7)].i_tkval),(yyval.opval),'o'); - token_getmad((yyvsp[(7) - (7)].i_tkval),(yyval.opval),';'); + (yyval.opval) = utilize(IVAL((ps[(1) - (7)].val.i_tkval)), (ps[(2) - (7)].val.ival), (ps[(4) - (7)].val.opval), (ps[(5) - (7)].val.opval), (ps[(6) - (7)].val.opval)); + token_getmad((ps[(1) - (7)].val.i_tkval),(yyval.opval),'o'); + token_getmad((ps[(7) - (7)].val.i_tkval),(yyval.opval),';'); if (PL_rsfp_filters && AvFILLp(PL_rsfp_filters) >= 0) append_madprops(newMADPROP('!', MAD_PV, "", 0), (yyval.opval), 0); #else - utilize(IVAL((yyvsp[(1) - (7)].i_tkval)), (yyvsp[(2) - (7)].ival), (yyvsp[(4) - (7)].opval), (yyvsp[(5) - (7)].opval), (yyvsp[(6) - (7)].opval)); + utilize(IVAL((ps[(1) - (7)].val.i_tkval)), (ps[(2) - (7)].val.ival), (ps[(4) - (7)].val.opval), (ps[(5) - (7)].val.opval), (ps[(6) - (7)].val.opval)); (yyval.opval) = Nullop; #endif ;} @@ -638,22 +638,22 @@ case 2: case 82: #line 663 "perly.y" - { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 83: #line 667 "perly.y" - { (yyval.opval) = newLOGOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newLOGOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 84: #line 671 "perly.y" - { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; @@ -662,10 +662,10 @@ case 2: { #ifdef MAD OP* op = newNULLLIST(); - token_getmad((yyvsp[(2) - (2)].i_tkval),op,','); - (yyval.opval) = append_elem(OP_LIST, (yyvsp[(1) - (2)].opval), op); + token_getmad((ps[(2) - (2)].val.i_tkval),op,','); + (yyval.opval) = append_elem(OP_LIST, (ps[(1) - (2)].val.opval), op); #else - (yyval.opval) = (yyvsp[(1) - (2)].opval); + (yyval.opval) = (ps[(1) - (2)].val.opval); #endif ;} break; @@ -673,30 +673,30 @@ case 2: case 87: #line 689 "perly.y" { - OP* term = (yyvsp[(3) - (3)].opval); + OP* term = (ps[(3) - (3)].val.opval); DO_MAD( term = newUNOP(OP_NULL, 0, term); - token_getmad((yyvsp[(2) - (3)].i_tkval),term,','); + token_getmad((ps[(2) - (3)].val.i_tkval),term,','); ) - (yyval.opval) = append_elem(OP_LIST, (yyvsp[(1) - (3)].opval), term); + (yyval.opval) = append_elem(OP_LIST, (ps[(1) - (3)].val.opval), term); ;} break; case 89: #line 702 "perly.y" - { (yyval.opval) = convert(IVAL((yyvsp[(1) - (3)].i_tkval)), OPf_STACKED, - prepend_elem(OP_LIST, newGVREF(IVAL((yyvsp[(1) - (3)].i_tkval)),(yyvsp[(2) - (3)].opval)), (yyvsp[(3) - (3)].opval)) ); - TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = convert(IVAL((ps[(1) - (3)].val.i_tkval)), OPf_STACKED, + prepend_elem(OP_LIST, newGVREF(IVAL((ps[(1) - (3)].val.i_tkval)),(ps[(2) - (3)].val.opval)), (ps[(3) - (3)].val.opval)) ); + TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 90: #line 707 "perly.y" - { (yyval.opval) = convert(IVAL((yyvsp[(1) - (5)].i_tkval)), OPf_STACKED, - prepend_elem(OP_LIST, newGVREF(IVAL((yyvsp[(1) - (5)].i_tkval)),(yyvsp[(3) - (5)].opval)), (yyvsp[(4) - (5)].opval)) ); - TOKEN_GETMAD((yyvsp[(1) - (5)].i_tkval),(yyval.opval),'o'); - TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),')'); + { (yyval.opval) = convert(IVAL((ps[(1) - (5)].val.i_tkval)), OPf_STACKED, + prepend_elem(OP_LIST, newGVREF(IVAL((ps[(1) - (5)].val.i_tkval)),(ps[(3) - (5)].val.opval)), (ps[(4) - (5)].val.opval)) ); + TOKEN_GETMAD((ps[(1) - (5)].val.i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),')'); ;} break; @@ -704,20 +704,20 @@ case 2: #line 714 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, - prepend_elem(OP_LIST, scalar((yyvsp[(1) - (6)].opval)), (yyvsp[(5) - (6)].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[(3) - (6)].opval)))); - TOKEN_GETMAD((yyvsp[(2) - (6)].i_tkval),(yyval.opval),'A'); - TOKEN_GETMAD((yyvsp[(4) - (6)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(6) - (6)].i_tkval),(yyval.opval),')'); + prepend_elem(OP_LIST, scalar((ps[(1) - (6)].val.opval)), (ps[(5) - (6)].val.opval)), + newUNOP(OP_METHOD, 0, (ps[(3) - (6)].val.opval)))); + TOKEN_GETMAD((ps[(2) - (6)].val.i_tkval),(yyval.opval),'A'); + TOKEN_GETMAD((ps[(4) - (6)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(6) - (6)].val.i_tkval),(yyval.opval),')'); ;} break; case 92: #line 723 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, scalar((yyvsp[(1) - (3)].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[(3) - (3)].opval)))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'A'); + append_elem(OP_LIST, scalar((ps[(1) - (3)].val.opval)), + newUNOP(OP_METHOD, 0, (ps[(3) - (3)].val.opval)))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'A'); ;} break; @@ -725,8 +725,8 @@ case 2: #line 729 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, - prepend_elem(OP_LIST, (yyvsp[(2) - (3)].opval), (yyvsp[(3) - (3)].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[(1) - (3)].opval)))); + prepend_elem(OP_LIST, (ps[(2) - (3)].val.opval), (ps[(3) - (3)].val.opval)), + newUNOP(OP_METHOD, 0, (ps[(1) - (3)].val.opval)))); ;} break; @@ -734,282 +734,282 @@ case 2: #line 735 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, - prepend_elem(OP_LIST, (yyvsp[(2) - (5)].opval), (yyvsp[(4) - (5)].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[(1) - (5)].opval)))); - TOKEN_GETMAD((yyvsp[(3) - (5)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),')'); + prepend_elem(OP_LIST, (ps[(2) - (5)].val.opval), (ps[(4) - (5)].val.opval)), + newUNOP(OP_METHOD, 0, (ps[(1) - (5)].val.opval)))); + TOKEN_GETMAD((ps[(3) - (5)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),')'); ;} break; case 95: #line 743 "perly.y" - { (yyval.opval) = convert(IVAL((yyvsp[(1) - (2)].i_tkval)), 0, (yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = convert(IVAL((ps[(1) - (2)].val.i_tkval)), 0, (ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 96: #line 747 "perly.y" - { (yyval.opval) = convert(IVAL((yyvsp[(1) - (4)].i_tkval)), 0, (yyvsp[(3) - (4)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'o'); - TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),')'); + { (yyval.opval) = convert(IVAL((ps[(1) - (4)].val.i_tkval)), 0, (ps[(3) - (4)].val.opval)); + TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),')'); ;} break; case 97: #line 753 "perly.y" { SvREFCNT_inc(PL_compcv); - (yyval.opval) = newANONATTRSUB((yyvsp[(2) - (3)].ival), 0, Nullop, (yyvsp[(3) - (3)].opval)); ;} + (yyval.opval) = newANONATTRSUB((ps[(2) - (3)].val.ival), 0, Nullop, (ps[(3) - (3)].val.opval)); ;} break; case 98: #line 756 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, - prepend_elem(OP_LIST, (yyvsp[(4) - (5)].opval), (yyvsp[(5) - (5)].opval)), (yyvsp[(1) - (5)].opval))); + prepend_elem(OP_LIST, (ps[(4) - (5)].val.opval), (ps[(5) - (5)].val.opval)), (ps[(1) - (5)].val.opval))); ;} break; case 101: #line 771 "perly.y" - { (yyval.opval) = newBINOP(OP_GELEM, 0, (yyvsp[(1) - (5)].opval), scalar((yyvsp[(3) - (5)].opval))); + { (yyval.opval) = newBINOP(OP_GELEM, 0, (ps[(1) - (5)].val.opval), scalar((ps[(3) - (5)].val.opval))); PL_expect = XOPERATOR; - TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'{'); - TOKEN_GETMAD((yyvsp[(4) - (5)].i_tkval),(yyval.opval),';'); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),'}'); + TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'{'); + TOKEN_GETMAD((ps[(4) - (5)].val.i_tkval),(yyval.opval),';'); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),'}'); ;} break; case 102: #line 778 "perly.y" - { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((yyvsp[(1) - (4)].opval)), scalar((yyvsp[(3) - (4)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'['); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),']'); + { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((ps[(1) - (4)].val.opval)), scalar((ps[(3) - (4)].val.opval))); + TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'['); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),']'); ;} break; case 103: #line 783 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, - ref(newAVREF((yyvsp[(1) - (5)].opval)),OP_RV2AV), - scalar((yyvsp[(4) - (5)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'a'); - TOKEN_GETMAD((yyvsp[(3) - (5)].i_tkval),(yyval.opval),'['); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),']'); + ref(newAVREF((ps[(1) - (5)].val.opval)),OP_RV2AV), + scalar((ps[(4) - (5)].val.opval))); + TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'a'); + TOKEN_GETMAD((ps[(3) - (5)].val.i_tkval),(yyval.opval),'['); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),']'); ;} break; case 104: #line 791 "perly.y" { (yyval.opval) = newBINOP(OP_AELEM, 0, - ref(newAVREF((yyvsp[(1) - (4)].opval)),OP_RV2AV), - scalar((yyvsp[(3) - (4)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'['); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),']'); + ref(newAVREF((ps[(1) - (4)].val.opval)),OP_RV2AV), + scalar((ps[(3) - (4)].val.opval))); + TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'['); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),']'); ;} break; case 105: #line 798 "perly.y" - { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((yyvsp[(1) - (5)].opval)), jmaybe((yyvsp[(3) - (5)].opval))); + { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((ps[(1) - (5)].val.opval)), jmaybe((ps[(3) - (5)].val.opval))); PL_expect = XOPERATOR; - TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'{'); - TOKEN_GETMAD((yyvsp[(4) - (5)].i_tkval),(yyval.opval),';'); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),'}'); + TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'{'); + TOKEN_GETMAD((ps[(4) - (5)].val.i_tkval),(yyval.opval),';'); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),'}'); ;} break; case 106: #line 805 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, - ref(newHVREF((yyvsp[(1) - (6)].opval)),OP_RV2HV), - jmaybe((yyvsp[(4) - (6)].opval))); + ref(newHVREF((ps[(1) - (6)].val.opval)),OP_RV2HV), + jmaybe((ps[(4) - (6)].val.opval))); PL_expect = XOPERATOR; - TOKEN_GETMAD((yyvsp[(2) - (6)].i_tkval),(yyval.opval),'a'); - TOKEN_GETMAD((yyvsp[(3) - (6)].i_tkval),(yyval.opval),'{'); - TOKEN_GETMAD((yyvsp[(5) - (6)].i_tkval),(yyval.opval),';'); - TOKEN_GETMAD((yyvsp[(6) - (6)].i_tkval),(yyval.opval),'}'); + TOKEN_GETMAD((ps[(2) - (6)].val.i_tkval),(yyval.opval),'a'); + TOKEN_GETMAD((ps[(3) - (6)].val.i_tkval),(yyval.opval),'{'); + TOKEN_GETMAD((ps[(5) - (6)].val.i_tkval),(yyval.opval),';'); + TOKEN_GETMAD((ps[(6) - (6)].val.i_tkval),(yyval.opval),'}'); ;} break; case 107: #line 815 "perly.y" { (yyval.opval) = newBINOP(OP_HELEM, 0, - ref(newHVREF((yyvsp[(1) - (5)].opval)),OP_RV2HV), - jmaybe((yyvsp[(3) - (5)].opval))); + ref(newHVREF((ps[(1) - (5)].val.opval)),OP_RV2HV), + jmaybe((ps[(3) - (5)].val.opval))); PL_expect = XOPERATOR; - TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'{'); - TOKEN_GETMAD((yyvsp[(4) - (5)].i_tkval),(yyval.opval),';'); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),'}'); + TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'{'); + TOKEN_GETMAD((ps[(4) - (5)].val.i_tkval),(yyval.opval),';'); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),'}'); ;} break; case 108: #line 824 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar((yyvsp[(1) - (4)].opval)))); - TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'a'); - TOKEN_GETMAD((yyvsp[(3) - (4)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),')'); + newCVREF(0, scalar((ps[(1) - (4)].val.opval)))); + TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'a'); + TOKEN_GETMAD((ps[(3) - (4)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),')'); ;} break; case 109: #line 831 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[(4) - (5)].opval), - newCVREF(0, scalar((yyvsp[(1) - (5)].opval))))); - TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'a'); - TOKEN_GETMAD((yyvsp[(3) - (5)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),')'); + append_elem(OP_LIST, (ps[(4) - (5)].val.opval), + newCVREF(0, scalar((ps[(1) - (5)].val.opval))))); + TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'a'); + TOKEN_GETMAD((ps[(3) - (5)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),')'); ;} break; case 110: #line 840 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[(3) - (4)].opval), - newCVREF(0, scalar((yyvsp[(1) - (4)].opval))))); - TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),')'); + append_elem(OP_LIST, (ps[(3) - (4)].val.opval), + newCVREF(0, scalar((ps[(1) - (4)].val.opval))))); + TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),')'); ;} break; case 111: #line 847 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar((yyvsp[(1) - (3)].opval)))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),')'); + newCVREF(0, scalar((ps[(1) - (3)].val.opval)))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),')'); ;} break; case 112: #line 853 "perly.y" - { (yyval.opval) = newSLICEOP(0, (yyvsp[(5) - (6)].opval), (yyvsp[(2) - (6)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (6)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(3) - (6)].i_tkval),(yyval.opval),')'); - TOKEN_GETMAD((yyvsp[(4) - (6)].i_tkval),(yyval.opval),'['); - TOKEN_GETMAD((yyvsp[(6) - (6)].i_tkval),(yyval.opval),']'); + { (yyval.opval) = newSLICEOP(0, (ps[(5) - (6)].val.opval), (ps[(2) - (6)].val.opval)); + TOKEN_GETMAD((ps[(1) - (6)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(3) - (6)].val.i_tkval),(yyval.opval),')'); + TOKEN_GETMAD((ps[(4) - (6)].val.i_tkval),(yyval.opval),'['); + TOKEN_GETMAD((ps[(6) - (6)].val.i_tkval),(yyval.opval),']'); ;} break; case 113: #line 860 "perly.y" - { (yyval.opval) = newSLICEOP(0, (yyvsp[(4) - (5)].opval), Nullop); - TOKEN_GETMAD((yyvsp[(1) - (5)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),')'); - TOKEN_GETMAD((yyvsp[(3) - (5)].i_tkval),(yyval.opval),'['); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),']'); + { (yyval.opval) = newSLICEOP(0, (ps[(4) - (5)].val.opval), Nullop); + TOKEN_GETMAD((ps[(1) - (5)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),')'); + TOKEN_GETMAD((ps[(3) - (5)].val.i_tkval),(yyval.opval),'['); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),']'); ;} break; case 114: #line 870 "perly.y" - { (yyval.opval) = newASSIGNOP(OPf_STACKED, (yyvsp[(1) - (3)].opval), IVAL((yyvsp[(2) - (3)].i_tkval)), (yyvsp[(3) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newASSIGNOP(OPf_STACKED, (ps[(1) - (3)].val.opval), IVAL((ps[(2) - (3)].val.i_tkval)), (ps[(3) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 115: #line 874 "perly.y" - { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 116: #line 878 "perly.y" - { if (IVAL((yyvsp[(2) - (3)].i_tkval)) != OP_REPEAT) - scalar((yyvsp[(1) - (3)].opval)); - (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, (yyvsp[(1) - (3)].opval), scalar((yyvsp[(3) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { if (IVAL((ps[(2) - (3)].val.i_tkval)) != OP_REPEAT) + scalar((ps[(1) - (3)].val.opval)); + (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, (ps[(1) - (3)].val.opval), scalar((ps[(3) - (3)].val.opval))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 117: #line 884 "perly.y" - { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 118: #line 888 "perly.y" - { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 119: #line 892 "perly.y" - { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 120: #line 896 "perly.y" - { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 121: #line 900 "perly.y" - { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 122: #line 904 "perly.y" - { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].i_tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newBINOP(IVAL((ps[(2) - (3)].val.i_tkval)), 0, scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 123: #line 908 "perly.y" { - (yyval.opval) = newRANGE(IVAL((yyvsp[(2) - (3)].i_tkval)), scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); + (yyval.opval) = newRANGE(IVAL((ps[(2) - (3)].val.i_tkval)), scalar((ps[(1) - (3)].val.opval)), scalar((ps[(3) - (3)].val.opval))); DO_MAD( UNOP *op; op = (UNOP*)(yyval.opval); op = (UNOP*)op->op_first; /* get to flop */ op = (UNOP*)op->op_first; /* get to flip */ op = (UNOP*)op->op_first; /* get to range */ - token_getmad((yyvsp[(2) - (3)].i_tkval),(OP*)op,'o'); + token_getmad((ps[(2) - (3)].val.i_tkval),(OP*)op,'o'); ) ;} break; case 124: #line 920 "perly.y" - { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 125: #line 924 "perly.y" - { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 126: #line 928 "perly.y" - { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 127: #line 932 "perly.y" - { (yyval.opval) = bind_match(IVAL((yyvsp[(2) - (3)].i_tkval)), (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval), + { (yyval.opval) = bind_match(IVAL((ps[(2) - (3)].val.i_tkval)), (ps[(1) - (3)].val.opval), (ps[(3) - (3)].val.opval)); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval), ((yyval.opval)->op_type == OP_NOT ? ((UNOP*)(yyval.opval))->op_first : (yyval.opval)), '~'); @@ -1018,122 +1018,122 @@ case 2: case 128: #line 942 "perly.y" - { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((yyvsp[(2) - (2)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((ps[(2) - (2)].val.opval))); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 129: #line 946 "perly.y" { (yyval.opval) = IF_MAD( - newUNOP(OP_NULL, 0, (yyvsp[(2) - (2)].opval)), - (yyvsp[(2) - (2)].opval) + newUNOP(OP_NULL, 0, (ps[(2) - (2)].val.opval)), + (ps[(2) - (2)].val.opval) ); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'+'); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'+'); ;} break; case 130: #line 953 "perly.y" - { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[(2) - (2)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[(2) - (2)].val.opval))); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 131: #line 957 "perly.y" - { (yyval.opval) = newUNOP(OP_COMPLEMENT, 0, scalar((yyvsp[(2) - (2)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newUNOP(OP_COMPLEMENT, 0, scalar((ps[(2) - (2)].val.opval))); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 132: #line 961 "perly.y" { (yyval.opval) = newUNOP(OP_POSTINC, 0, - mod(scalar((yyvsp[(1) - (2)].opval)), OP_POSTINC)); - TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),'o'); + mod(scalar((ps[(1) - (2)].val.opval)), OP_POSTINC)); + TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 133: #line 966 "perly.y" { (yyval.opval) = newUNOP(OP_POSTDEC, 0, - mod(scalar((yyvsp[(1) - (2)].opval)), OP_POSTDEC)); - TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),'o'); + mod(scalar((ps[(1) - (2)].val.opval)), OP_POSTDEC)); + TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 134: #line 971 "perly.y" { (yyval.opval) = newUNOP(OP_PREINC, 0, - mod(scalar((yyvsp[(2) - (2)].opval)), OP_PREINC)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + mod(scalar((ps[(2) - (2)].val.opval)), OP_PREINC)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 135: #line 976 "perly.y" { (yyval.opval) = newUNOP(OP_PREDEC, 0, - mod(scalar((yyvsp[(2) - (2)].opval)), OP_PREDEC)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + mod(scalar((ps[(2) - (2)].val.opval)), OP_PREDEC)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 136: #line 985 "perly.y" - { (yyval.opval) = newANONLIST((yyvsp[(2) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'['); - TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),']'); + { (yyval.opval) = newANONLIST((ps[(2) - (3)].val.opval)); + TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'['); + TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),']'); ;} break; case 137: #line 990 "perly.y" { (yyval.opval) = newANONLIST(Nullop); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'['); - TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),']'); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'['); + TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),']'); ;} break; case 138: #line 995 "perly.y" - { (yyval.opval) = newANONHASH((yyvsp[(2) - (4)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'{'); - TOKEN_GETMAD((yyvsp[(3) - (4)].i_tkval),(yyval.opval),';'); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),'}'); + { (yyval.opval) = newANONHASH((ps[(2) - (4)].val.opval)); + TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'{'); + TOKEN_GETMAD((ps[(3) - (4)].val.i_tkval),(yyval.opval),';'); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),'}'); ;} break; case 139: #line 1001 "perly.y" { (yyval.opval) = newANONHASH(Nullop); - TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'{'); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),';'); - TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),'}'); + TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'{'); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),';'); + TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),'}'); ;} break; case 140: #line 1007 "perly.y" { SvREFCNT_inc(PL_compcv); - (yyval.opval) = newANONATTRSUB((yyvsp[(2) - (5)].ival), (yyvsp[(3) - (5)].opval), (yyvsp[(4) - (5)].opval), (yyvsp[(5) - (5)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (5)].i_tkval),(yyval.opval),'o'); - OP_GETMAD((yyvsp[(3) - (5)].opval),(yyval.opval),'s'); - OP_GETMAD((yyvsp[(4) - (5)].opval),(yyval.opval),'a'); + (yyval.opval) = newANONATTRSUB((ps[(2) - (5)].val.ival), (ps[(3) - (5)].val.opval), (ps[(4) - (5)].val.opval), (ps[(5) - (5)].val.opval)); + TOKEN_GETMAD((ps[(1) - (5)].val.i_tkval),(yyval.opval),'o'); + OP_GETMAD((ps[(3) - (5)].val.opval),(yyval.opval),'s'); + OP_GETMAD((ps[(4) - (5)].val.opval),(yyval.opval),'a'); ;} break; case 141: #line 1018 "perly.y" - { (yyval.opval) = dofile((yyvsp[(2) - (2)].opval), IVAL((yyvsp[(1) - (2)].i_tkval))); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = dofile((ps[(2) - (2)].val.opval), IVAL((ps[(1) - (2)].val.i_tkval))); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 142: #line 1022 "perly.y" - { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, scope((yyvsp[(2) - (2)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'D'); + { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, scope((ps[(2) - (2)].val.opval))); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'D'); ;} break; @@ -1144,11 +1144,11 @@ case 2: prepend_elem(OP_LIST, scalar(newCVREF( (OPpENTERSUB_AMPER<<8), - scalar((yyvsp[(2) - (4)].opval)) + scalar((ps[(2) - (4)].val.opval)) )),Nullop)); dep(); - TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'o'); - TOKEN_GETMAD((yyvsp[(3) - (4)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),')'); + TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(3) - (4)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),')'); ;} break; @@ -1157,14 +1157,14 @@ case 2: { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, append_elem(OP_LIST, - (yyvsp[(4) - (5)].opval), + (ps[(4) - (5)].val.opval), scalar(newCVREF( (OPpENTERSUB_AMPER<<8), - scalar((yyvsp[(2) - (5)].opval)) + scalar((ps[(2) - (5)].val.opval)) )))); dep(); - TOKEN_GETMAD((yyvsp[(1) - (5)].i_tkval),(yyval.opval),'o'); - TOKEN_GETMAD((yyvsp[(3) - (5)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),')'); + TOKEN_GETMAD((ps[(1) - (5)].val.i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(3) - (5)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),')'); ;} break; @@ -1172,10 +1172,10 @@ case 2: #line 1051 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, - scalar(newCVREF(0,scalar((yyvsp[(2) - (4)].opval)))), Nullop)); dep(); - TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'o'); - TOKEN_GETMAD((yyvsp[(3) - (4)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),')'); + scalar(newCVREF(0,scalar((ps[(2) - (4)].val.opval)))), Nullop)); dep(); + TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(3) - (4)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),')'); ;} break; @@ -1183,85 +1183,85 @@ case 2: #line 1059 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, - (yyvsp[(4) - (5)].opval), - scalar(newCVREF(0,scalar((yyvsp[(2) - (5)].opval)))))); dep(); - TOKEN_GETMAD((yyvsp[(1) - (5)].i_tkval),(yyval.opval),'o'); - TOKEN_GETMAD((yyvsp[(3) - (5)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),')'); + (ps[(4) - (5)].val.opval), + scalar(newCVREF(0,scalar((ps[(2) - (5)].val.opval)))))); dep(); + TOKEN_GETMAD((ps[(1) - (5)].val.i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(3) - (5)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),')'); ;} break; case 151: #line 1075 "perly.y" - { (yyval.opval) = newCONDOP(0, (yyvsp[(1) - (5)].opval), (yyvsp[(3) - (5)].opval), (yyvsp[(5) - (5)].opval)); - TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'?'); - TOKEN_GETMAD((yyvsp[(4) - (5)].i_tkval),(yyval.opval),':'); + { (yyval.opval) = newCONDOP(0, (ps[(1) - (5)].val.opval), (ps[(3) - (5)].val.opval), (ps[(5) - (5)].val.opval)); + TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'?'); + TOKEN_GETMAD((ps[(4) - (5)].val.i_tkval),(yyval.opval),':'); ;} break; case 152: #line 1080 "perly.y" - { (yyval.opval) = newUNOP(OP_REFGEN, 0, mod((yyvsp[(2) - (2)].opval),OP_REFGEN)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newUNOP(OP_REFGEN, 0, mod((ps[(2) - (2)].val.opval),OP_REFGEN)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 153: #line 1084 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 154: #line 1086 "perly.y" - { (yyval.opval) = localize((yyvsp[(2) - (2)].opval),IVAL((yyvsp[(1) - (2)].i_tkval))); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'d'); + { (yyval.opval) = localize((ps[(2) - (2)].val.opval),IVAL((ps[(1) - (2)].val.i_tkval))); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'d'); ;} break; case 155: #line 1090 "perly.y" - { (yyval.opval) = sawparens(IF_MAD(newUNOP(OP_NULL,0,(yyvsp[(2) - (3)].opval)), (yyvsp[(2) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),')'); + { (yyval.opval) = sawparens(IF_MAD(newUNOP(OP_NULL,0,(ps[(2) - (3)].val.opval)), (ps[(2) - (3)].val.opval))); + TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),')'); ;} break; case 156: #line 1095 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),')'); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),')'); ;} break; case 157: #line 1100 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 158: #line 1102 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 159: #line 1104 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 160: #line 1106 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 161: #line 1108 "perly.y" - { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((yyvsp[(1) - (1)].opval), OP_AV2ARYLEN));;} + { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((ps[(1) - (1)].val.opval), OP_AV2ARYLEN));;} break; case 162: #line 1110 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 163: @@ -1269,10 +1269,10 @@ case 2: { (yyval.opval) = prepend_elem(OP_ASLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_ASLICE, 0, - list((yyvsp[(3) - (4)].opval)), - ref((yyvsp[(1) - (4)].opval), OP_ASLICE))); - TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'['); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),']'); + list((ps[(3) - (4)].val.opval)), + ref((ps[(1) - (4)].val.opval), OP_ASLICE))); + TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'['); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),']'); ;} break; @@ -1281,30 +1281,30 @@ case 2: { (yyval.opval) = prepend_elem(OP_HSLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_HSLICE, 0, - list((yyvsp[(3) - (5)].opval)), - ref(oopsHV((yyvsp[(1) - (5)].opval)), OP_HSLICE))); + list((ps[(3) - (5)].val.opval)), + ref(oopsHV((ps[(1) - (5)].val.opval)), OP_HSLICE))); PL_expect = XOPERATOR; - TOKEN_GETMAD((yyvsp[(2) - (5)].i_tkval),(yyval.opval),'{'); - TOKEN_GETMAD((yyvsp[(4) - (5)].i_tkval),(yyval.opval),';'); - TOKEN_GETMAD((yyvsp[(5) - (5)].i_tkval),(yyval.opval),'}'); + TOKEN_GETMAD((ps[(2) - (5)].val.i_tkval),(yyval.opval),'{'); + TOKEN_GETMAD((ps[(4) - (5)].val.i_tkval),(yyval.opval),';'); + TOKEN_GETMAD((ps[(5) - (5)].val.i_tkval),(yyval.opval),'}'); ;} break; case 165: #line 1132 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 166: #line 1134 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((yyvsp[(1) - (1)].opval))); ;} + { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((ps[(1) - (1)].val.opval))); ;} break; case 167: #line 1136 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[(1) - (3)].opval))); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),')'); + { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[(1) - (3)].val.opval))); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),')'); ;} break; @@ -1312,14 +1312,14 @@ case 2: #line 1141 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[(3) - (4)].opval), scalar((yyvsp[(1) - (4)].opval)))); + append_elem(OP_LIST, (ps[(3) - (4)].val.opval), scalar((ps[(1) - (4)].val.opval)))); DO_MAD( OP* op = (yyval.opval); if (op->op_type == OP_CONST) { /* defeat const fold */ op = (OP*)op->op_madprop->mad_val; } - token_getmad((yyvsp[(2) - (4)].i_tkval),op,'('); - token_getmad((yyvsp[(4) - (4)].i_tkval),op,')'); + token_getmad((ps[(2) - (4)].val.i_tkval),op,'('); + token_getmad((ps[(4) - (4)].val.i_tkval),op,')'); ) ;} break; @@ -1327,173 +1327,173 @@ case 2: case 169: #line 1154 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[(3) - (3)].opval), scalar((yyvsp[(2) - (3)].opval)))); - TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'o'); + append_elem(OP_LIST, (ps[(3) - (3)].val.opval), scalar((ps[(2) - (3)].val.opval)))); + TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'o'); ;} break; case 170: #line 1159 "perly.y" - { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (1)].i_tkval)), OPf_SPECIAL); + { (yyval.opval) = newOP(IVAL((ps[(1) - (1)].val.i_tkval)), OPf_SPECIAL); PL_hints |= HINT_BLOCK_SCOPE; - TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),'o'); ;} break; case 171: #line 1164 "perly.y" - { (yyval.opval) = newLOOPEX(IVAL((yyvsp[(1) - (2)].i_tkval)),(yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newLOOPEX(IVAL((ps[(1) - (2)].val.i_tkval)),(ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 172: #line 1168 "perly.y" - { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[(2) - (2)].opval))); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[(2) - (2)].val.opval))); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 173: #line 1172 "perly.y" - { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (1)].i_tkval)), 0); - TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newOP(IVAL((ps[(1) - (1)].val.i_tkval)), 0); + TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),'o'); ;} break; case 174: #line 1176 "perly.y" - { (yyval.opval) = newUNOP(IVAL((yyvsp[(1) - (2)].i_tkval)), 0, (yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newUNOP(IVAL((ps[(1) - (2)].val.i_tkval)), 0, (ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 175: #line 1180 "perly.y" - { (yyval.opval) = newUNOP(IVAL((yyvsp[(1) - (2)].i_tkval)), 0, (yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newUNOP(IVAL((ps[(1) - (2)].val.i_tkval)), 0, (ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'o'); ;} break; case 176: #line 1184 "perly.y" - { (yyval.opval) = newOP(OP_REQUIRE, (yyvsp[(1) - (1)].i_tkval) ? OPf_SPECIAL : 0); ;} + { (yyval.opval) = newOP(OP_REQUIRE, (ps[(1) - (1)].val.i_tkval) ? OPf_SPECIAL : 0); ;} break; case 177: #line 1186 "perly.y" - { (yyval.opval) = newUNOP(OP_REQUIRE, (yyvsp[(1) - (2)].i_tkval) ? OPf_SPECIAL : 0, (yyvsp[(2) - (2)].opval)); ;} + { (yyval.opval) = newUNOP(OP_REQUIRE, (ps[(1) - (2)].val.i_tkval) ? OPf_SPECIAL : 0, (ps[(2) - (2)].val.opval)); ;} break; case 178: #line 1188 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[(1) - (1)].opval))); ;} + { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[(1) - (1)].val.opval))); ;} break; case 179: #line 1190 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[(2) - (2)].opval), scalar((yyvsp[(1) - (2)].opval)))); ;} + append_elem(OP_LIST, (ps[(2) - (2)].val.opval), scalar((ps[(1) - (2)].val.opval)))); ;} break; case 180: #line 1193 "perly.y" - { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (1)].i_tkval)), 0); - TOKEN_GETMAD((yyvsp[(1) - (1)].i_tkval),(yyval.opval),'o'); + { (yyval.opval) = newOP(IVAL((ps[(1) - (1)].val.i_tkval)), 0); + TOKEN_GETMAD((ps[(1) - (1)].val.i_tkval),(yyval.opval),'o'); ;} break; case 181: #line 1197 "perly.y" - { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (3)].i_tkval)), 0); - TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'o'); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),')'); + { (yyval.opval) = newOP(IVAL((ps[(1) - (3)].val.i_tkval)), 0); + TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),')'); ;} break; case 182: #line 1203 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - scalar((yyvsp[(1) - (1)].opval))); ;} + scalar((ps[(1) - (1)].val.opval))); ;} break; case 183: #line 1206 "perly.y" - { (yyval.opval) = (IVAL((yyvsp[(1) - (3)].i_tkval)) == OP_NOT) - ? newUNOP(IVAL((yyvsp[(1) - (3)].i_tkval)), 0, newSVOP(OP_CONST, 0, newSViv(0))) - : newOP(IVAL((yyvsp[(1) - (3)].i_tkval)), OPf_SPECIAL); + { (yyval.opval) = (IVAL((ps[(1) - (3)].val.i_tkval)) == OP_NOT) + ? newUNOP(IVAL((ps[(1) - (3)].val.i_tkval)), 0, newSVOP(OP_CONST, 0, newSViv(0))) + : newOP(IVAL((ps[(1) - (3)].val.i_tkval)), OPf_SPECIAL); - TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'o'); - TOKEN_GETMAD((yyvsp[(2) - (3)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),')'); + TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(2) - (3)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),')'); ;} break; case 184: #line 1215 "perly.y" - { (yyval.opval) = newUNOP(IVAL((yyvsp[(1) - (4)].i_tkval)), 0, (yyvsp[(3) - (4)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (4)].i_tkval),(yyval.opval),'o'); - TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),')'); + { (yyval.opval) = newUNOP(IVAL((ps[(1) - (4)].val.i_tkval)), 0, (ps[(3) - (4)].val.opval)); + TOKEN_GETMAD((ps[(1) - (4)].val.i_tkval),(yyval.opval),'o'); + TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),')'); ;} break; case 185: #line 1221 "perly.y" - { (yyval.opval) = pmruntime((yyvsp[(1) - (4)].opval), (yyvsp[(3) - (4)].opval), 1); - TOKEN_GETMAD((yyvsp[(2) - (4)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(4) - (4)].i_tkval),(yyval.opval),')'); + { (yyval.opval) = pmruntime((ps[(1) - (4)].val.opval), (ps[(3) - (4)].val.opval), 1); + TOKEN_GETMAD((ps[(2) - (4)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(4) - (4)].val.i_tkval),(yyval.opval),')'); ;} break; case 188: #line 1231 "perly.y" - { (yyval.opval) = my_attrs((yyvsp[(2) - (3)].opval),(yyvsp[(3) - (3)].opval)); + { (yyval.opval) = my_attrs((ps[(2) - (3)].val.opval),(ps[(3) - (3)].val.opval)); DO_MAD( - token_getmad((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'d'); - append_madprops((yyvsp[(3) - (3)].opval)->op_madprop, (yyval.opval), 'a'); - (yyvsp[(3) - (3)].opval)->op_madprop = 0; + token_getmad((ps[(1) - (3)].val.i_tkval),(yyval.opval),'d'); + append_madprops((ps[(3) - (3)].val.opval)->op_madprop, (yyval.opval), 'a'); + (ps[(3) - (3)].val.opval)->op_madprop = 0; ) ;} break; case 189: #line 1239 "perly.y" - { (yyval.opval) = localize((yyvsp[(2) - (2)].opval),IVAL((yyvsp[(1) - (2)].i_tkval))); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'d'); + { (yyval.opval) = localize((ps[(2) - (2)].val.opval),IVAL((ps[(1) - (2)].val.i_tkval))); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'d'); ;} break; case 190: #line 1246 "perly.y" - { (yyval.opval) = sawparens((yyvsp[(2) - (3)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (3)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(3) - (3)].i_tkval),(yyval.opval),')'); + { (yyval.opval) = sawparens((ps[(2) - (3)].val.opval)); + TOKEN_GETMAD((ps[(1) - (3)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(3) - (3)].val.i_tkval),(yyval.opval),')'); ;} break; case 191: #line 1251 "perly.y" { (yyval.opval) = sawparens(newNULLLIST()); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'('); - TOKEN_GETMAD((yyvsp[(2) - (2)].i_tkval),(yyval.opval),')'); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'('); + TOKEN_GETMAD((ps[(2) - (2)].val.i_tkval),(yyval.opval),')'); ;} break; case 192: #line 1256 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 193: #line 1258 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 194: #line 1260 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 195: @@ -1503,7 +1503,7 @@ case 2: case 196: #line 1267 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 197: @@ -1513,7 +1513,7 @@ case 2: case 198: #line 1273 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; case 199: @@ -1521,10 +1521,10 @@ case 2: { #ifdef MAD OP* op = newNULLLIST(); - token_getmad((yyvsp[(2) - (2)].i_tkval),op,','); - (yyval.opval) = append_elem(OP_LIST, (yyvsp[(1) - (2)].opval), op); + token_getmad((ps[(2) - (2)].val.i_tkval),op,','); + (yyval.opval) = append_elem(OP_LIST, (ps[(1) - (2)].val.opval), op); #else - (yyval.opval) = (yyvsp[(1) - (2)].opval); + (yyval.opval) = (ps[(1) - (2)].val.opval); #endif ;} @@ -1532,69 +1532,69 @@ case 2: case 200: #line 1290 "perly.y" - { PL_in_my = 0; (yyval.opval) = my((yyvsp[(1) - (1)].opval)); ;} + { PL_in_my = 0; (yyval.opval) = my((ps[(1) - (1)].val.opval)); ;} break; case 201: #line 1294 "perly.y" - { (yyval.opval) = newCVREF(IVAL((yyvsp[(1) - (2)].i_tkval)),(yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'&'); + { (yyval.opval) = newCVREF(IVAL((ps[(1) - (2)].val.i_tkval)),(ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'&'); ;} break; case 202: #line 1300 "perly.y" - { (yyval.opval) = newSVREF((yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'$'); + { (yyval.opval) = newSVREF((ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'$'); ;} break; case 203: #line 1306 "perly.y" - { (yyval.opval) = newAVREF((yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'@'); + { (yyval.opval) = newAVREF((ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'@'); ;} break; case 204: #line 1312 "perly.y" - { (yyval.opval) = newHVREF((yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'%'); + { (yyval.opval) = newHVREF((ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'%'); ;} break; case 205: #line 1318 "perly.y" - { (yyval.opval) = newAVREF((yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'l'); + { (yyval.opval) = newAVREF((ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'l'); ;} break; case 206: #line 1324 "perly.y" - { (yyval.opval) = newGVREF(0,(yyvsp[(2) - (2)].opval)); - TOKEN_GETMAD((yyvsp[(1) - (2)].i_tkval),(yyval.opval),'*'); + { (yyval.opval) = newGVREF(0,(ps[(2) - (2)].val.opval)); + TOKEN_GETMAD((ps[(1) - (2)].val.i_tkval),(yyval.opval),'*'); ;} break; case 207: #line 1331 "perly.y" - { (yyval.opval) = scalar((yyvsp[(1) - (1)].opval)); ;} + { (yyval.opval) = scalar((ps[(1) - (1)].val.opval)); ;} break; case 208: #line 1333 "perly.y" - { (yyval.opval) = scalar((yyvsp[(1) - (1)].opval)); ;} + { (yyval.opval) = scalar((ps[(1) - (1)].val.opval)); ;} break; case 209: #line 1335 "perly.y" - { (yyval.opval) = scope((yyvsp[(1) - (1)].opval)); ;} + { (yyval.opval) = scope((ps[(1) - (1)].val.opval)); ;} break; case 210: #line 1338 "perly.y" - { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + { (yyval.opval) = (ps[(1) - (1)].val.opval); ;} break; diff --git a/perly.c b/perly.c index 043969d..1aaa228 100644 --- a/perly.c +++ b/perly.c @@ -24,11 +24,6 @@ * This is controlled by the PERL_IN_MADLY_C define. */ - - -/* allow stack size to grow effectively without limit */ -#define YYMAXDEPTH 10000000 - #include "EXTERN.h" #define PERL_IN_PERLY_C #include "perl.h" @@ -39,6 +34,24 @@ typedef unsigned short int yytype_uint16; typedef short int yytype_int16; typedef signed char yysigned_char; +typedef struct { + YYSTYPE val; /* semantic value */ + short state; + AV *comppad; /* value of PL_comppad when this value was created */ +#ifdef DEBUGGING + const char *name; /* token/rule name for -Dpv */ +#endif +} yy_stack_frame; + +typedef struct { + int stack_size; + int reduce_len; /* XXX integrate with yylen ? */ + yy_stack_frame *ps; /* current stack frame */ + yy_stack_frame stack[1]; /* will actually be as many as needed */ +} yy_parser; + + + #ifdef DEBUGGING # define YYDEBUG 1 #else @@ -103,62 +116,62 @@ yysymprint(pTHX_ PerlIO * const yyoutput, int yytype, const YYSTYPE * const yyva /* yy_stack_print() - * print the top 8 items on the parse stack. The args have the same - * meanings as the local vars in yyparse() of the same name */ + * print the top 8 items on the parse stack. + */ static void -yy_stack_print (pTHX_ const short *yyss, const short *yyssp, const YYSTYPE *yyvs, const char**yyns) +yy_stack_print (pTHX_ const yy_parser *parser) { - int i; - int start = 1; - int count = (int)(yyssp - yyss); + const yy_stack_frame *ps, *min; - if (count > 8) { - start = count - 8 + 1; - count = 8; - } + min = parser->ps - 8; + if (min <= &parser->stack[0]) + min = &parser->stack[0] + 1; PerlIO_printf(Perl_debug_log, "\nindex:"); - for (i=0; i < count; i++) - PerlIO_printf(Perl_debug_log, " %8d", start+i); + for (ps = min; ps <= parser->ps; ps++) + PerlIO_printf(Perl_debug_log, " %8d", ps - &parser->stack[0]); + PerlIO_printf(Perl_debug_log, "\nstate:"); - for (i=0; i < count; i++) - PerlIO_printf(Perl_debug_log, " %8d", yyss[start+i]); + for (ps = min; ps <= parser->ps; ps++) + PerlIO_printf(Perl_debug_log, " %8d", ps->state); + PerlIO_printf(Perl_debug_log, "\ntoken:"); - for (i=0; i < count; i++) - PerlIO_printf(Perl_debug_log, " %8.8s", yyns[start+i]); + for (ps = min; ps <= parser->ps; ps++) + PerlIO_printf(Perl_debug_log, " %8.8s", ps->name); + PerlIO_printf(Perl_debug_log, "\nvalue:"); - for (i=0; i < count; i++) { - switch (yy_type_tab[yystos[yyss[start+i]]]) { + for (ps = min; ps <= parser->ps; ps++) { + switch (yy_type_tab[yystos[ps->state]]) { case toketype_opval: PerlIO_printf(Perl_debug_log, " %8.8s", - yyvs[start+i].opval - ? PL_op_name[yyvs[start+i].opval->op_type] + ps->val.opval + ? PL_op_name[ps->val.opval->op_type] : "(Nullop)" ); break; #ifndef PERL_IN_MADLY_C case toketype_p_tkval: PerlIO_printf(Perl_debug_log, " %8.8s", - yyvs[start+i].pval ? yyvs[start+i].pval : "(NULL)"); + ps->val.pval ? ps->val.pval : "(NULL)"); break; case toketype_i_tkval: #endif case toketype_ival: - PerlIO_printf(Perl_debug_log, " %8"IVdf, (IV)yyvs[start+i].ival); + PerlIO_printf(Perl_debug_log, " %8"IVdf, (IV)ps->val.ival); break; default: - PerlIO_printf(Perl_debug_log, " %8"UVxf, (UV)yyvs[start+i].ival); + PerlIO_printf(Perl_debug_log, " %8"UVxf, (UV)ps->val.ival); } } PerlIO_printf(Perl_debug_log, "\n\n"); } -# define YY_STACK_PRINT(yyss, yyssp, yyvs, yyns) \ -do { \ - if (yydebug && DEBUG_v_TEST) \ - yy_stack_print (aTHX_ (yyss), (yyssp), (yyvs), (yyns)); \ +# define YY_STACK_PRINT(parser) \ +do { \ + if (yydebug && DEBUG_v_TEST) \ + yy_stack_print (aTHX_ parser); \ } while (0) @@ -188,7 +201,7 @@ do { \ #else /* !DEBUGGING */ # define YYDPRINTF(Args) # define YYDSYMPRINTF(Title, Token, Value) -# define YY_STACK_PRINT(yyss, yyssp, yyvs, yyns) +# define YY_STACK_PRINT(parser) # define YY_REDUCE_PRINT(Rule) #endif /* !DEBUGGING */ @@ -196,28 +209,19 @@ do { \ /* YYINITDEPTH -- initial size of the parser's stacks. */ #define YYINITDEPTH 200 -/* a snapshot of the current stack position variables for use by - * S_clear_yystack */ - -typedef struct { - short *yyss; - short *yyssp; - YYSTYPE *yyvsp; - AV **yypsp; - int yylen; -} yystack_positions; - /* called during cleanup (via SAVEDESTRUCTOR_X) to free any items on the * parse stack, thus avoiding leaks if we die */ static void S_clear_yystack(pTHX_ const void *p) { - yystack_positions *y = (yystack_positions*) p; + yy_parser *parser = (yy_parser*) SvPVX((SV*)p); + yy_stack_frame *ps = parser->ps; int i; - if (!y->yyss) + if (ps == &parser->stack[0]) return; + YYDPRINTF ((Perl_debug_log, "clearing the parse stack\n")); /* Freeing ops on the stack, and the op_latefree/op_latefreed flags: @@ -264,32 +268,30 @@ S_clear_yystack(pTHX_ const void *p) /* free any reducing ops (1st pass) */ - for (i=0; i< y->yylen; i++) { - if (yy_type_tab[yystos[y->yyssp[-i]]] == toketype_opval - && y->yyvsp[-i].opval) { - if (y->yypsp[-i] != PL_comppad) { - PAD_RESTORE_LOCAL(y->yypsp[-i]); + for (i=0; i< parser->reduce_len; i++) { + if (yy_type_tab[yystos[ps[-i].state]] == toketype_opval + && ps[-i].val.opval) { + if (ps[-i].comppad != PL_comppad) { + PAD_RESTORE_LOCAL(ps[-i].comppad); } - op_free(y->yyvsp[-i].opval); + op_free(ps[-i].val.opval); } } /* now free whole the stack, including the just-reduced ops */ - while (y->yyssp > y->yyss) { - if (yy_type_tab[yystos[*y->yyssp]] == toketype_opval - && y->yyvsp->opval) + while (ps > &parser->stack[0]) { + if (yy_type_tab[yystos[ps->state]] == toketype_opval + && ps->val.opval) { - if (*y->yypsp != PL_comppad) { - PAD_RESTORE_LOCAL(*y->yypsp); + if (ps->comppad != PL_comppad) { + PAD_RESTORE_LOCAL(ps->comppad); } YYDPRINTF ((Perl_debug_log, "(freeing op)\n")); - y->yyvsp->opval->op_latefree = 0; - op_free(y->yyvsp->opval); + ps->val.opval->op_latefree = 0; + op_free(ps->val.opval); } - y->yyvsp--; - y->yyssp--; - y->yypsp--; + ps--; } } @@ -319,50 +321,17 @@ Perl_yyparse (pTHX) /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; - /* three stacks and their tools: - yyss: related to states, - yyvs: related to semantic values, - yyps: current value of PL_comppad for each state - - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short *yyss; - register short *yyssp; - - /* The semantic value stack. */ - YYSTYPE *yyvs; - register YYSTYPE *yyvsp; + SV *parser_sv; /* SV whose PVX holds the parser object */ + yy_parser *parser; /* the parser object */ + register yy_stack_frame *ps; /* current parser stack frame */ - AV **yyps; - AV **yypsp; - - /* for ease of re-allocation and automatic freeing, have three SVs whose - * SvPVX points to the stacks */ - SV *yyss_sv, *yyvs_sv, *yyps_sv; - SV *ss_save_sv; - yystack_positions *ss_save; - - -#ifdef DEBUGGING - /* maintain also a stack of token/rule names for debugging with -Dpv */ - const char **yyns, **yynsp; - SV *yyns_sv; -# define YYPOPSTACK (yyvsp--, yyssp--, yypsp--, yynsp--) -#else -# define YYPOPSTACK (yyvsp--, yyssp--, yypsp--) -#endif - - - YYSIZE_T yystacksize = YYINITDEPTH; +#define YYPOPSTACK parser->ps = --ps +#define YYPUSHSTACK parser->ps = ++ps /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; - /* When reducing, the number of symbols on the RHS of the reduced rule. */ int yylen; @@ -382,37 +351,20 @@ Perl_yyparse (pTHX) PL_yycharp = &yychar; /* so PL_yyerror() can access it */ PL_yylvalp = &yylval; /* so various functions in toke.c can access it */ - yyss_sv = newSV(YYINITDEPTH * sizeof(short)); - yyvs_sv = newSV(YYINITDEPTH * sizeof(YYSTYPE)); - yyps_sv = newSV(YYINITDEPTH * sizeof(AV*)); - ss_save_sv = newSV(sizeof(yystack_positions)); - SAVEFREESV(yyss_sv); - SAVEFREESV(yyvs_sv); - SAVEFREESV(yyps_sv); - SAVEFREESV(ss_save_sv); - yyss = (short *) SvPVX(yyss_sv); - yyvs = (YYSTYPE *) SvPVX(yyvs_sv); - yyps = (AV **) SvPVX(yyps_sv); - ss_save = (yystack_positions *) SvPVX(ss_save_sv); - - ss_save->yyss = NULL; /* disarm stack cleanup */ + parser_sv = newSV(sizeof(yy_parser) + + (YYINITDEPTH-1) * sizeof(yy_stack_frame)); + SAVEFREESV(parser_sv); + parser = (yy_parser*) SvPVX(parser_sv); + ps = (yy_stack_frame*) &parser->stack[0]; + parser->ps = ps; + + parser->stack_size = YYINITDEPTH; + /* cleanup the parse stack on premature exit */ - SAVEDESTRUCTOR_X(S_clear_yystack, (void*) ss_save); + SAVEDESTRUCTOR_X(S_clear_yystack, (void*) parser_sv); - /* note that elements zero of yyvs and yyns are not used */ - yyssp = yyss; - yyvsp = yyvs; - yypsp = yyps; -#ifdef DEBUGGING - yyns_sv = newSV(YYINITDEPTH * sizeof(char *)); - SAVEFREESV(yyns_sv); - /* XXX This seems strange to cast char * to char ** */ - yyns = (const char **) SvPVX(yyns_sv); - yynsp = yyns; -#endif - *yyssp = 0; - yyvsp->ival = 0; + ps->state = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ @@ -422,70 +374,40 @@ Perl_yyparse (pTHX) `------------------------------------------------------------*/ yynewstate: - yystate = *yyssp; + yystate = ps->state; YYDPRINTF ((Perl_debug_log, "Entering state %d\n", yystate)); - if (yy_type_tab[yystos[yystate]] == toketype_opval && yyvsp->opval) { - yyvsp->opval->op_latefree = 1; - yyvsp->opval->op_latefreed = 0; + if (yy_type_tab[yystos[yystate]] == toketype_opval && ps->val.opval) { + ps->val.opval->op_latefree = 1; + ps->val.opval->op_latefreed = 0; } - ss_save->yyss = yyss; - ss_save->yyssp = yyssp; - ss_save->yyvsp = yyvsp; - ss_save->yypsp = yypsp; - ss_save->yylen = 0; - - if (yyss + yystacksize - 1 <= yyssp) { - /* Get the current used size of the three stacks, in elements. */ - const YYSIZE_T yysize = yyssp - yyss + 1; - - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - SvGROW(yyss_sv, yystacksize * sizeof(short)); - SvGROW(yyvs_sv, yystacksize * sizeof(YYSTYPE)); - SvGROW(yyps_sv, yystacksize * sizeof(AV*)); - yyss = (short *) SvPVX(yyss_sv); - yyvs = (YYSTYPE *) SvPVX(yyvs_sv); - yyps = (AV **) SvPVX(yyps_sv); -#ifdef DEBUGGING - SvGROW(yyns_sv, yystacksize * sizeof(char *)); - /* XXX This seems strange to cast char * to char ** */ - yyns = (const char **) SvPVX(yyns_sv); - if (! yyns) - goto yyoverflowlab; - yynsp = yyns + yysize - 1; -#endif - if (!yyss || ! yyvs || ! yyps) - goto yyoverflowlab; + parser->reduce_len = 0; - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yypsp = yyps + yysize - 1; + { + size_t size = ps - &parser->stack[0] + 1; + /* grow the stack? We always leave 1 spare slot, + * in case of a '' -> 'foo' reduction */ - YYDPRINTF ((Perl_debug_log, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + if (size >= parser->stack_size - 1) { + /* this will croak on insufficient memory */ + parser->stack_size *= 2; + parser = (yy_parser*) SvGROW(parser_sv, sizeof(yy_parser) + + (parser->stack_size-1) * sizeof(yy_stack_frame)); - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + /* readdress any pointers into realloced parser object */ + ps = parser->ps = &parser->stack[0] + size -1; - ss_save->yyss = yyss; - ss_save->yyssp = yyssp; - ss_save->yyvsp = yyvsp; - ss_save->yypsp = yypsp; - ss_save->yylen = 0; + YYDPRINTF((Perl_debug_log, + "parser stack size increased to %lu frames\n", + (unsigned long int)parser->stack_size)); + } } /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ @@ -543,14 +465,14 @@ Perl_yyparse (pTHX) if (yychar != YYEOF) yychar = YYEMPTY; - *++yyssp = yyn; - *++yyvsp = yylval; - *++yypsp = PL_comppad; + YYPUSHSTACK; + ps->state = yyn; + ps->val = yylval; + ps->comppad = PL_comppad; #ifdef DEBUGGING - *++yynsp = (const char *)(yytname[yytoken]); + ps->name = (const char *)(yytname[yytoken]); #endif - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) @@ -584,19 +506,13 @@ Perl_yyparse (pTHX) users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; + yyval = ps[1-yylen].val; - YY_STACK_PRINT (yyss, yyssp, yyvs, yyns); + YY_STACK_PRINT(parser); YY_REDUCE_PRINT (yyn); - /* running external code may trigger a die (eg 'use nosuchmodule'): - * record the current stack state so that an unwind will - * free all the pesky OPs lounging around on the parse stack */ - ss_save->yyss = yyss; - ss_save->yyssp = yyssp; - ss_save->yyvsp = yyvsp; - ss_save->yypsp = yypsp; - ss_save->yylen = yylen; + /* if we croak during a reduce, this many tokens need special clean up */ + parser->reduce_len = yylen; switch (yyn) { @@ -633,41 +549,36 @@ Perl_yyparse (pTHX) { int i; for (i=0; i< yylen; i++) { - if (yy_type_tab[yystos[yyssp[-i]]] == toketype_opval - && yyvsp[-i].opval) + if (yy_type_tab[yystos[ps[-i].state]] == toketype_opval + && ps[-i].val.opval) { - yyvsp[-i].opval->op_latefree = 0; - if (yyvsp[-i].opval->op_latefreed) - op_free(yyvsp[-i].opval); + ps[-i].val.opval->op_latefree = 0; + if (ps[-i].val.opval->op_latefreed) + op_free(ps[-i].val.opval); } } } - yyvsp -= yylen; - yyssp -= yylen; - yypsp -= yylen; -#ifdef DEBUGGING - yynsp -= yylen; -#endif + parser->ps = ps -= (yylen-1); /* Now shift the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ - *++yyvsp = yyval; - *++yypsp = PL_comppad; + ps->val = yyval; + ps->comppad = PL_comppad; #ifdef DEBUGGING - *++yynsp = (const char *)(yytname [yyr1[yyn]]); + ps->name = (const char *)(yytname [yyr1[yyn]]); #endif yyn = yyr1[yyn]; - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTOKENS] + ps[-1].state; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == ps[-1].state) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; - *++yyssp = yystate; + ps->state = yystate; goto yynewstate; @@ -692,17 +603,17 @@ Perl_yyparse (pTHX) /* Pop the error token. */ YYPOPSTACK; /* Pop the rest of the stack. */ - while (yyss < yyssp) { - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp); - if (yy_type_tab[yystos[*yyssp]] == toketype_opval - && yyvsp->opval) + while (ps > &parser->stack[0]) { + YYDSYMPRINTF ("Error: popping", yystos[ps->state], &ps->val); + if (yy_type_tab[yystos[ps->state]] == toketype_opval + && ps->val.opval) { YYDPRINTF ((Perl_debug_log, "(freeing op)\n")); - if (*yypsp != PL_comppad) { - PAD_RESTORE_LOCAL(*yypsp); + if (ps->comppad != PL_comppad) { + PAD_RESTORE_LOCAL(ps->comppad); } - yyvsp->opval->op_latefree = 0; - op_free(yyvsp->opval); + ps->val.opval->op_latefree = 0; + op_free(ps->val.opval); } YYPOPSTACK; } @@ -737,26 +648,22 @@ Perl_yyparse (pTHX) } /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) + if (ps == &parser->stack[0]) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp); - if (yy_type_tab[yystos[*yyssp]] == toketype_opval && yyvsp->opval) { + YYDSYMPRINTF ("Error: popping", yystos[ps->state], &ps->val); + if (yy_type_tab[yystos[ps->state]] == toketype_opval && ps->val.opval) { YYDPRINTF ((Perl_debug_log, "(freeing op)\n")); - if (*yypsp != PL_comppad) { - PAD_RESTORE_LOCAL(*yypsp); + if (ps->comppad != PL_comppad) { + PAD_RESTORE_LOCAL(ps->comppad); } - yyvsp->opval->op_latefree = 0; - op_free(yyvsp->opval); + ps->val.opval->op_latefree = 0; + op_free(ps->val.opval); } - yyvsp--; - yypsp--; -#ifdef DEBUGGING - yynsp--; -#endif - yystate = *--yyssp; + YYPOPSTACK; + yystate = ps->state; - YY_STACK_PRINT (yyss, yyssp, yyvs, yyns); + YY_STACK_PRINT(parser); } if (yyn == YYFINAL) @@ -764,11 +671,12 @@ Perl_yyparse (pTHX) YYDPRINTF ((Perl_debug_log, "Shifting error token, ")); - *++yyssp = yyn; - *++yyvsp = yylval; - *++yypsp = PL_comppad; + YYPUSHSTACK; + ps->state = yyn; + ps->val = yylval; + ps->comppad = PL_comppad; #ifdef DEBUGGING - *++yynsp =""; + ps->name =""; #endif goto yynewstate; @@ -779,6 +687,7 @@ Perl_yyparse (pTHX) `-------------------------------------*/ yyacceptlab: yyresult = 0; + parser->ps = &parser->stack[0]; /* disable cleanup */ goto yyreturn; /*-----------------------------------. @@ -788,19 +697,8 @@ Perl_yyparse (pTHX) yyresult = 1; goto yyreturn; - /*----------------------------------------------. - | yyoverflowlab -- parser overflow comes here. | - `----------------------------------------------*/ - yyoverflowlab: - yyerror ("parser stack overflow"); - yyresult = 2; - /* Fall through. */ - yyreturn: - - ss_save->yyss = NULL; /* disarm parse stack cleanup */ LEAVE; /* force stack free before we return */ - return yyresult; } diff --git a/regen_perly.pl b/regen_perly.pl index 378c5a3..fb01dbd 100644 --- a/regen_perly.pl +++ b/regen_perly.pl @@ -175,6 +175,11 @@ sub extract { # C<#line 188 "perlytmp.c"> gets picked up by make depend, so remove them. $actlines =~ s/^#line \d+ "\Q$tmpc_file\E".*$//gm; + # convert yyvsp[nnn] into ps[nnn].val + + $actlines =~ s/yyvsp\[(.*?)\]/ps[$1].val/g + or die "Can't convert value stack name\n"; + return $actlines. "\n", $tablines. "\n"; }