From: Dave Mitchell Date: Mon, 4 Dec 2006 15:38:05 +0000 (+0000) Subject: merge perly.y and madlu.y X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f05e27e5b9aa3dce0aa1ab50210632677c656114;p=p5sagit%2Fp5-mst-13.2.git merge perly.y and madlu.y p4raw-id: //depot/perl@29455 --- diff --git a/MANIFEST b/MANIFEST index 6e5cba9..8d8c979 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2754,11 +2754,7 @@ lib/warnings.pm For "use warnings" lib/warnings/register.pm For "use warnings::register" lib/warnings.t See if warning controls work locale.c locale-specific utility functions -madly.act parser actions; derived from madly.y -madly.c parser code (NOT derived from madly.y) -madly.h header file for madly.c; derived from madly.y -madly.tab parser state tables; derived from madly.y -madly.y Yacc grammar for MAD +madly.c parser code for MAD build mad/nomad Converts raw XML dump to something vaguely sane mad/p55 Perl 5 to Perl 5 translator - driver for nomad mad/P5AST.pm Used by nomad diff --git a/Makefile.SH b/Makefile.SH index 11799f5..d5684e5 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -206,7 +206,6 @@ CLDFLAGS = $ldflags mallocsrc = $mallocsrc mallocobj = $mallocobj -madlyh = $madlyh madlysrc = $madlysrc madlyobj = $madlyobj LNS = $lns @@ -362,7 +361,7 @@ h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h opcode.h h3 = pad.h patchlevel.h perl.h perlapi.h perly.h pp.h proto.h regcomp.h h4 = regexp.h scope.h sv.h unixish.h util.h iperlsys.h thread.h -h5 = utf8.h warnings.h $(madlyh) +h5 = utf8.h warnings.h h = $(h1) $(h2) $(h3) $(h4) $(h5) c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c perl.c @@ -927,10 +926,9 @@ install.html: all installhtml run_byacc: @echo "run_byacc is obsolete; try 'make regen_perly' instead" -# this outputs perly.h, perly.act, perly.tab, madly.h, madly.act and madly.tab +# this outputs perly.h, perly.act and perly.tab regen_perly: perl regen_perly.pl - perl regen_perly.pl madly.y # We don't want to regenerate perly.c and perly.h, but they might # appear out-of-date after a patch is applied or a new distribution is @@ -941,13 +939,6 @@ perly.c: perly.y perly.h: perly.y -@sh -c true -# Similary for madly. -madly.c: madly.y - -@sh -c true - -madly.h: madly.y - -@sh -c true - # No compat3.sym here since and including the 5.004_50. # No interp.sym since 5.005_03. SYM = global.sym globvar.sym perlio.sym pp.sym diff --git a/madly.act b/madly.act deleted file mode 100644 index 319ce77..0000000 --- a/madly.act +++ /dev/null @@ -1,1514 +0,0 @@ -case 2: -#line 102 "madly.y" - { (yyval.ival) = (yyvsp[-1].ival); newPROG(block_end((yyvsp[-1].ival),(yyvsp[0].opval))); ;} - break; - - case 3: -#line 107 "madly.y" - { if (PL_copline > (line_t)((yyvsp[-3].tkval))->tk_lval.ival) - PL_copline = (line_t)((yyvsp[-3].tkval))->tk_lval.ival; - (yyval.opval) = block_end((yyvsp[-2].ival), (yyvsp[-1].opval)); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'{'); - token_getmad((yyvsp[0].tkval),(yyval.opval),'}'); - ;} - break; - - case 4: -#line 116 "madly.y" - { (yyval.ival) = block_start(TRUE); ;} - break; - - case 5: -#line 120 "madly.y" - { (yyval.ival) = (I32) allocmy("$_"); ;} - break; - - case 6: -#line 124 "madly.y" - { - PL_expect = XSTATE; (yyval.ival) = block_start(TRUE); - ;} - break; - - case 7: -#line 131 "madly.y" - { if (PL_copline > (line_t)((yyvsp[-3].tkval))->tk_lval.ival) - PL_copline = (line_t)((yyvsp[-3].tkval))->tk_lval.ival; - (yyval.opval) = block_end((yyvsp[-2].ival), (yyvsp[-1].opval)); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'{'); - token_getmad((yyvsp[0].tkval),(yyval.opval),'}'); - ;} - break; - - case 8: -#line 140 "madly.y" - { (yyval.ival) = block_start(FALSE); ;} - break; - - case 9: -#line 144 "madly.y" - { (yyval.ival) = PL_savestack_ix; ;} - break; - - case 10: -#line 148 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 11: -#line 151 "madly.y" - { (yyval.opval) = append_list(OP_LINESEQ, - (LISTOP*)(yyvsp[-1].opval), (LISTOP*)(yyvsp[0].opval)); ;} - break; - - case 12: -#line 154 "madly.y" - { LEAVE_SCOPE((yyvsp[-1].ival)); - (yyval.opval) = append_list(OP_LINESEQ, - (LISTOP*)(yyvsp[-2].opval), (LISTOP*)(yyvsp[0].opval)); - PL_pad_reset_pending = TRUE; - if ((yyvsp[-2].opval) && (yyvsp[0].opval)) PL_hints |= HINT_BLOCK_SCOPE; ;} - break; - - case 13: -#line 163 "madly.y" - { (yyval.opval) = newSTATEOP(0, ((yyvsp[-1].tkval))->tk_lval.pval, (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),((LISTOP*)(yyval.opval))->op_first,'L'); ;} - break; - - case 15: -#line 167 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 16: -#line 169 "madly.y" - { (yyval.opval) = newSTATEOP(0, ((yyvsp[-1].tkval))->tk_lval.pval, (yyvsp[0].opval)); ;} - break; - - case 17: -#line 171 "madly.y" - { - if (((yyvsp[-1].tkval))->tk_lval.pval) { - (yyval.opval) = newSTATEOP(0, ((yyvsp[-1].tkval))->tk_lval.pval, newOP(OP_NULL, 0)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'L'); - token_getmad((yyvsp[0].tkval),((LISTOP*)(yyval.opval))->op_first,';'); - } - else { - (yyval.opval) = newOP(OP_NULL, 0); - PL_copline = NOLINE; - token_free((yyvsp[-1].tkval)); - token_getmad((yyvsp[0].tkval),(yyval.opval),';'); - } - PL_expect = XSTATE; - ;} - break; - - case 18: -#line 186 "madly.y" - { OP* op; - (yyval.opval) = newSTATEOP(0, ((yyvsp[-2].tkval))->tk_lval.pval, (yyvsp[-1].opval)); - PL_expect = XSTATE; - /* sideff might already have a nexstate */ - op = ((LISTOP*)(yyval.opval))->op_first; - if (op) { - while (op->op_sibling && - op->op_sibling->op_type == OP_NEXTSTATE) - op = op->op_sibling; - token_getmad((yyvsp[-2].tkval),op,'L'); - token_getmad((yyvsp[0].tkval),op,';'); - } - ;} - break; - - case 19: -#line 203 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 20: -#line 205 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 21: -#line 207 "madly.y" - { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[0].opval), (yyvsp[-2].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'i'); - ;} - break; - - case 22: -#line 211 "madly.y" - { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[0].opval), (yyvsp[-2].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'i'); - ;} - break; - - case 23: -#line 215 "madly.y" - { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((yyvsp[0].opval)), (yyvsp[-2].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'w'); - ;} - break; - - case 24: -#line 219 "madly.y" - { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (yyvsp[0].opval), (yyvsp[-2].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'w'); - ;} - break; - - case 25: -#line 223 "madly.y" - { (yyval.opval) = newFOROP(0, Nullch, (line_t)((yyvsp[-1].tkval))->tk_lval.ival, - Nullop, (yyvsp[0].opval), (yyvsp[-2].opval), Nullop); - token_getmad((yyvsp[-1].tkval),((LISTOP*)(yyval.opval))->op_first->op_sibling,'w'); - ;} - break; - - case 26: -#line 231 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 27: -#line 233 "madly.y" - { ((yyvsp[0].opval))->op_flags |= OPf_PARENS; (yyval.opval) = scope((yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 28: -#line 237 "madly.y" - { PL_copline = (line_t)((yyvsp[-5].tkval))->tk_lval.ival; - (yyval.opval) = newCONDOP(0, (yyvsp[-3].opval), scope((yyvsp[-1].opval)), (yyvsp[0].opval)); - PL_hints |= HINT_BLOCK_SCOPE; - token_getmad((yyvsp[-5].tkval),(yyval.opval),'I'); - token_getmad((yyvsp[-4].tkval),(yyval.opval),'('); - token_getmad((yyvsp[-2].tkval),(yyval.opval),')'); - ;} - break; - - case 29: -#line 248 "madly.y" - { PL_copline = (line_t)((yyvsp[-6].tkval))->tk_lval.ival; - (yyval.opval) = block_end((yyvsp[-4].ival), - newCONDOP(0, (yyvsp[-3].opval), scope((yyvsp[-1].opval)), (yyvsp[0].opval))); - token_getmad((yyvsp[-6].tkval),(yyval.opval),'I'); - token_getmad((yyvsp[-5].tkval),(yyval.opval),'('); - token_getmad((yyvsp[-2].tkval),(yyval.opval),')'); - ;} - break; - - case 30: -#line 256 "madly.y" - { PL_copline = (line_t)((yyvsp[-6].tkval))->tk_lval.ival; - (yyval.opval) = block_end((yyvsp[-4].ival), - newCONDOP(0, (yyvsp[-3].opval), scope((yyvsp[-1].opval)), (yyvsp[0].opval))); - token_getmad((yyvsp[-6].tkval),(yyval.opval),'I'); - token_getmad((yyvsp[-5].tkval),(yyval.opval),'('); - token_getmad((yyvsp[-2].tkval),(yyval.opval),')'); - ;} - break; - - case 31: -#line 267 "madly.y" - { (yyval.opval) = block_end((yyvsp[-3].ival), - newWHENOP((yyvsp[-2].opval), scope((yyvsp[0].opval)))); ;} - break; - - case 32: -#line 270 "madly.y" - { (yyval.opval) = newWHENOP(0, scope((yyvsp[0].opval))); ;} - break; - - case 33: -#line 275 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 34: -#line 277 "madly.y" - { (yyval.opval) = scope((yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 35: -#line 284 "madly.y" - { OP *innerop; - PL_copline = (line_t)(yyvsp[-7].tkval); - (yyval.opval) = block_end((yyvsp[-5].ival), - newSTATEOP(0, ((yyvsp[-8].tkval))->tk_lval.pval, - innerop = newWHILEOP(0, 1, (LOOP*)Nullop, - ((yyvsp[-7].tkval))->tk_lval.ival, (yyvsp[-4].opval), (yyvsp[-1].opval), (yyvsp[0].opval), (yyvsp[-2].ival)))); - token_getmad((yyvsp[-8].tkval),innerop,'L'); - token_getmad((yyvsp[-7].tkval),innerop,'W'); - token_getmad((yyvsp[-6].tkval),innerop,'('); - token_getmad((yyvsp[-3].tkval),innerop,')'); - ;} - break; - - case 36: -#line 297 "madly.y" - { OP *innerop; - PL_copline = (line_t)(yyvsp[-7].tkval); - (yyval.opval) = block_end((yyvsp[-5].ival), - newSTATEOP(0, ((yyvsp[-8].tkval))->tk_lval.pval, - newWHILEOP(0, 1, (LOOP*)Nullop, - ((yyvsp[-7].tkval))->tk_lval.ival, (yyvsp[-4].opval), (yyvsp[-1].opval), (yyvsp[0].opval), (yyvsp[-2].ival)))); - token_getmad((yyvsp[-8].tkval),innerop,'L'); - token_getmad((yyvsp[-7].tkval),innerop,'W'); - token_getmad((yyvsp[-6].tkval),innerop,'('); - token_getmad((yyvsp[-3].tkval),innerop,')'); - ;} - break; - - case 37: -#line 309 "madly.y" - { OP *innerop; - (yyval.opval) = block_end((yyvsp[-6].ival), - innerop = newFOROP(0, ((yyvsp[-9].tkval))->tk_lval.pval, (line_t)((yyvsp[-8].tkval))->tk_lval.ival, (yyvsp[-5].opval), (yyvsp[-3].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); - token_getmad((yyvsp[-9].tkval),((LISTOP*)innerop)->op_first,'L'); - token_getmad((yyvsp[-8].tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); - token_getmad((yyvsp[-7].tkval),((LISTOP*)innerop)->op_first->op_sibling,'d'); - token_getmad((yyvsp[-4].tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); - token_getmad((yyvsp[-2].tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); - ;} - break; - - case 38: -#line 319 "madly.y" - { OP *innerop; - (yyval.opval) = block_end((yyvsp[-4].ival), - innerop = newFOROP(0, ((yyvsp[-8].tkval))->tk_lval.pval, (line_t)((yyvsp[-7].tkval))->tk_lval.ival, mod((yyvsp[-6].opval), OP_ENTERLOOP), - (yyvsp[-3].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); - token_getmad((yyvsp[-8].tkval),((LISTOP*)innerop)->op_first,'L'); - token_getmad((yyvsp[-7].tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); - token_getmad((yyvsp[-5].tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); - token_getmad((yyvsp[-2].tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); - ;} - break; - - case 39: -#line 329 "madly.y" - { OP *innerop; - (yyval.opval) = block_end((yyvsp[-4].ival), - innerop = newFOROP(0, ((yyvsp[-7].tkval))->tk_lval.pval, (line_t)((yyvsp[-6].tkval))->tk_lval.ival, Nullop, (yyvsp[-3].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); - token_getmad((yyvsp[-7].tkval),((LISTOP*)innerop)->op_first,'L'); - token_getmad((yyvsp[-6].tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); - token_getmad((yyvsp[-5].tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); - token_getmad((yyvsp[-2].tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); - ;} - break; - - case 40: -#line 340 "madly.y" - { OP *forop; - PL_copline = (line_t)((yyvsp[-10].tkval))->tk_lval.ival; - forop = newSTATEOP(0, ((yyvsp[-11].tkval))->tk_lval.pval, - newWHILEOP(0, 1, (LOOP*)Nullop, - ((yyvsp[-10].tkval))->tk_lval.ival, scalar((yyvsp[-5].opval)), - (yyvsp[0].opval), (yyvsp[-2].opval), (yyvsp[-3].ival))); - if (!(yyvsp[-7].opval)) - (yyvsp[-7].opval) = newOP(OP_NULL, 0); - forop = newUNOP(OP_NULL, 0, append_elem(OP_LINESEQ, - newSTATEOP(0, - (((yyvsp[-11].tkval))->tk_lval.pval - ?savepv(((yyvsp[-11].tkval))->tk_lval.pval):Nullch), - (yyvsp[-7].opval)), - forop)); - - token_getmad((yyvsp[-10].tkval),forop,'3'); - token_getmad((yyvsp[-9].tkval),forop,'('); - token_getmad((yyvsp[-6].tkval),forop,'1'); - token_getmad((yyvsp[-4].tkval),forop,'2'); - token_getmad((yyvsp[-1].tkval),forop,')'); - token_getmad((yyvsp[-11].tkval),forop,'L'); - (yyval.opval) = block_end((yyvsp[-8].ival), forop); ;} - break; - - case 41: -#line 363 "madly.y" - { (yyval.opval) = newSTATEOP(0, ((yyvsp[-2].tkval))->tk_lval.pval, - newWHILEOP(0, 1, (LOOP*)Nullop, - NOLINE, Nullop, (yyvsp[-1].opval), (yyvsp[0].opval), 0)); - token_getmad((yyvsp[-2].tkval),((LISTOP*)(yyval.opval))->op_first,'L'); ;} - break; - - case 42: -#line 371 "madly.y" - { PL_copline = (line_t) (yyvsp[-6].tkval); - (yyval.opval) = block_end((yyvsp[-4].ival), - newSTATEOP(0, ((yyvsp[-7].tkval))->tk_lval.pval, - newGIVENOP((yyvsp[-2].opval), scope((yyvsp[0].opval)), - (PADOFFSET) (yyvsp[-3].ival)) )); ;} - break; - - case 43: -#line 380 "madly.y" - { (yyval.ival) = (PL_min_intro_pending && - PL_max_intro_pending >= PL_min_intro_pending); - intro_my(); ;} - break; - - case 44: -#line 386 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 46: -#line 392 "madly.y" - { YYSTYPE tmplval; - (void)scan_num("1", &tmplval); - (yyval.opval) = tmplval.opval; ;} - break; - - case 48: -#line 400 "madly.y" - { (yyval.opval) = invert(scalar((yyvsp[0].opval))); ;} - break; - - case 49: -#line 405 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); intro_my(); ;} - break; - - case 50: -#line 409 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); intro_my(); ;} - break; - - case 51: -#line 413 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); intro_my(); ;} - break; - - case 52: -#line 418 "madly.y" - { YYSTYPE tmplval; - tmplval.pval = Nullch; - (yyval.tkval) = newTOKEN(OP_NULL, tmplval, 0); ;} - break; - - case 54: -#line 426 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 55: -#line 428 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 56: -#line 430 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 57: -#line 432 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 58: -#line 434 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 59: -#line 436 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 60: -#line 440 "madly.y" - { (yyval.opval) = newOP(OP_NULL,0); - token_getmad((yyvsp[0].tkval),(yyval.opval),'p'); - ;} - break; - - case 61: -#line 446 "madly.y" - { SvREFCNT_inc(PL_compcv); - (yyval.opval) = newFORM((yyvsp[-2].ival), (yyvsp[-1].opval), (yyvsp[0].opval)); - prepend_madprops((yyvsp[-3].tkval)->tk_mad, (yyval.opval), 'F'); - (yyvsp[-3].tkval)->tk_mad = 0; - token_free((yyvsp[-3].tkval)); - ;} - break; - - case 62: -#line 454 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 63: -#line 455 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 64: -#line 460 "madly.y" - { SvREFCNT_inc(PL_compcv); - (yyval.opval) = newMYSUB((yyvsp[-4].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); - token_getmad((yyvsp[-5].tkval),(yyval.opval),'d'); - ;} - break; - - case 65: -#line 468 "madly.y" - { SvREFCNT_inc(PL_compcv); - OP* o = newSVOP(OP_ANONCODE, 0, - (SV*)newATTRSUB((yyvsp[-4].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); - (yyval.opval) = newOP(OP_NULL,0); - op_getmad(o,(yyval.opval),'&'); - op_getmad((yyvsp[-3].opval),(yyval.opval),'n'); - op_getmad((yyvsp[-2].opval),(yyval.opval),'s'); - op_getmad((yyvsp[-1].opval),(yyval.opval),'a'); - token_getmad((yyvsp[-5].tkval),(yyval.opval),'d'); - append_madprops((yyvsp[0].opval)->op_madprop, (yyval.opval), 0); - (yyvsp[0].opval)->op_madprop = 0; - ;} - break; - - case 66: -#line 483 "madly.y" - { (yyval.ival) = start_subparse(FALSE, 0); - SAVEFREESV(PL_compcv); ;} - break; - - case 67: -#line 489 "madly.y" - { (yyval.ival) = start_subparse(FALSE, CVf_ANON); - SAVEFREESV(PL_compcv); ;} - break; - - case 68: -#line 494 "madly.y" - { (yyval.ival) = start_subparse(TRUE, 0); - SAVEFREESV(PL_compcv); ;} - break; - - case 69: -#line 499 "madly.y" - { const char *const name = SvPV_nolen_const(((SVOP*)(yyvsp[0].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[0].opval); ;} - break; - - case 70: -#line 509 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 72: -#line 515 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 73: -#line 517 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); - token_getmad((yyvsp[-1].tkval),(yyval.opval),':'); - ;} - break; - - case 74: -#line 521 "madly.y" - { (yyval.opval) = newOP(OP_NULL, 0); - token_getmad((yyvsp[0].tkval),(yyval.opval),':'); - ;} - break; - - case 75: -#line 528 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); - token_getmad((yyvsp[-1].tkval),(yyval.opval),':'); - ;} - break; - - case 76: -#line 532 "madly.y" - { (yyval.opval) = newOP(OP_NULL, 0); - token_getmad((yyvsp[0].tkval),(yyval.opval),':'); - ;} - break; - - case 77: -#line 538 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 78: -#line 539 "madly.y" - { (yyval.opval) = newOP(OP_NULL,0); PL_expect = XSTATE; - token_getmad((yyvsp[0].tkval),(yyval.opval),';'); - ;} - break; - - case 79: -#line 545 "madly.y" - { (yyval.opval) = package((yyvsp[-1].opval)); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[0].tkval),(yyval.opval),';'); - ;} - break; - - case 80: -#line 552 "madly.y" - { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ ;} - break; - - case 81: -#line 554 "madly.y" - { SvREFCNT_inc(PL_compcv); - (yyval.opval) = utilize(((yyvsp[-6].tkval))->tk_lval.ival, (yyvsp[-5].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval)); - token_getmad((yyvsp[-6].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[0].tkval),(yyval.opval),';'); - if (PL_rsfp_filters && AvFILLp(PL_rsfp_filters) >= 0) - append_madprops(newMADPROP('!', MAD_PV, "", 0), (yyval.opval), 0); - ;} - break; - - case 82: -#line 565 "madly.y" - { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 83: -#line 569 "madly.y" - { (yyval.opval) = newLOGOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 84: -#line 573 "madly.y" - { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 86: -#line 581 "madly.y" - { OP* op = newNULLLIST(); - token_getmad((yyvsp[0].tkval),op,','); - (yyval.opval) = append_elem(OP_LIST, (yyvsp[-1].opval), op); - ;} - break; - - case 87: -#line 586 "madly.y" - { - (yyvsp[0].opval) = newUNOP(OP_NULL, 0, (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyvsp[0].opval),','); - (yyval.opval) = append_elem(OP_LIST, (yyvsp[-2].opval), (yyvsp[0].opval)); - ;} - break; - - case 89: -#line 596 "madly.y" - { (yyval.opval) = convert(((yyvsp[-2].tkval))->tk_lval.ival, OPf_STACKED, - prepend_elem(OP_LIST, newGVREF(((yyvsp[-2].tkval))->tk_lval.ival,(yyvsp[-1].opval)), (yyvsp[0].opval)) ); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'o'); - ;} - break; - - case 90: -#line 601 "madly.y" - { (yyval.opval) = convert(((yyvsp[-4].tkval))->tk_lval.ival, OPf_STACKED, - prepend_elem(OP_LIST, newGVREF(((yyvsp[-4].tkval))->tk_lval.ival,(yyvsp[-2].opval)), (yyvsp[-1].opval)) ); - token_getmad((yyvsp[-4].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 91: -#line 608 "madly.y" - { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, scalar((yyvsp[-5].opval)), (yyvsp[-1].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[-3].opval)))); - token_getmad((yyvsp[-4].tkval),(yyval.opval),'A'); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 92: -#line 617 "madly.y" - { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, scalar((yyvsp[-2].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[0].opval)))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'A'); - ;} - break; - - case 93: -#line 623 "madly.y" - { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, (yyvsp[-1].opval), (yyvsp[0].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[-2].opval)))); - ;} - break; - - case 94: -#line 629 "madly.y" - { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, (yyvsp[-3].opval), (yyvsp[-1].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[-4].opval)))); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 95: -#line 637 "madly.y" - { (yyval.opval) = convert(((yyvsp[-1].tkval))->tk_lval.ival, 0, (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 96: -#line 641 "madly.y" - { (yyval.opval) = convert(((yyvsp[-3].tkval))->tk_lval.ival, 0, (yyvsp[-1].opval)); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 97: -#line 647 "madly.y" - { SvREFCNT_inc(PL_compcv); - (yyvsp[0].opval) = newANONATTRSUB((yyvsp[-1].ival), 0, Nullop, (yyvsp[0].opval)); ;} - break; - - case 98: -#line 650 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, (yyvsp[-2].opval), (yyvsp[0].opval)), (yyvsp[-4].opval))); - ;} - break; - - case 101: -#line 665 "madly.y" - { (yyval.opval) = newBINOP(OP_GELEM, 0, (yyvsp[-4].opval), scalar((yyvsp[-2].opval))); - PL_expect = XOPERATOR; - token_getmad((yyvsp[-3].tkval),(yyval.opval),'{'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),';'); - token_getmad((yyvsp[0].tkval),(yyval.opval),'}'); - ;} - break; - - case 102: -#line 672 "madly.y" - { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((yyvsp[-3].opval)), scalar((yyvsp[-1].opval))); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'['); - token_getmad((yyvsp[0].tkval),(yyval.opval),']'); - ;} - break; - - case 103: -#line 677 "madly.y" - { (yyval.opval) = newBINOP(OP_AELEM, 0, - ref(newAVREF((yyvsp[-4].opval)),OP_RV2AV), - scalar((yyvsp[-1].opval))); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'a'); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'['); - token_getmad((yyvsp[0].tkval),(yyval.opval),']'); - ;} - break; - - case 104: -#line 685 "madly.y" - { (yyval.opval) = newBINOP(OP_AELEM, 0, - ref(newAVREF((yyvsp[-3].opval)),OP_RV2AV), - scalar((yyvsp[-1].opval))); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'['); - token_getmad((yyvsp[0].tkval),(yyval.opval),']'); - ;} - break; - - case 105: -#line 692 "madly.y" - { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((yyvsp[-4].opval)), jmaybe((yyvsp[-2].opval))); - PL_expect = XOPERATOR; - token_getmad((yyvsp[-3].tkval),(yyval.opval),'{'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),';'); - token_getmad((yyvsp[0].tkval),(yyval.opval),'}'); - ;} - break; - - case 106: -#line 699 "madly.y" - { (yyval.opval) = newBINOP(OP_HELEM, 0, - ref(newHVREF((yyvsp[-5].opval)),OP_RV2HV), - jmaybe((yyvsp[-2].opval))); - PL_expect = XOPERATOR; - token_getmad((yyvsp[-4].tkval),(yyval.opval),'a'); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'{'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),';'); - token_getmad((yyvsp[0].tkval),(yyval.opval),'}'); - ;} - break; - - case 107: -#line 709 "madly.y" - { (yyval.opval) = newBINOP(OP_HELEM, 0, - ref(newHVREF((yyvsp[-4].opval)),OP_RV2HV), - jmaybe((yyvsp[-2].opval))); - PL_expect = XOPERATOR; - token_getmad((yyvsp[-3].tkval),(yyval.opval),'{'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),';'); - token_getmad((yyvsp[0].tkval),(yyval.opval),'}'); - ;} - break; - - case 108: -#line 718 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar((yyvsp[-3].opval)))); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'a'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 109: -#line 725 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[-1].opval), - newCVREF(0, scalar((yyvsp[-4].opval))))); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'a'); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 110: -#line 734 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[-1].opval), - newCVREF(0, scalar((yyvsp[-3].opval))))); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 111: -#line 741 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar((yyvsp[-2].opval)))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 112: -#line 747 "madly.y" - { (yyval.opval) = newSLICEOP(0, (yyvsp[-1].opval), (yyvsp[-4].opval)); - token_getmad((yyvsp[-5].tkval),(yyval.opval),'('); - token_getmad((yyvsp[-3].tkval),(yyval.opval),')'); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'['); - token_getmad((yyvsp[0].tkval),(yyval.opval),']'); - ;} - break; - - case 113: -#line 754 "madly.y" - { (yyval.opval) = newSLICEOP(0, (yyvsp[-1].opval), Nullop); - token_getmad((yyvsp[-4].tkval),(yyval.opval),'('); - token_getmad((yyvsp[-3].tkval),(yyval.opval),')'); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'['); - token_getmad((yyvsp[0].tkval),(yyval.opval),']'); - ;} - break; - - case 114: -#line 764 "madly.y" - { (yyval.opval) = newASSIGNOP(OPf_STACKED, (yyvsp[-2].opval), ((yyvsp[-1].tkval))->tk_lval.ival, (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 115: -#line 768 "madly.y" - { (yyval.opval) = newBINOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 116: -#line 772 "madly.y" - { if (((yyvsp[-1].tkval))->tk_lval.ival != OP_REPEAT) - scalar((yyvsp[-2].opval)); - (yyval.opval) = newBINOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, (yyvsp[-2].opval), scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 117: -#line 778 "madly.y" - { (yyval.opval) = newBINOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 118: -#line 782 "madly.y" - { (yyval.opval) = newBINOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 119: -#line 786 "madly.y" - { (yyval.opval) = newBINOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 120: -#line 790 "madly.y" - { (yyval.opval) = newBINOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 121: -#line 794 "madly.y" - { (yyval.opval) = newBINOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 122: -#line 798 "madly.y" - { (yyval.opval) = newBINOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 123: -#line 802 "madly.y" - { UNOP *op; - (yyval.opval) = newRANGE(((yyvsp[-1].tkval))->tk_lval.ival, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); - 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[-1].tkval),(OP*)op,'o'); - ;} - break; - - case 124: -#line 811 "madly.y" - { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 125: -#line 815 "madly.y" - { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 126: -#line 819 "madly.y" - { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 127: -#line 823 "madly.y" - { (yyval.opval) = bind_match(((yyvsp[-1].tkval))->tk_lval.ival, (yyvsp[-2].opval), (yyvsp[0].opval)); - if ((yyval.opval)->op_type == OP_NOT) - token_getmad((yyvsp[-1].tkval),((UNOP*)(yyval.opval))->op_first,'~'); - else - token_getmad((yyvsp[-1].tkval),(yyval.opval),'~'); - ;} - break; - - case 128: -#line 833 "madly.y" - { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 129: -#line 837 "madly.y" - { (yyval.opval) = newUNOP(OP_NULL, 0, (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'+'); - ;} - break; - - case 130: -#line 841 "madly.y" - { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 131: -#line 845 "madly.y" - { (yyval.opval) = newUNOP(OP_COMPLEMENT, 0, scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 132: -#line 849 "madly.y" - { (yyval.opval) = newUNOP(OP_POSTINC, 0, - mod(scalar((yyvsp[-1].opval)), OP_POSTINC)); - token_getmad((yyvsp[0].tkval),(yyval.opval),'o'); - ;} - break; - - case 133: -#line 854 "madly.y" - { (yyval.opval) = newUNOP(OP_POSTDEC, 0, - mod(scalar((yyvsp[-1].opval)), OP_POSTDEC)); - token_getmad((yyvsp[0].tkval),(yyval.opval),'o'); - ;} - break; - - case 134: -#line 859 "madly.y" - { (yyval.opval) = newUNOP(OP_PREINC, 0, - mod(scalar((yyvsp[0].opval)), OP_PREINC)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 135: -#line 864 "madly.y" - { (yyval.opval) = newUNOP(OP_PREDEC, 0, - mod(scalar((yyvsp[0].opval)), OP_PREDEC)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 136: -#line 873 "madly.y" - { (yyval.opval) = newANONLIST((yyvsp[-1].opval)); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'['); - token_getmad((yyvsp[0].tkval),(yyval.opval),']'); - ;} - break; - - case 137: -#line 878 "madly.y" - { (yyval.opval) = newANONLIST(Nullop); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'['); - token_getmad((yyvsp[0].tkval),(yyval.opval),']'); - ;} - break; - - case 138: -#line 883 "madly.y" - { (yyval.opval) = newANONHASH((yyvsp[-2].opval)); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'{'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),';'); - token_getmad((yyvsp[0].tkval),(yyval.opval),'}'); - ;} - break; - - case 139: -#line 889 "madly.y" - { (yyval.opval) = newANONHASH(Nullop); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'{'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),';'); - token_getmad((yyvsp[0].tkval),(yyval.opval),'}'); - ;} - break; - - case 140: -#line 895 "madly.y" - { SvREFCNT_inc(PL_compcv); - (yyval.opval) = newANONATTRSUB((yyvsp[-3].ival), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); - token_getmad((yyvsp[-4].tkval),(yyval.opval),'o'); - op_getmad((yyvsp[-2].opval),(yyval.opval),'s'); - op_getmad((yyvsp[-1].opval),(yyval.opval),'a'); - ;} - break; - - case 141: -#line 906 "madly.y" - { (yyval.opval) = dofile((yyvsp[0].opval), (yyvsp[-1].tkval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 142: -#line 910 "madly.y" - { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, scope((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'D'); - ;} - break; - - case 143: -#line 914 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, - OPf_SPECIAL|OPf_STACKED, - prepend_elem(OP_LIST, - scalar(newCVREF( - (OPpENTERSUB_AMPER<<8), - scalar((yyvsp[-2].opval)) - )),Nullop)); dep(); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 144: -#line 926 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, - OPf_SPECIAL|OPf_STACKED, - append_elem(OP_LIST, - (yyvsp[-1].opval), - scalar(newCVREF( - (OPpENTERSUB_AMPER<<8), - scalar((yyvsp[-3].opval)) - )))); dep(); - token_getmad((yyvsp[-4].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 145: -#line 939 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, - prepend_elem(OP_LIST, - scalar(newCVREF(0,scalar((yyvsp[-2].opval)))), Nullop)); dep(); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 146: -#line 947 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, - prepend_elem(OP_LIST, - (yyvsp[-1].opval), - scalar(newCVREF(0,scalar((yyvsp[-3].opval)))))); dep(); - token_getmad((yyvsp[-4].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 151: -#line 963 "madly.y" - { (yyval.opval) = newCONDOP(0, (yyvsp[-4].opval), (yyvsp[-2].opval), (yyvsp[0].opval)); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'?'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),':'); - ;} - break; - - case 152: -#line 968 "madly.y" - { (yyval.opval) = newUNOP(OP_REFGEN, 0, mod((yyvsp[0].opval),OP_REFGEN)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 153: -#line 972 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 154: -#line 974 "madly.y" - { (yyval.opval) = localize((yyvsp[0].opval),((yyvsp[-1].tkval))->tk_lval.ival); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'d'); - ;} - break; - - case 155: -#line 978 "madly.y" - { (yyval.opval) = sawparens(newUNOP(OP_NULL,0,(yyvsp[-1].opval))); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 156: -#line 983 "madly.y" - { (yyval.opval) = sawparens(newNULLLIST()); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 157: -#line 988 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 158: -#line 990 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 159: -#line 992 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 160: -#line 994 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 161: -#line 996 "madly.y" - { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((yyvsp[0].opval), OP_AV2ARYLEN));;} - break; - - case 162: -#line 998 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 163: -#line 1000 "madly.y" - { (yyval.opval) = prepend_elem(OP_ASLICE, - newOP(OP_PUSHMARK, 0), - newLISTOP(OP_ASLICE, 0, - list((yyvsp[-1].opval)), - ref((yyvsp[-3].opval), OP_ASLICE))); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'['); - token_getmad((yyvsp[0].tkval),(yyval.opval),']'); - ;} - break; - - case 164: -#line 1009 "madly.y" - { (yyval.opval) = prepend_elem(OP_HSLICE, - newOP(OP_PUSHMARK, 0), - newLISTOP(OP_HSLICE, 0, - list((yyvsp[-2].opval)), - ref(oopsHV((yyvsp[-4].opval)), OP_HSLICE))); - PL_expect = XOPERATOR; - token_getmad((yyvsp[-3].tkval),(yyval.opval),'{'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),';'); - token_getmad((yyvsp[0].tkval),(yyval.opval),'}'); - ;} - break; - - case 165: -#line 1020 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 166: -#line 1022 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((yyvsp[0].opval))); ;} - break; - - case 167: -#line 1024 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[-2].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 168: -#line 1029 "madly.y" - { OP* op; - (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[-1].opval), scalar((yyvsp[-3].opval)))); - op = (yyval.opval); - if (op->op_type == OP_CONST) { /* defeat const fold */ - op = (OP*)op->op_madprop->mad_val; - } - token_getmad((yyvsp[-2].tkval),op,'('); - token_getmad((yyvsp[0].tkval),op,')'); - ;} - break; - - case 169: -#line 1040 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[0].opval), scalar((yyvsp[-1].opval)))); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'o'); - ;} - break; - - case 170: -#line 1045 "madly.y" - { (yyval.opval) = newOP(((yyvsp[0].tkval))->tk_lval.ival, OPf_SPECIAL); - PL_hints |= HINT_BLOCK_SCOPE; - token_getmad((yyvsp[0].tkval),(yyval.opval),'o'); - ;} - break; - - case 171: -#line 1050 "madly.y" - { (yyval.opval) = newLOOPEX(((yyvsp[-1].tkval))->tk_lval.ival,(yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 172: -#line 1054 "madly.y" - { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[0].opval))); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 173: -#line 1058 "madly.y" - { (yyval.opval) = newOP(((yyvsp[0].tkval))->tk_lval.ival, 0); - token_getmad((yyvsp[0].tkval),(yyval.opval),'o'); - ;} - break; - - case 174: -#line 1062 "madly.y" - { (yyval.opval) = newUNOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 175: -#line 1066 "madly.y" - { (yyval.opval) = newUNOP(((yyvsp[-1].tkval))->tk_lval.ival, 0, (yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'o'); - ;} - break; - - case 176: -#line 1070 "madly.y" - { (yyval.opval) = newOP(OP_REQUIRE, (yyvsp[0].tkval) ? OPf_SPECIAL : 0); ;} - break; - - case 177: -#line 1072 "madly.y" - { (yyval.opval) = newUNOP(OP_REQUIRE, (yyvsp[-1].tkval) ? OPf_SPECIAL : 0, (yyvsp[0].opval)); ;} - break; - - case 178: -#line 1074 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[0].opval))); ;} - break; - - case 179: -#line 1076 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[0].opval), scalar((yyvsp[-1].opval)))); ;} - break; - - case 180: -#line 1079 "madly.y" - { (yyval.opval) = newOP(((yyvsp[0].tkval))->tk_lval.ival, 0); - token_getmad((yyvsp[0].tkval),(yyval.opval),'o'); - ;} - break; - - case 181: -#line 1083 "madly.y" - { (yyval.opval) = newOP(((yyvsp[-2].tkval))->tk_lval.ival, 0); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 182: -#line 1089 "madly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - scalar((yyvsp[0].opval))); ;} - break; - - case 183: -#line 1092 "madly.y" - { (yyval.opval) = newOP(((yyvsp[-2].tkval))->tk_lval.ival, OPf_SPECIAL); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 184: -#line 1098 "madly.y" - { (yyval.opval) = newUNOP(((yyvsp[-3].tkval))->tk_lval.ival, 0, (yyvsp[-1].opval)); - token_getmad((yyvsp[-3].tkval),(yyval.opval),'o'); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 185: -#line 1104 "madly.y" - { (yyval.opval) = pmruntime((yyvsp[-3].opval), (yyvsp[-1].opval), 1); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 188: -#line 1114 "madly.y" - { (yyval.opval) = my_attrs((yyvsp[-1].opval),(yyvsp[0].opval)); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'d'); - append_madprops((yyvsp[0].opval)->op_madprop, (yyval.opval), 'a'); - (yyvsp[0].opval)->op_madprop = 0; - ;} - break; - - case 189: -#line 1120 "madly.y" - { (yyval.opval) = localize((yyvsp[0].opval),((yyvsp[-1].tkval))->tk_lval.ival); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'d'); - ;} - break; - - case 190: -#line 1127 "madly.y" - { (yyval.opval) = sawparens((yyvsp[-1].opval)); - token_getmad((yyvsp[-2].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 191: -#line 1132 "madly.y" - { (yyval.opval) = sawparens(newNULLLIST()); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'('); - token_getmad((yyvsp[0].tkval),(yyval.opval),')'); - ;} - break; - - case 192: -#line 1137 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 193: -#line 1139 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 194: -#line 1141 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 195: -#line 1146 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 196: -#line 1148 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 197: -#line 1152 "madly.y" - { (yyval.opval) = Nullop; ;} - break; - - case 198: -#line 1154 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - case 199: -#line 1156 "madly.y" - { OP* op = newNULLLIST(); - token_getmad((yyvsp[0].tkval),op,','); - (yyval.opval) = append_elem(OP_LIST, (yyvsp[-1].opval), op); - ;} - break; - - case 200: -#line 1165 "madly.y" - { PL_in_my = 0; (yyval.opval) = my((yyvsp[0].opval)); ;} - break; - - case 201: -#line 1169 "madly.y" - { (yyval.opval) = newCVREF(((yyvsp[-1].tkval))->tk_lval.ival,(yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'&'); - ;} - break; - - case 202: -#line 1175 "madly.y" - { (yyval.opval) = newSVREF((yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'$'); - ;} - break; - - case 203: -#line 1181 "madly.y" - { (yyval.opval) = newAVREF((yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'@'); - ;} - break; - - case 204: -#line 1187 "madly.y" - { (yyval.opval) = newHVREF((yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'%'); - ;} - break; - - case 205: -#line 1193 "madly.y" - { (yyval.opval) = newAVREF((yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'l'); - ;} - break; - - case 206: -#line 1199 "madly.y" - { (yyval.opval) = newGVREF(0,(yyvsp[0].opval)); - token_getmad((yyvsp[-1].tkval),(yyval.opval),'*'); - ;} - break; - - case 207: -#line 1206 "madly.y" - { (yyval.opval) = scalar((yyvsp[0].opval)); ;} - break; - - case 208: -#line 1208 "madly.y" - { (yyval.opval) = scalar((yyvsp[0].opval)); ;} - break; - - case 209: -#line 1210 "madly.y" - { (yyval.opval) = scope((yyvsp[0].opval)); ;} - break; - - case 210: -#line 1213 "madly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - - - default: break; - diff --git a/madly.c b/madly.c index e77fcc2..11e2e37 100644 --- a/madly.c +++ b/madly.c @@ -5,24 +5,10 @@ * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * - * Note that this file was originally generated as an output from - * GNU bison version 1.875, but now the code is statically maintained - * and edited; the bits that are dependent on perly.y/madly.y are now - * #included from the files perly.tab/madly.tab and perly.act/madly.act. - * - * Here is an important copyright statement from the original, generated - * file: - * - * As a special exception, when this file is copied by Bison into a - * Bison output file, you may use that output file without - * restriction. This special exception was added by the Free - * Software Foundation in version 1.24 of Bison. - * * Note that this file is essentially empty, and just #includes perly.c, * to allow compilation of a second parser, Perl_madparse, that is - * identical to Perl_yyparse, but which includes the parser tables from - * madly.{tab,act} rather than perly.{tab,act}. This is controlled by - * the PERL_IN_MADLY_C define. + * identical to Perl_yyparse, but which includes extra code for dumping + * the parse tree. This is controlled by the PERL_IN_MADLY_C define. */ #define PERL_IN_MADLY_C diff --git a/madly.h b/madly.h deleted file mode 100644 index afe5e04..0000000 --- a/madly.h +++ /dev/null @@ -1,194 +0,0 @@ -#ifdef PERL_CORE -/* A Bison parser, made by GNU Bison 2.1. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - WORD = 258, - METHOD = 259, - FUNCMETH = 260, - THING = 261, - PMFUNC = 262, - PRIVATEREF = 263, - FUNC0SUB = 264, - UNIOPSUB = 265, - LSTOPSUB = 266, - LABEL = 267, - FORMAT = 268, - SUB = 269, - ANONSUB = 270, - PACKAGE = 271, - USE = 272, - WHILE = 273, - UNTIL = 274, - IF = 275, - UNLESS = 276, - ELSE = 277, - ELSIF = 278, - CONTINUE = 279, - FOR = 280, - GIVEN = 281, - WHEN = 282, - DEFAULT = 283, - LOOPEX = 284, - DOTDOT = 285, - FUNC0 = 286, - FUNC1 = 287, - FUNC = 288, - UNIOP = 289, - LSTOP = 290, - RELOP = 291, - EQOP = 292, - MULOP = 293, - ADDOP = 294, - DOLSHARP = 295, - DO = 296, - HASHBRACK = 297, - NOAMP = 298, - LOCAL = 299, - MY = 300, - MYSUB = 301, - REQUIRE = 302, - COLONATTR = 303, - PREC_LOW = 304, - DOROP = 305, - OROP = 306, - ANDOP = 307, - NOTOP = 308, - ASSIGNOP = 309, - DORDOR = 310, - OROR = 311, - ANDAND = 312, - BITOROP = 313, - BITANDOP = 314, - SHIFTOP = 315, - MATCHOP = 316, - REFGEN = 317, - UMINUS = 318, - POWOP = 319, - POSTDEC = 320, - POSTINC = 321, - PREDEC = 322, - PREINC = 323, - ARROW = 324, - PEG = 325 - }; -#endif -/* Tokens. */ -#define WORD 258 -#define METHOD 259 -#define FUNCMETH 260 -#define THING 261 -#define PMFUNC 262 -#define PRIVATEREF 263 -#define FUNC0SUB 264 -#define UNIOPSUB 265 -#define LSTOPSUB 266 -#define LABEL 267 -#define FORMAT 268 -#define SUB 269 -#define ANONSUB 270 -#define PACKAGE 271 -#define USE 272 -#define WHILE 273 -#define UNTIL 274 -#define IF 275 -#define UNLESS 276 -#define ELSE 277 -#define ELSIF 278 -#define CONTINUE 279 -#define FOR 280 -#define GIVEN 281 -#define WHEN 282 -#define DEFAULT 283 -#define LOOPEX 284 -#define DOTDOT 285 -#define FUNC0 286 -#define FUNC1 287 -#define FUNC 288 -#define UNIOP 289 -#define LSTOP 290 -#define RELOP 291 -#define EQOP 292 -#define MULOP 293 -#define ADDOP 294 -#define DOLSHARP 295 -#define DO 296 -#define HASHBRACK 297 -#define NOAMP 298 -#define LOCAL 299 -#define MY 300 -#define MYSUB 301 -#define REQUIRE 302 -#define COLONATTR 303 -#define PREC_LOW 304 -#define DOROP 305 -#define OROP 306 -#define ANDOP 307 -#define NOTOP 308 -#define ASSIGNOP 309 -#define DORDOR 310 -#define OROR 311 -#define ANDAND 312 -#define BITOROP 313 -#define BITANDOP 314 -#define SHIFTOP 315 -#define MATCHOP 316 -#define REFGEN 317 -#define UMINUS 318 -#define POWOP 319 -#define POSTDEC 320 -#define POSTINC 321 -#define PREDEC 322 -#define PREINC 323 -#define ARROW 324 -#define PEG 325 - - - - -#endif /* PERL_CORE */ -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -typedef union YYSTYPE { - I32 ival; - char *pval; - TOKEN* tkval; - OP *opval; - GV *gvval; -} YYSTYPE; -/* Line 1447 of yacc.c. */ -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - - - diff --git a/madly.tab b/madly.tab deleted file mode 100644 index 32d11c9..0000000 --- a/madly.tab +++ /dev/null @@ -1,910 +0,0 @@ -#define YYFINAL 3 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2024 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 90 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 66 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 210 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 420 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 325 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 77, 2, 2, 9, 11, 59, 2, - 88, 87, 12, 8, 66, 7, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 69, 60, - 2, 2, 2, 68, 10, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 5, 2, 6, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 3, 2, 4, 78, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 61, 62, 63, 64, 65, 67, - 70, 71, 72, 73, 74, 75, 76, 79, 80, 81, - 82, 83, 84, 85, 86, 89 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned short int yyprhs[] = -{ - 0, 0, 3, 6, 11, 12, 13, 14, 19, 20, - 21, 22, 25, 29, 32, 34, 36, 39, 42, 46, - 48, 50, 54, 58, 62, 66, 70, 71, 74, 81, - 89, 97, 104, 107, 108, 111, 121, 131, 142, 152, - 161, 174, 178, 187, 188, 189, 191, 192, 194, 196, - 198, 200, 202, 203, 205, 207, 209, 211, 213, 215, - 217, 219, 224, 226, 227, 234, 241, 242, 243, 244, - 246, 247, 249, 250, 253, 255, 258, 260, 262, 264, - 268, 269, 277, 281, 285, 289, 291, 294, 298, 300, - 304, 310, 317, 321, 325, 331, 334, 339, 340, 346, - 348, 350, 356, 361, 367, 372, 378, 385, 391, 396, - 402, 407, 411, 418, 424, 428, 432, 436, 440, 444, - 448, 452, 456, 460, 464, 468, 472, 476, 480, 483, - 486, 489, 492, 495, 498, 501, 504, 508, 511, 516, - 520, 526, 529, 532, 537, 543, 548, 554, 556, 558, - 560, 562, 568, 571, 573, 576, 580, 583, 585, 587, - 589, 591, 593, 595, 600, 606, 608, 610, 614, 619, - 623, 625, 628, 631, 633, 636, 639, 641, 644, 646, - 649, 651, 655, 657, 661, 666, 671, 673, 675, 679, - 682, 686, 689, 691, 693, 695, 696, 698, 699, 701, - 704, 706, 709, 712, 715, 718, 721, 724, 726, 728, - 730 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short int yyrhs[] = -{ - 91, 0, -1, 95, 99, -1, 3, 93, 99, 4, - -1, -1, -1, -1, 3, 97, 99, 4, -1, -1, - -1, -1, 99, 116, -1, 99, 98, 100, -1, 115, - 103, -1, 106, -1, 107, -1, 115, 104, -1, 115, - 60, -1, 115, 101, 60, -1, 1, -1, 133, -1, - 133, 30, 133, -1, 133, 31, 133, -1, 133, 28, - 133, -1, 133, 29, 111, -1, 133, 35, 133, -1, - -1, 32, 96, -1, 33, 88, 112, 87, 96, 102, - -1, 30, 88, 93, 112, 87, 96, 102, -1, 31, - 88, 93, 114, 87, 96, 102, -1, 37, 88, 93, - 112, 87, 96, -1, 38, 92, -1, -1, 34, 92, - -1, 115, 28, 88, 93, 110, 87, 108, 96, 105, - -1, 115, 29, 88, 93, 111, 87, 108, 96, 105, - -1, 115, 35, 55, 93, 148, 88, 112, 87, 96, - 105, -1, 115, 35, 150, 88, 93, 112, 87, 96, - 105, -1, 115, 35, 88, 93, 112, 87, 96, 105, - -1, 115, 35, 88, 93, 113, 60, 110, 60, 108, - 113, 87, 96, -1, 115, 92, 105, -1, 115, 36, - 88, 93, 94, 112, 87, 96, -1, -1, -1, 101, - -1, -1, 133, -1, 133, -1, 133, -1, 109, -1, - 111, -1, -1, 22, -1, 118, -1, 121, -1, 120, - -1, 130, -1, 131, -1, 117, -1, 89, -1, 23, - 124, 119, 92, -1, 13, -1, -1, 56, 122, 125, - 126, 127, 129, -1, 24, 122, 125, 126, 127, 129, - -1, -1, -1, -1, 13, -1, -1, 16, -1, -1, - 58, 16, -1, 58, -1, 58, 16, -1, 58, -1, - 92, -1, 60, -1, 26, 13, 60, -1, -1, 27, - 122, 132, 13, 13, 146, 60, -1, 133, 64, 133, - -1, 133, 63, 133, -1, 133, 62, 133, -1, 134, - -1, 134, 66, -1, 134, 66, 143, -1, 143, -1, - 45, 155, 134, -1, 43, 88, 155, 133, 87, -1, - 143, 86, 137, 88, 147, 87, -1, 143, 86, 137, - -1, 14, 155, 146, -1, 15, 155, 88, 147, 87, - -1, 45, 146, -1, 43, 88, 147, 87, -1, -1, - 21, 123, 92, 136, 146, -1, 14, -1, 150, -1, - 154, 3, 133, 60, 4, -1, 150, 5, 133, 6, - -1, 143, 86, 5, 133, 6, -1, 138, 5, 133, - 6, -1, 150, 3, 133, 60, 4, -1, 143, 86, - 3, 133, 60, 4, -1, 138, 3, 133, 60, 4, - -1, 143, 86, 88, 87, -1, 143, 86, 88, 133, - 87, -1, 138, 88, 133, 87, -1, 138, 88, 87, - -1, 88, 133, 87, 5, 133, 6, -1, 88, 87, - 5, 133, 6, -1, 143, 67, 143, -1, 143, 81, - 143, -1, 143, 48, 143, -1, 143, 49, 143, -1, - 143, 75, 143, -1, 143, 46, 143, -1, 143, 47, - 143, -1, 143, 74, 143, -1, 143, 73, 143, -1, - 143, 40, 143, -1, 143, 72, 143, -1, 143, 71, - 143, -1, 143, 70, 143, -1, 143, 76, 143, -1, - 7, 143, -1, 8, 143, -1, 77, 143, -1, 78, - 143, -1, 143, 83, -1, 143, 82, -1, 85, 143, - -1, 84, 143, -1, 5, 133, 6, -1, 5, 6, - -1, 52, 133, 60, 4, -1, 52, 60, 4, -1, - 25, 123, 126, 127, 92, -1, 51, 143, -1, 51, - 92, -1, 51, 13, 88, 87, -1, 51, 13, 88, - 133, 87, -1, 51, 150, 88, 87, -1, 51, 150, - 88, 133, 87, -1, 139, -1, 140, -1, 141, -1, - 142, -1, 143, 68, 143, 69, 143, -1, 79, 143, - -1, 144, -1, 54, 143, -1, 88, 133, 87, -1, - 88, 87, -1, 150, -1, 154, -1, 152, -1, 151, - -1, 153, -1, 138, -1, 151, 5, 133, 6, -1, - 151, 3, 133, 60, 4, -1, 16, -1, 149, -1, - 149, 88, 87, -1, 149, 88, 133, 87, -1, 53, - 13, 146, -1, 39, -1, 39, 143, -1, 65, 134, - -1, 44, -1, 44, 92, -1, 44, 143, -1, 57, - -1, 57, 143, -1, 20, -1, 20, 143, -1, 41, - -1, 41, 88, 87, -1, 19, -1, 42, 88, 87, - -1, 42, 88, 133, 87, -1, 17, 88, 134, 87, - -1, 13, -1, 135, -1, 55, 145, 128, -1, 55, - 145, -1, 88, 133, 87, -1, 88, 87, -1, 150, - -1, 152, -1, 151, -1, -1, 134, -1, -1, 133, - -1, 133, 66, -1, 150, -1, 59, 155, -1, 9, - 155, -1, 10, 155, -1, 11, 155, -1, 50, 155, - -1, 12, 155, -1, 13, -1, 150, -1, 92, -1, - 18, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = -{ - 0, 100, 100, 106, 116, 120, 124, 130, 140, 144, - 148, 149, 153, 162, 165, 166, 168, 170, 185, 202, - 204, 206, 210, 214, 218, 222, 231, 232, 236, 247, - 255, 266, 269, 275, 276, 283, 296, 308, 318, 328, - 337, 362, 370, 380, 386, 387, 392, 395, 399, 404, - 408, 412, 418, 421, 425, 427, 429, 431, 433, 435, - 439, 445, 454, 455, 459, 467, 483, 489, 494, 499, - 509, 510, 515, 516, 520, 527, 531, 538, 539, 544, - 552, 551, 564, 568, 572, 576, 580, 585, 591, 595, - 600, 607, 616, 622, 628, 636, 640, 647, 646, 657, - 658, 662, 671, 676, 684, 691, 698, 708, 717, 724, - 733, 740, 746, 753, 763, 767, 771, 777, 781, 785, - 789, 793, 797, 801, 810, 814, 818, 822, 832, 836, - 840, 844, 848, 853, 858, 863, 872, 877, 882, 888, - 894, 905, 909, 913, 925, 938, 946, 958, 959, 960, - 961, 962, 967, 971, 973, 977, 982, 987, 989, 991, - 993, 995, 997, 999, 1008, 1019, 1021, 1023, 1028, 1039, - 1044, 1049, 1053, 1057, 1061, 1065, 1069, 1071, 1073, 1075, - 1078, 1082, 1088, 1091, 1097, 1103, 1108, 1109, 1113, 1119, - 1126, 1131, 1136, 1138, 1140, 1145, 1147, 1152, 1153, 1155, - 1164, 1168, 1174, 1180, 1186, 1192, 1198, 1205, 1207, 1209, - 1212 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "'{'", "'}'", "'['", "']'", "'-'", "'+'", - "'$'", "'@'", "'%'", "'*'", "WORD", "METHOD", "FUNCMETH", "THING", - "PMFUNC", "PRIVATEREF", "FUNC0SUB", "UNIOPSUB", "LSTOPSUB", "LABEL", - "FORMAT", "SUB", "ANONSUB", "PACKAGE", "USE", "WHILE", "UNTIL", "IF", - "UNLESS", "ELSE", "ELSIF", "CONTINUE", "FOR", "GIVEN", "WHEN", "DEFAULT", - "LOOPEX", "DOTDOT", "FUNC0", "FUNC1", "FUNC", "UNIOP", "LSTOP", "RELOP", - "EQOP", "MULOP", "ADDOP", "DOLSHARP", "DO", "HASHBRACK", "NOAMP", - "LOCAL", "MY", "MYSUB", "REQUIRE", "COLONATTR", "'&'", "';'", "PREC_LOW", - "DOROP", "OROP", "ANDOP", "NOTOP", "','", "ASSIGNOP", "'?'", "':'", - "DORDOR", "OROR", "ANDAND", "BITOROP", "BITANDOP", "SHIFTOP", "MATCHOP", - "'!'", "'~'", "REFGEN", "UMINUS", "POWOP", "POSTDEC", "POSTINC", - "PREDEC", "PREINC", "ARROW", "')'", "'('", "PEG", "$accept", "prog", - "block", "remember", "mydefsv", "progstart", "mblock", "mremember", - "savescope", "lineseq", "line", "sideff", "else", "cond", "case", "cont", - "loop", "switch", "mintro", "nexpr", "texpr", "iexpr", "mexpr", "mnexpr", - "miexpr", "label", "decl", "peg", "format", "formname", "mysubrout", - "subrout", "startsub", "startanonsub", "startformsub", "subname", - "proto", "subattrlist", "myattrlist", "subbody", "package", "use", "@1", - "expr", "argexpr", "listop", "@2", "method", "subscripted", "termbinop", - "termunop", "anonymous", "termdo", "term", "myattrterm", "myterm", - "listexpr", "listexprcom", "my_scalar", "amper", "scalar", "ary", "hsh", - "arylen", "star", "indirob", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = -{ - 0, 256, 257, 123, 125, 91, 93, 45, 43, 36, - 64, 37, 42, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 38, - 59, 304, 305, 306, 307, 308, 44, 309, 63, 58, - 310, 311, 312, 313, 314, 315, 316, 33, 126, 317, - 318, 319, 320, 321, 322, 323, 324, 41, 40, 325 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 99, 99, 100, 100, 100, 100, 100, 100, 101, - 101, 101, 101, 101, 101, 101, 102, 102, 102, 103, - 103, 104, 104, 105, 105, 106, 106, 106, 106, 106, - 106, 106, 107, 108, 109, 109, 110, 110, 111, 112, - 113, 114, 115, 115, 116, 116, 116, 116, 116, 116, - 117, 118, 119, 119, 120, 121, 122, 123, 124, 125, - 126, 126, 127, 127, 127, 128, 128, 129, 129, 130, - 132, 131, 133, 133, 133, 133, 134, 134, 134, 135, - 135, 135, 135, 135, 135, 135, 135, 136, 135, 137, - 137, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 140, 140, - 140, 140, 140, 140, 140, 140, 141, 141, 141, 141, - 141, 142, 142, 142, 142, 142, 142, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 144, 144, - 145, 145, 145, 145, 145, 146, 146, 147, 147, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 155, 155, - 155 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = -{ - 0, 2, 2, 4, 0, 0, 0, 4, 0, 0, - 0, 2, 3, 2, 1, 1, 2, 2, 3, 1, - 1, 3, 3, 3, 3, 3, 0, 2, 6, 7, - 7, 6, 2, 0, 2, 9, 9, 10, 9, 8, - 12, 3, 8, 0, 0, 1, 0, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 1, 0, 6, 6, 0, 0, 0, 1, - 0, 1, 0, 2, 1, 2, 1, 1, 1, 3, - 0, 7, 3, 3, 3, 1, 2, 3, 1, 3, - 5, 6, 3, 3, 5, 2, 4, 0, 5, 1, - 1, 5, 4, 5, 4, 5, 6, 5, 4, 5, - 4, 3, 6, 5, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, - 2, 2, 2, 2, 2, 2, 3, 2, 4, 3, - 5, 2, 2, 4, 5, 4, 5, 1, 1, 1, - 1, 5, 2, 1, 2, 3, 2, 1, 1, 1, - 1, 1, 1, 4, 5, 1, 1, 3, 4, 3, - 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, - 1, 3, 1, 3, 4, 4, 1, 1, 3, 2, - 3, 2, 1, 1, 1, 0, 1, 0, 1, 2, - 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, - 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const unsigned char yydefact[] = -{ - 6, 0, 10, 1, 9, 68, 66, 0, 66, 66, - 60, 52, 11, 59, 54, 56, 55, 57, 58, 63, - 0, 0, 80, 0, 53, 12, 14, 15, 0, 62, - 0, 69, 70, 79, 0, 70, 19, 4, 0, 0, - 0, 0, 0, 0, 0, 186, 0, 0, 165, 0, - 182, 178, 67, 67, 0, 0, 0, 0, 0, 0, - 0, 0, 170, 180, 0, 0, 173, 195, 0, 0, - 0, 0, 0, 0, 176, 0, 17, 0, 0, 0, - 0, 0, 0, 0, 33, 0, 13, 16, 20, 85, - 187, 162, 147, 148, 149, 150, 88, 153, 166, 157, - 160, 159, 161, 158, 61, 71, 72, 0, 72, 10, - 137, 0, 128, 129, 207, 210, 209, 208, 202, 203, - 204, 206, 195, 0, 0, 179, 0, 70, 4, 4, - 4, 4, 4, 4, 0, 4, 4, 32, 171, 0, - 0, 197, 174, 175, 207, 196, 95, 208, 0, 205, - 186, 142, 141, 157, 0, 0, 195, 154, 0, 189, - 192, 194, 193, 177, 201, 172, 130, 131, 152, 135, - 134, 156, 0, 0, 41, 18, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 133, 132, 0, 0, 0, 0, 0, - 0, 0, 74, 0, 195, 0, 9, 136, 93, 197, - 0, 97, 72, 46, 0, 0, 0, 0, 0, 4, - 5, 0, 181, 183, 0, 198, 0, 0, 89, 0, - 0, 139, 0, 169, 191, 0, 76, 188, 0, 155, - 34, 23, 24, 48, 21, 22, 25, 84, 83, 82, - 87, 0, 0, 111, 0, 123, 119, 120, 116, 117, - 114, 0, 126, 125, 124, 122, 121, 118, 127, 115, - 0, 0, 99, 0, 92, 100, 167, 0, 0, 0, - 0, 0, 0, 73, 78, 77, 65, 0, 64, 3, - 0, 185, 195, 0, 0, 47, 0, 0, 49, 51, - 0, 0, 200, 45, 50, 0, 0, 20, 0, 0, - 0, 184, 199, 96, 0, 143, 0, 145, 0, 138, - 190, 75, 0, 0, 0, 104, 110, 0, 0, 0, - 108, 0, 197, 168, 0, 102, 0, 163, 0, 81, - 94, 98, 140, 43, 43, 0, 0, 0, 0, 46, - 0, 0, 0, 90, 144, 146, 113, 0, 107, 151, - 0, 103, 109, 0, 105, 164, 101, 0, 0, 8, - 26, 26, 0, 33, 0, 0, 0, 31, 112, 106, - 91, 33, 33, 10, 0, 0, 29, 30, 0, 39, - 43, 33, 42, 35, 36, 9, 27, 0, 33, 0, - 38, 7, 0, 37, 0, 0, 0, 26, 40, 28 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const short int yydefgoto[] = -{ - -1, 1, 116, 109, 319, 2, 380, 393, 11, 4, - 25, 313, 396, 86, 87, 174, 26, 27, 377, 314, - 304, 252, 307, 316, 310, 28, 12, 13, 14, 30, - 15, 16, 20, 126, 19, 32, 106, 213, 247, 296, - 17, 18, 34, 308, 89, 90, 302, 284, 91, 92, - 93, 94, 95, 96, 97, 159, 146, 236, 311, 98, - 99, 100, 101, 102, 103, 118 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -358 -static const short int yypact[] = -{ - -358, 15, -358, -358, 6, -358, -358, 18, -358, -358, - -358, 16, -358, -358, -358, -358, -358, -358, -358, 28, - 40, -32, -358, 40, -358, -358, -358, -358, 308, -358, - 88, -358, 34, -358, 95, 34, -358, -358, 870, 1706, - 1706, 277, 277, 277, 277, -358, 277, 277, -358, 51, - -358, 1706, -358, -358, 98, 100, 104, 105, 8, 111, - 117, 88, 1706, 120, 131, 155, 642, 558, 277, 726, - 952, 112, 1706, 47, 1706, 277, -358, 1706, 1706, 1706, - 1706, 1706, 1706, 1034, 94, 185, -358, -358, 778, 196, - -358, 46, -358, -358, -358, -358, 1877, -358, 163, 13, - 102, -358, -358, 253, -358, -358, 207, 265, 207, -358, - -358, 30, 41, 41, -358, -358, -358, -358, -358, -358, - -358, -358, 1706, 203, 1706, 221, 88, 34, -358, -358, - -358, -358, -358, -358, 206, -358, -358, -358, 1877, 197, - 1118, 558, -358, 221, 1758, 196, -358, 787, 1706, -358, - 213, -358, 221, 56, 288, 19, 1706, 221, 1202, 250, - -358, -358, -358, 221, -358, 196, 41, 41, 41, 380, - 380, 305, 23, 88, -358, -358, 1706, 1706, 1706, 1706, - 1706, 1706, 1706, 1706, 1706, 1706, 1706, 1286, 1706, 1706, - 1706, 1706, 1706, 1706, 1706, 1706, 1706, 1706, 1706, 1706, - 1706, 1706, 1706, -358, -358, 75, 1370, 1706, 1706, 1706, - 1706, 1706, 316, 5, 1706, 5, 190, -358, -358, 1706, - -53, -358, 207, 1706, 1706, 1706, 1706, 321, 390, -358, - -358, 1706, -358, -358, 74, 314, 247, 1706, 196, 1454, - 1538, -358, 331, -358, -358, 225, 324, -358, 1706, 336, - -358, 160, -358, 160, 160, 160, 160, 278, 278, -358, - 1877, 69, 108, -358, 292, 1938, 545, 627, 596, 121, - 1877, 1833, 460, 460, 378, 506, 713, 816, 41, 41, - 1706, 1706, -358, 1622, 260, -358, -358, 307, 113, 195, - 354, 204, 436, -358, -358, -358, -358, 297, -358, -358, - 279, -358, 1706, 88, 285, 160, 295, 296, 160, -358, - 332, 276, -358, -358, -358, 335, 315, 219, 1706, 1706, - 341, -358, -358, -358, 326, -358, 408, -358, 441, -358, - -358, -358, 209, 1706, 404, -358, -358, 1706, 570, 212, - -358, 457, 1706, -358, 419, -358, 432, -358, 434, -358, - -358, -358, -358, -358, -358, 381, 381, 1706, 381, 1706, - 352, 359, 381, -358, -358, -358, -358, 236, -358, 1894, - 444, -358, -358, 369, -358, -358, -358, 381, 381, -358, - 12, 12, 370, 94, 398, 381, 381, -358, -358, -358, - -358, 94, 94, -358, 381, 377, -358, -358, 381, -358, - -358, 94, -358, -358, -358, 237, -358, 1706, 94, 472, - -358, -358, 389, -358, 403, 381, 381, 12, -358, -358 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const short int yypgoto[] = -{ - -358, -358, -26, -61, -358, -358, 1480, -358, -358, -108, - -358, 466, -357, -358, -358, 29, -358, -358, -327, -358, - 142, -64, -217, 93, -358, -358, -358, -358, -358, -358, - -358, -358, 156, 459, -358, 487, -23, -101, -358, 303, - -358, -358, -358, -28, -58, -358, -358, -358, -358, -358, - -358, -358, -358, 37, -358, -358, -117, -216, -358, -358, - -21, 465, 467, -358, -358, 99 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -187 -static const short int yytable[] = -{ - 88, 216, 84, 300, 104, 218, -2, 215, 37, 145, - 111, 315, 108, 184, 320, 3, 207, 41, 208, 165, - 117, 117, 117, 117, 397, 117, 117, 378, 33, 5, - 6, 21, 7, 8, 301, 137, 217, 134, 24, 243, - 142, 29, 155, 151, 394, 395, 147, 117, 153, 185, - 105, 186, 160, 31, 117, 172, 41, 42, 43, 207, - 419, 208, 9, 132, 145, 294, 220, 223, 224, 225, - 226, 227, 228, 409, 230, 231, 112, 113, 280, 242, - 281, 181, 182, 183, 41, 181, 182, 183, 125, 282, - 238, 37, 181, 182, 183, 10, 133, 297, 145, 138, - 221, 360, 361, 143, 222, 209, 152, 210, 107, 157, - 249, 163, 234, 235, 335, 166, 167, 168, 169, 170, - 147, 303, 202, 203, 204, 156, 373, 205, 173, 334, - 245, 181, 182, 183, 187, 158, 181, 182, 183, 124, - 382, 119, 120, 121, 240, 122, 123, 250, 251, 253, - 254, 255, 256, 257, 258, 259, 145, 261, 262, 264, - 306, 321, 309, 283, 22, 23, 148, 149, 318, 191, - 181, 182, 183, 344, 164, 181, 182, 183, 287, 288, - 289, 290, 291, 292, 285, 351, 128, 295, 129, 295, - 412, 235, 130, 131, 299, 305, 253, 201, 253, 135, - 317, 345, 202, 203, 204, 136, 312, 205, 139, 324, - 347, 326, 328, 5, 6, 366, 7, 8, 371, 140, - 332, 260, 181, 182, 183, 265, 266, 267, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 237, 411, 388, 141, 145, 175, 9, 176, 177, 178, - 179, 206, 338, 339, 180, 341, 211, 181, 182, 183, - 5, 6, 184, 7, 8, 212, 181, 182, 183, 191, - 192, 181, 182, 183, 181, 182, 183, 352, 214, 10, - 37, 181, 182, 183, 232, 405, 41, 181, 182, 183, - 114, 219, 241, 9, 229, 115, 200, 201, 181, 182, - 183, 239, 202, 203, 204, 367, -49, 205, 246, 36, - 248, 37, 330, 38, 235, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 10, 50, 51, 52, - 41, 305, 293, 53, 323, 329, 54, 55, 56, 57, - 331, 333, 183, 58, 59, 60, 61, 62, 342, 63, - 64, 65, 66, 67, 181, 182, 183, 349, 68, 69, - 70, 71, 72, 73, 357, 74, 350, 75, 76, 181, - 182, 183, 353, 77, 369, 359, 181, 182, 183, 336, - 322, 88, 354, 355, 379, 78, 79, 80, 181, 182, - 183, 36, 81, 82, 343, 38, 83, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 368, 50, - 51, 52, 399, 363, 346, 53, 181, 182, 183, 356, - 403, 404, 358, 374, 189, 190, 191, 192, 362, 62, - 410, 63, 64, 65, 66, 67, 375, 413, 376, 385, - 68, 69, 70, 71, 72, 73, 386, 74, 389, 75, - -44, 198, 199, 200, 201, 77, 390, 398, 400, 202, - 203, 204, -187, -187, 205, 407, 205, 78, 79, 80, - 181, 182, 183, 36, 81, 82, 415, 38, 83, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 416, 50, 51, 52, 85, 364, 348, 53, 181, 182, - 183, 384, 414, 181, 182, 183, 189, 190, 191, 192, - 35, 62, 127, 63, 64, 65, 66, 67, 298, 181, - 182, 183, 68, 69, 70, 71, 72, 73, 365, 74, - 0, 75, 197, 198, 199, 200, 201, 77, 161, 0, - 162, 202, 203, 204, 372, 0, 205, 0, 0, 78, - 79, 80, 189, 190, 191, 192, 81, 82, 0, -44, - 83, 37, 0, 38, 0, 39, 40, 41, 42, 43, - 44, 144, 46, 47, 48, 49, 115, 50, 51, 52, - 199, 200, 201, 53, 0, 0, 0, 202, 203, 204, - 0, -187, 205, 191, 192, 0, 0, 62, 0, 63, - 64, 65, 66, 67, 0, 0, 0, 0, 68, 69, - 70, 71, 72, 73, 0, 74, 0, 75, 0, 0, - 200, 201, 0, 77, 0, 0, 202, 203, 204, 0, - 370, 205, 181, 182, 183, 78, 79, 80, 0, 0, - 0, 0, 81, 82, 0, 37, 83, 38, 0, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 0, 50, 51, 52, 0, 0, 0, 53, 0, 0, - 0, 0, 201, 189, -187, 191, 192, 202, 203, 204, - 0, 62, 205, 63, 64, 65, 66, 67, 0, 0, - 0, 0, 68, 69, 70, 71, 72, 73, 0, 74, - 0, 75, 200, 201, 0, 0, 0, 77, 202, 203, - 204, 0, 0, 205, 0, 0, 0, 0, 0, 78, - 79, 80, 0, 0, 0, 0, 81, 82, 0, 37, - 83, 38, 0, 39, 40, 41, 42, 43, 44, 150, - 46, 47, 48, 49, 0, 50, 51, 52, 0, 0, - 0, 53, 0, 0, 0, 0, 0, 0, 0, 189, - 190, 191, 192, 0, 0, 62, 0, 63, 64, 65, - 66, 67, 0, 0, 0, 0, 68, 69, 70, 71, - 72, 73, 0, 74, 0, 75, 0, 0, 200, 201, - 207, 77, 208, -157, 202, 203, 204, 0, 0, 205, - 0, 0, 0, 78, 79, 80, 176, 177, 178, 179, - 81, 82, 0, 180, 83, -157, -157, -157, -157, 0, - 0, 0, -157, 0, 0, 0, 0, -157, 0, 0, - 0, 0, 0, -157, -157, -157, -157, 0, 0, 0, - 181, 182, 183, 0, 0, 0, 0, -157, 0, -157, - -157, -157, 0, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, 191, 192, 0, 0, -157, -157, - -157, 0, 0, -157, -157, 38, 110, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 0, 50, - 51, 52, 201, 0, 0, 53, 0, 202, 203, 204, - 0, 0, 205, 0, 0, 0, 0, 0, 0, 62, - 0, 63, 64, 65, 66, 67, 0, 0, 0, 0, - 68, 69, 70, 71, 72, 73, 0, 74, 0, 75, - 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 78, 79, 80, - 0, 0, 0, 0, 81, 82, 0, 38, 83, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 0, 50, 51, 52, 0, 0, 0, 53, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 62, 0, 63, 64, 65, 66, 67, 0, 0, - 0, 0, 68, 69, 70, 71, 72, 73, 0, 74, - 0, 75, 154, 0, 0, 0, 0, 77, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, - 79, 80, 0, 0, 0, 0, 81, 82, 0, 38, - 83, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 0, 50, 51, 52, 0, 0, 0, 53, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 62, 0, 63, 64, 65, 66, 67, - 0, 0, 0, 0, 68, 69, 70, 71, 72, 73, - 0, 74, 0, 75, 0, 0, 0, 0, 0, 77, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 78, 79, 80, 0, 0, 0, 0, 81, 82, - 0, 171, 83, 38, 0, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 0, 50, 51, 52, - 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 62, 0, 63, - 64, 65, 66, 67, 0, 0, 0, 0, 68, 69, - 70, 71, 72, 73, 0, 74, 0, 75, 0, 0, - 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 78, 79, 80, 0, 0, - 0, 0, 81, 82, 0, 233, 83, 38, 0, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 0, 50, 51, 52, 0, 0, 0, 53, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 62, 0, 63, 64, 65, 66, 67, 0, 0, - 0, 0, 68, 69, 70, 71, 72, 73, 0, 74, - 0, 75, 0, 0, 0, 0, 0, 77, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, - 79, 80, 0, 0, 0, 0, 81, 82, 0, 244, - 83, 38, 0, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 0, 50, 51, 52, 0, 0, - 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 62, 0, 63, 64, 65, - 66, 67, 0, 0, 0, 0, 68, 69, 70, 71, - 72, 73, 0, 74, 0, 75, 0, 0, 0, 0, - 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 78, 79, 80, 0, 0, 0, 0, - 81, 82, 0, 263, 83, 38, 0, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 0, 50, - 51, 52, 0, 0, 0, 53, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, - 0, 63, 64, 65, 66, 67, 0, 0, 0, 0, - 68, 69, 70, 71, 72, 73, 0, 74, 0, 75, - 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 78, 79, 80, - 0, 0, 0, 0, 81, 82, 0, 286, 83, 38, - 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 0, 50, 51, 52, 0, 0, 0, 53, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 62, 0, 63, 64, 65, 66, 67, - 0, 0, 0, 0, 68, 69, 70, 71, 72, 73, - 0, 74, 0, 75, 0, 0, 0, 0, 0, 77, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 78, 79, 80, 0, 0, 0, 0, 81, 82, - 0, 325, 83, 38, 0, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 0, 50, 51, 52, - 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 62, 0, 63, - 64, 65, 66, 67, 0, 0, 0, 0, 68, 69, - 70, 71, 72, 73, 0, 74, 0, 75, 0, 0, - 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 78, 79, 80, 0, 0, - 0, 0, 81, 82, 0, 327, 83, 38, 0, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 0, 50, 51, 52, 0, 0, 0, 53, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 62, 0, 63, 64, 65, 66, 67, 0, 0, - 0, 0, 68, 69, 70, 71, 72, 73, 0, 74, - 0, 75, 0, 0, 0, 0, 0, 77, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, - 79, 80, 0, 0, 0, 0, 81, 82, 0, 340, - 83, 38, 0, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 0, 50, 51, 52, 0, 0, - 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 62, 0, 63, 64, 65, - 66, 67, 0, 0, 0, 0, 68, 69, 70, 71, - 72, 73, 0, 74, -186, 75, 0, 0, 0, 0, - 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 78, 79, 80, -186, -186, -186, -186, - 81, 82, 0, -186, 83, 0, 0, 0, -186, 0, - 0, 0, 0, 0, -186, -186, -186, -186, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -186, 0, - -186, -186, -186, 0, -186, -186, -186, -186, -186, -186, - -186, -186, -186, -186, -186, 0, 381, 0, 383, -186, - -186, -186, 387, 0, -186, -186, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 391, 392, 0, - 0, 0, 0, 0, 0, 401, 402, 0, 0, 0, - 0, 0, 0, 188, 406, 0, 0, 0, 408, 189, - 190, 191, 192, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 417, 418, 0, 0, 0, - 193, 194, 337, 195, 196, 197, 198, 199, 200, 201, - 0, 0, 0, 0, 202, 203, 204, 188, 0, 205, - 0, 0, 0, 189, 190, 191, 192, 0, 0, 0, - 0, 0, 0, 0, 188, 0, 0, 0, 0, 0, - 189, 190, 191, 192, 193, 194, 0, 195, 196, 197, - 198, 199, 200, 201, 0, 0, 0, 0, 202, 203, - 204, 0, 194, 205, 195, 196, 197, 198, 199, 200, - 201, 0, 0, 0, 0, 202, 203, 204, -187, 0, - 205, 0, 0, 0, 189, 190, 191, 192, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 195, 196, - 197, 198, 199, 200, 201, 0, 0, 0, 0, 202, - 203, 204, 0, 0, 205 -}; - -static const short int yycheck[] = -{ - 28, 109, 28, 219, 30, 122, 0, 108, 3, 67, - 38, 228, 35, 66, 231, 0, 3, 9, 5, 77, - 41, 42, 43, 44, 381, 46, 47, 354, 60, 23, - 24, 13, 26, 27, 87, 61, 6, 58, 22, 156, - 66, 13, 70, 69, 32, 33, 67, 68, 69, 3, - 16, 5, 73, 13, 75, 83, 9, 10, 11, 3, - 417, 5, 56, 55, 122, 60, 124, 128, 129, 130, - 131, 132, 133, 400, 135, 136, 39, 40, 3, 60, - 5, 62, 63, 64, 9, 62, 63, 64, 51, 14, - 148, 3, 62, 63, 64, 89, 88, 214, 156, 62, - 126, 318, 319, 66, 127, 3, 69, 5, 13, 72, - 87, 74, 140, 141, 6, 78, 79, 80, 81, 82, - 141, 222, 81, 82, 83, 13, 342, 86, 34, 60, - 158, 62, 63, 64, 88, 88, 62, 63, 64, 88, - 357, 42, 43, 44, 88, 46, 47, 173, 176, 177, - 178, 179, 180, 181, 182, 183, 214, 185, 186, 187, - 224, 87, 226, 88, 8, 9, 67, 68, 229, 48, - 62, 63, 64, 60, 75, 62, 63, 64, 206, 207, - 208, 209, 210, 211, 205, 302, 88, 213, 88, 215, - 407, 219, 88, 88, 4, 223, 224, 76, 226, 88, - 228, 6, 81, 82, 83, 88, 227, 86, 88, 237, - 6, 239, 240, 23, 24, 6, 26, 27, 6, 88, - 248, 184, 62, 63, 64, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 141, 4, 6, 88, 302, 60, 56, 28, 29, 30, - 31, 88, 280, 281, 35, 283, 3, 62, 63, 64, - 23, 24, 66, 26, 27, 58, 62, 63, 64, 48, - 49, 62, 63, 64, 62, 63, 64, 303, 13, 89, - 3, 62, 63, 64, 87, 393, 9, 62, 63, 64, - 13, 88, 4, 56, 88, 18, 75, 76, 62, 63, - 64, 88, 81, 82, 83, 333, 87, 86, 58, 1, - 5, 3, 87, 5, 342, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 89, 19, 20, 21, - 9, 359, 16, 25, 87, 4, 28, 29, 30, 31, - 16, 5, 64, 35, 36, 37, 38, 39, 88, 41, - 42, 43, 44, 45, 62, 63, 64, 60, 50, 51, - 52, 53, 54, 55, 88, 57, 87, 59, 60, 62, - 63, 64, 87, 65, 337, 60, 62, 63, 64, 87, - 66, 409, 87, 87, 3, 77, 78, 79, 62, 63, - 64, 1, 84, 85, 87, 5, 88, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 4, 19, - 20, 21, 383, 87, 60, 25, 62, 63, 64, 87, - 391, 392, 87, 4, 46, 47, 48, 49, 87, 39, - 401, 41, 42, 43, 44, 45, 4, 408, 4, 87, - 50, 51, 52, 53, 54, 55, 87, 57, 4, 59, - 60, 73, 74, 75, 76, 65, 87, 87, 60, 81, - 82, 83, 82, 83, 86, 88, 86, 77, 78, 79, - 62, 63, 64, 1, 84, 85, 87, 5, 88, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 87, 19, 20, 21, 28, 87, 60, 25, 62, 63, - 64, 359, 409, 62, 63, 64, 46, 47, 48, 49, - 23, 39, 53, 41, 42, 43, 44, 45, 215, 62, - 63, 64, 50, 51, 52, 53, 54, 55, 87, 57, - -1, 59, 72, 73, 74, 75, 76, 65, 73, -1, - 73, 81, 82, 83, 87, -1, 86, -1, -1, 77, - 78, 79, 46, 47, 48, 49, 84, 85, -1, 87, - 88, 3, -1, 5, -1, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 74, 75, 76, 25, -1, -1, -1, 81, 82, 83, - -1, 46, 86, 48, 49, -1, -1, 39, -1, 41, - 42, 43, 44, 45, -1, -1, -1, -1, 50, 51, - 52, 53, 54, 55, -1, 57, -1, 59, -1, -1, - 75, 76, -1, 65, -1, -1, 81, 82, 83, -1, - 60, 86, 62, 63, 64, 77, 78, 79, -1, -1, - -1, -1, 84, 85, -1, 3, 88, 5, -1, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, 21, -1, -1, -1, 25, -1, -1, - -1, -1, 76, 46, 47, 48, 49, 81, 82, 83, - -1, 39, 86, 41, 42, 43, 44, 45, -1, -1, - -1, -1, 50, 51, 52, 53, 54, 55, -1, 57, - -1, 59, 75, 76, -1, -1, -1, 65, 81, 82, - 83, -1, -1, 86, -1, -1, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, 84, 85, -1, 3, - 88, 5, -1, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, -1, 19, 20, 21, -1, -1, - -1, 25, -1, -1, -1, -1, -1, -1, -1, 46, - 47, 48, 49, -1, -1, 39, -1, 41, 42, 43, - 44, 45, -1, -1, -1, -1, 50, 51, 52, 53, - 54, 55, -1, 57, -1, 59, -1, -1, 75, 76, - 3, 65, 5, 6, 81, 82, 83, -1, -1, 86, - -1, -1, -1, 77, 78, 79, 28, 29, 30, 31, - 84, 85, -1, 35, 88, 28, 29, 30, 31, -1, - -1, -1, 35, -1, -1, -1, -1, 40, -1, -1, - -1, -1, -1, 46, 47, 48, 49, -1, -1, -1, - 62, 63, 64, -1, -1, -1, -1, 60, -1, 62, - 63, 64, -1, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 48, 49, -1, -1, 81, 82, - 83, -1, -1, 86, 87, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, - 20, 21, 76, -1, -1, 25, -1, 81, 82, 83, - -1, -1, 86, -1, -1, -1, -1, -1, -1, 39, - -1, 41, 42, 43, 44, 45, -1, -1, -1, -1, - 50, 51, 52, 53, 54, 55, -1, 57, -1, 59, - -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 77, 78, 79, - -1, -1, -1, -1, 84, 85, -1, 5, 88, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, 21, -1, -1, -1, 25, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 39, -1, 41, 42, 43, 44, 45, -1, -1, - -1, -1, 50, 51, 52, 53, 54, 55, -1, 57, - -1, 59, 60, -1, -1, -1, -1, 65, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, 84, 85, -1, 5, - 88, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, -1, 19, 20, 21, -1, -1, -1, 25, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 39, -1, 41, 42, 43, 44, 45, - -1, -1, -1, -1, 50, 51, 52, 53, 54, 55, - -1, 57, -1, 59, -1, -1, -1, -1, -1, 65, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 77, 78, 79, -1, -1, -1, -1, 84, 85, - -1, 87, 88, 5, -1, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, -1, 19, 20, 21, - -1, -1, -1, 25, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 39, -1, 41, - 42, 43, 44, 45, -1, -1, -1, -1, 50, 51, - 52, 53, 54, 55, -1, 57, -1, 59, -1, -1, - -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 77, 78, 79, -1, -1, - -1, -1, 84, 85, -1, 87, 88, 5, -1, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, 21, -1, -1, -1, 25, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 39, -1, 41, 42, 43, 44, 45, -1, -1, - -1, -1, 50, 51, 52, 53, 54, 55, -1, 57, - -1, 59, -1, -1, -1, -1, -1, 65, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, 84, 85, -1, 87, - 88, 5, -1, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, -1, 19, 20, 21, -1, -1, - -1, 25, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 39, -1, 41, 42, 43, - 44, 45, -1, -1, -1, -1, 50, 51, 52, 53, - 54, 55, -1, 57, -1, 59, -1, -1, -1, -1, - -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 77, 78, 79, -1, -1, -1, -1, - 84, 85, -1, 87, 88, 5, -1, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, - 20, 21, -1, -1, -1, 25, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, - -1, 41, 42, 43, 44, 45, -1, -1, -1, -1, - 50, 51, 52, 53, 54, 55, -1, 57, -1, 59, - -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 77, 78, 79, - -1, -1, -1, -1, 84, 85, -1, 87, 88, 5, - -1, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, -1, 19, 20, 21, -1, -1, -1, 25, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 39, -1, 41, 42, 43, 44, 45, - -1, -1, -1, -1, 50, 51, 52, 53, 54, 55, - -1, 57, -1, 59, -1, -1, -1, -1, -1, 65, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 77, 78, 79, -1, -1, -1, -1, 84, 85, - -1, 87, 88, 5, -1, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, -1, 19, 20, 21, - -1, -1, -1, 25, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 39, -1, 41, - 42, 43, 44, 45, -1, -1, -1, -1, 50, 51, - 52, 53, 54, 55, -1, 57, -1, 59, -1, -1, - -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 77, 78, 79, -1, -1, - -1, -1, 84, 85, -1, 87, 88, 5, -1, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, 21, -1, -1, -1, 25, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 39, -1, 41, 42, 43, 44, 45, -1, -1, - -1, -1, 50, 51, 52, 53, 54, 55, -1, 57, - -1, 59, -1, -1, -1, -1, -1, 65, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 77, - 78, 79, -1, -1, -1, -1, 84, 85, -1, 87, - 88, 5, -1, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, -1, 19, 20, 21, -1, -1, - -1, 25, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 39, -1, 41, 42, 43, - 44, 45, -1, -1, -1, -1, 50, 51, 52, 53, - 54, 55, -1, 57, 6, 59, -1, -1, -1, -1, - -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 77, 78, 79, 28, 29, 30, 31, - 84, 85, -1, 35, 88, -1, -1, -1, 40, -1, - -1, -1, -1, -1, 46, 47, 48, 49, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, - 62, 63, 64, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, -1, 356, -1, 358, 81, - 82, 83, 362, -1, 86, 87, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 377, 378, -1, - -1, -1, -1, -1, -1, 385, 386, -1, -1, -1, - -1, -1, -1, 40, 394, -1, -1, -1, 398, 46, - 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 415, 416, -1, -1, -1, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - -1, -1, -1, -1, 81, 82, 83, 40, -1, 86, - -1, -1, -1, 46, 47, 48, 49, -1, -1, -1, - -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, - 46, 47, 48, 49, 67, 68, -1, 70, 71, 72, - 73, 74, 75, 76, -1, -1, -1, -1, 81, 82, - 83, -1, 68, 86, 70, 71, 72, 73, 74, 75, - 76, -1, -1, -1, -1, 81, 82, 83, 40, -1, - 86, -1, -1, -1, 46, 47, 48, 49, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 70, 71, - 72, 73, 74, 75, 76, -1, -1, -1, -1, 81, - 82, 83, -1, -1, 86 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = -{ - 0, 91, 95, 0, 99, 23, 24, 26, 27, 56, - 89, 98, 116, 117, 118, 120, 121, 130, 131, 124, - 122, 13, 122, 122, 22, 100, 106, 107, 115, 13, - 119, 13, 125, 60, 132, 125, 1, 3, 5, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 19, 20, 21, 25, 28, 29, 30, 31, 35, 36, - 37, 38, 39, 41, 42, 43, 44, 45, 50, 51, - 52, 53, 54, 55, 57, 59, 60, 65, 77, 78, - 79, 84, 85, 88, 92, 101, 103, 104, 133, 134, - 135, 138, 139, 140, 141, 142, 143, 144, 149, 150, - 151, 152, 153, 154, 92, 16, 126, 13, 126, 93, - 6, 133, 143, 143, 13, 18, 92, 150, 155, 155, - 155, 155, 155, 155, 88, 143, 123, 123, 88, 88, - 88, 88, 55, 88, 150, 88, 88, 92, 143, 88, - 88, 88, 92, 143, 13, 134, 146, 150, 155, 155, - 13, 92, 143, 150, 60, 133, 13, 143, 88, 145, - 150, 151, 152, 143, 155, 134, 143, 143, 143, 143, - 143, 87, 133, 34, 105, 60, 28, 29, 30, 31, - 35, 62, 63, 64, 66, 3, 5, 88, 40, 46, - 47, 48, 49, 67, 68, 70, 71, 72, 73, 74, - 75, 76, 81, 82, 83, 86, 88, 3, 5, 3, - 5, 3, 58, 127, 13, 127, 99, 6, 146, 88, - 134, 92, 126, 93, 93, 93, 93, 93, 93, 88, - 93, 93, 87, 87, 133, 133, 147, 155, 134, 88, - 88, 4, 60, 146, 87, 133, 58, 128, 5, 87, - 92, 133, 111, 133, 133, 133, 133, 133, 133, 133, - 143, 133, 133, 87, 133, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 3, 5, 14, 88, 137, 150, 87, 133, 133, 133, - 133, 133, 133, 16, 60, 92, 129, 146, 129, 4, - 147, 87, 136, 127, 110, 133, 111, 112, 133, 111, - 114, 148, 150, 101, 109, 112, 113, 133, 93, 94, - 112, 87, 66, 87, 133, 87, 133, 87, 133, 4, - 87, 16, 133, 5, 60, 6, 87, 69, 133, 133, - 87, 133, 88, 87, 60, 6, 60, 6, 60, 60, - 87, 146, 92, 87, 87, 87, 87, 88, 87, 60, - 112, 112, 87, 87, 87, 87, 6, 133, 4, 143, - 60, 6, 87, 147, 4, 4, 4, 108, 108, 3, - 96, 96, 112, 96, 110, 87, 87, 96, 6, 4, - 87, 96, 96, 97, 32, 33, 102, 102, 87, 105, - 60, 96, 96, 105, 105, 99, 96, 88, 96, 108, - 105, 4, 112, 105, 113, 87, 87, 96, 96, 102 -}; -/* which symbols are of type opval */ -static const int yy_is_opval[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 1, 1, 1, - 1, 0, 0, 0, 1, - 1, 1, 1, 1, 1, 1, 0, - 1, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0 - -}; diff --git a/madly.y b/madly.y deleted file mode 100644 index 6021289..0000000 --- a/madly.y +++ /dev/null @@ -1,1214 +0,0 @@ -/* perly.y - * - * Copyright (c) 1991-2002, 2003, 2004 Larry Wall - * - * You may distribute under the terms of either the GNU General Public - * License or the Artistic License, as specified in the README file. - * - */ - -/* - * 'I see,' laughed Strider. 'I look foul and feel fair. Is that it? - * All that is gold does not glitter, not all those who wander are lost.' - */ - -/* Make the parser re-entrant. */ - -/* FIXME for MAD - is the new mintro on while and until important? */ -%pure_parser - -%start prog - -%union { - I32 ival; - char *pval; - TOKEN* tkval; - OP *opval; - GV *gvval; -} - -%token '{' '}' '[' ']' '-' '+' '$' '@' '%' '*' - -%token WORD METHOD FUNCMETH THING PMFUNC PRIVATEREF -%token FUNC0SUB UNIOPSUB LSTOPSUB -%token LABEL -%token FORMAT SUB ANONSUB PACKAGE USE -%token WHILE UNTIL IF UNLESS ELSE ELSIF CONTINUE FOR -%token GIVEN WHEN DEFAULT -%token LOOPEX DOTDOT -%token FUNC0 FUNC1 FUNC UNIOP LSTOP -%token RELOP EQOP MULOP ADDOP -%token DOLSHARP DO HASHBRACK NOAMP -%token LOCAL MY MYSUB REQUIRE -%token COLONATTR - -%type prog progstart remember mremember savescope -%type startsub startanonsub startformsub -/* FIXME for MAD - are these two ival? */ -%type mydefsv mintro - -%type '&' ';' - -%type decl format subrout mysubrout package use peg - -%type block mblock lineseq line loop cond else -%type expr term subscripted scalar ary hsh arylen star amper sideff -%type argexpr nexpr texpr iexpr mexpr mnexpr miexpr -%type listexpr listexprcom indirob listop method -%type formname subname proto subbody cont my_scalar -%type subattrlist myattrlist myattrterm myterm -%type termbinop termunop anonymous termdo -%type switch case -%type label - -%nonassoc PREC_LOW -%nonassoc LOOPEX - -%left OROP DOROP -%left ANDOP -%right NOTOP -%nonassoc LSTOP LSTOPSUB -%left ',' -%right ASSIGNOP -%right '?' ':' -%nonassoc DOTDOT -%left OROR DORDOR -%left ANDAND -%left BITOROP -%left BITANDOP -%nonassoc EQOP -%nonassoc RELOP -%nonassoc UNIOP UNIOPSUB -%nonassoc REQUIRE -%left SHIFTOP -%left ADDOP -%left MULOP -%left MATCHOP -%right '!' '~' UMINUS REFGEN -%right POWOP -%nonassoc PREINC PREDEC POSTINC POSTDEC -%left ARROW -%nonassoc ')' -%left '(' -%left '[' '{' - -%token PEG - -%% /* RULES */ - -/* The whole program */ -prog : progstart - /*CONTINUED*/ lineseq - { $$ = $1; newPROG(block_end($1,$2)); } - ; - -/* An ordinary block */ -block : '{' remember lineseq '}' - { if (PL_copline > (line_t)($1)->tk_lval.ival) - PL_copline = (line_t)($1)->tk_lval.ival; - $$ = block_end($2, $3); - token_getmad($1,$$,'{'); - token_getmad($4,$$,'}'); - } - ; - -remember: /* NULL */ /* start a full lexical scope */ - { $$ = block_start(TRUE); } - ; - -mydefsv: /* NULL */ /* lexicalize $_ */ - { $$ = (I32) allocmy("$_"); } - ; - -progstart: - { - PL_expect = XSTATE; $$ = block_start(TRUE); - } - ; - - -mblock : '{' mremember lineseq '}' - { if (PL_copline > (line_t)($1)->tk_lval.ival) - PL_copline = (line_t)($1)->tk_lval.ival; - $$ = block_end($2, $3); - token_getmad($1,$$,'{'); - token_getmad($4,$$,'}'); - } - ; - -mremember: /* NULL */ /* start a partial lexical scope */ - { $$ = block_start(FALSE); } - ; - -savescope: /* NULL */ /* remember stack pos in case of error */ - { $$ = PL_savestack_ix; } - -/* A collection of "lines" in the program */ -lineseq : /* NULL */ - { $$ = Nullop; } - | lineseq decl -/* { $$ = $1 } */ - { $$ = append_list(OP_LINESEQ, - (LISTOP*)$1, (LISTOP*)$2); } - | lineseq savescope line - { LEAVE_SCOPE($2); - $$ = append_list(OP_LINESEQ, - (LISTOP*)$1, (LISTOP*)$3); - PL_pad_reset_pending = TRUE; - if ($1 && $3) PL_hints |= HINT_BLOCK_SCOPE; } - ; - -/* A "line" in the program */ -line : label cond - { $$ = newSTATEOP(0, ($1)->tk_lval.pval, $2); - token_getmad($1,((LISTOP*)$$)->op_first,'L'); } - | loop /* loops add their own labels */ - | switch /* ... and so do switches */ - { $$ = $1; } - | label case - { $$ = newSTATEOP(0, ($1)->tk_lval.pval, $2); } - | label ';' - { - if (($1)->tk_lval.pval) { - $$ = newSTATEOP(0, ($1)->tk_lval.pval, newOP(OP_NULL, 0)); - token_getmad($1,$$,'L'); - token_getmad($2,((LISTOP*)$$)->op_first,';'); - } - else { - $$ = newOP(OP_NULL, 0); - PL_copline = NOLINE; - token_free($1); - token_getmad($2,$$,';'); - } - PL_expect = XSTATE; - } - | label sideff ';' - { OP* op; - $$ = newSTATEOP(0, ($1)->tk_lval.pval, $2); - PL_expect = XSTATE; - /* sideff might already have a nexstate */ - op = ((LISTOP*)$$)->op_first; - if (op) { - while (op->op_sibling && - op->op_sibling->op_type == OP_NEXTSTATE) - op = op->op_sibling; - token_getmad($1,op,'L'); - token_getmad($3,op,';'); - } - } - ; - -/* An expression which may have a side-effect */ -sideff : error - { $$ = Nullop; } - | expr - { $$ = $1; } - | expr IF expr - { $$ = newLOGOP(OP_AND, 0, $3, $1); - token_getmad($2,$$,'i'); - } - | expr UNLESS expr - { $$ = newLOGOP(OP_OR, 0, $3, $1); - token_getmad($2,$$,'i'); - } - | expr WHILE expr - { $$ = newLOOPOP(OPf_PARENS, 1, scalar($3), $1); - token_getmad($2,$$,'w'); - } - | expr UNTIL iexpr - { $$ = newLOOPOP(OPf_PARENS, 1, $3, $1); - token_getmad($2,$$,'w'); - } - | expr FOR expr - { $$ = newFOROP(0, Nullch, (line_t)($2)->tk_lval.ival, - Nullop, $3, $1, Nullop); - token_getmad($2,((LISTOP*)$$)->op_first->op_sibling,'w'); - } - ; - -/* else and elsif blocks */ -else : /* NULL */ - { $$ = Nullop; } - | ELSE mblock - { ($2)->op_flags |= OPf_PARENS; $$ = scope($2); - token_getmad($1,$$,'o'); - } - | ELSIF '(' mexpr ')' mblock else - { PL_copline = (line_t)($1)->tk_lval.ival; - $$ = newCONDOP(0, $3, scope($5), $6); - PL_hints |= HINT_BLOCK_SCOPE; - token_getmad($1,$$,'I'); - token_getmad($2,$$,'('); - token_getmad($4,$$,')'); - } - ; - -/* Real conditional expressions */ -cond : IF '(' remember mexpr ')' mblock else - { PL_copline = (line_t)($1)->tk_lval.ival; - $$ = block_end($3, - newCONDOP(0, $4, scope($6), $7)); - token_getmad($1,$$,'I'); - token_getmad($2,$$,'('); - token_getmad($5,$$,')'); - } - | UNLESS '(' remember miexpr ')' mblock else - { PL_copline = (line_t)($1)->tk_lval.ival; - $$ = block_end($3, - newCONDOP(0, $4, scope($6), $7)); - token_getmad($1,$$,'I'); - token_getmad($2,$$,'('); - token_getmad($5,$$,')'); - } - ; - -/* Cases for a switch statement */ -case : WHEN '(' remember mexpr ')' mblock - { $$ = block_end($3, - newWHENOP($4, scope($6))); } - | DEFAULT block - { $$ = newWHENOP(0, scope($2)); } - ; - -/* Continue blocks */ -cont : /* NULL */ - { $$ = Nullop; } - | CONTINUE block - { $$ = scope($2); - token_getmad($1,$$,'o'); - } - ; - -/* Loops: while, until, for, and a bare block */ -loop : label WHILE '(' remember texpr ')' mintro mblock cont - { OP *innerop; - PL_copline = (line_t)$2; - $$ = block_end($4, - newSTATEOP(0, ($1)->tk_lval.pval, - innerop = newWHILEOP(0, 1, (LOOP*)Nullop, - ($2)->tk_lval.ival, $5, $8, $9, $7))); - token_getmad($1,innerop,'L'); - token_getmad($2,innerop,'W'); - token_getmad($3,innerop,'('); - token_getmad($6,innerop,')'); - } - - | label UNTIL '(' remember iexpr ')' mintro mblock cont - { OP *innerop; - PL_copline = (line_t)$2; - $$ = block_end($4, - newSTATEOP(0, ($1)->tk_lval.pval, - newWHILEOP(0, 1, (LOOP*)Nullop, - ($2)->tk_lval.ival, $5, $8, $9, $7))); - token_getmad($1,innerop,'L'); - token_getmad($2,innerop,'W'); - token_getmad($3,innerop,'('); - token_getmad($6,innerop,')'); - } - | label FOR MY remember my_scalar '(' mexpr ')' mblock cont - { OP *innerop; - $$ = block_end($4, - innerop = newFOROP(0, ($1)->tk_lval.pval, (line_t)($2)->tk_lval.ival, $5, $7, $9, $10)); - token_getmad($1,((LISTOP*)innerop)->op_first,'L'); - token_getmad($2,((LISTOP*)innerop)->op_first->op_sibling,'W'); - token_getmad($3,((LISTOP*)innerop)->op_first->op_sibling,'d'); - token_getmad($6,((LISTOP*)innerop)->op_first->op_sibling,'('); - token_getmad($8,((LISTOP*)innerop)->op_first->op_sibling,')'); - } - | label FOR scalar '(' remember mexpr ')' mblock cont - { OP *innerop; - $$ = block_end($5, - innerop = newFOROP(0, ($1)->tk_lval.pval, (line_t)($2)->tk_lval.ival, mod($3, OP_ENTERLOOP), - $6, $8, $9)); - token_getmad($1,((LISTOP*)innerop)->op_first,'L'); - token_getmad($2,((LISTOP*)innerop)->op_first->op_sibling,'W'); - token_getmad($4,((LISTOP*)innerop)->op_first->op_sibling,'('); - token_getmad($7,((LISTOP*)innerop)->op_first->op_sibling,')'); - } - | label FOR '(' remember mexpr ')' mblock cont - { OP *innerop; - $$ = block_end($4, - innerop = newFOROP(0, ($1)->tk_lval.pval, (line_t)($2)->tk_lval.ival, Nullop, $5, $7, $8)); - token_getmad($1,((LISTOP*)innerop)->op_first,'L'); - token_getmad($2,((LISTOP*)innerop)->op_first->op_sibling,'W'); - token_getmad($3,((LISTOP*)innerop)->op_first->op_sibling,'('); - token_getmad($6,((LISTOP*)innerop)->op_first->op_sibling,')'); - } - | label FOR '(' remember mnexpr ';' texpr ';' mintro mnexpr ')' - mblock - /* basically fake up an initialize-while lineseq */ - { OP *forop; - PL_copline = (line_t)($2)->tk_lval.ival; - forop = newSTATEOP(0, ($1)->tk_lval.pval, - newWHILEOP(0, 1, (LOOP*)Nullop, - ($2)->tk_lval.ival, scalar($7), - $12, $10, $9)); - if (!$5) - $5 = newOP(OP_NULL, 0); - forop = newUNOP(OP_NULL, 0, append_elem(OP_LINESEQ, - newSTATEOP(0, - (($1)->tk_lval.pval - ?savepv(($1)->tk_lval.pval):Nullch), - $5), - forop)); - - token_getmad($2,forop,'3'); - token_getmad($3,forop,'('); - token_getmad($6,forop,'1'); - token_getmad($8,forop,'2'); - token_getmad($11,forop,')'); - token_getmad($1,forop,'L'); - $$ = block_end($4, forop); } - | label block cont /* a block is a loop that happens once */ - { $$ = newSTATEOP(0, ($1)->tk_lval.pval, - newWHILEOP(0, 1, (LOOP*)Nullop, - NOLINE, Nullop, $2, $3, 0)); - token_getmad($1,((LISTOP*)$$)->op_first,'L'); } - ; - -/* Switch blocks */ -switch : label GIVEN '(' remember mydefsv mexpr ')' mblock - { PL_copline = (line_t) $2; - $$ = block_end($4, - newSTATEOP(0, ($1)->tk_lval.pval, - newGIVENOP($6, scope($8), - (PADOFFSET) $5) )); } - ; - -/* determine whether there are any new my declarations */ -mintro : /* NULL */ - { $$ = (PL_min_intro_pending && - PL_max_intro_pending >= PL_min_intro_pending); - intro_my(); } - -/* Normal expression */ -nexpr : /* NULL */ - { $$ = Nullop; } - | sideff - ; - -/* Boolean expression */ -texpr : /* NULL means true */ - { YYSTYPE tmplval; - (void)scan_num("1", &tmplval); - $$ = tmplval.opval; } - | expr - ; - -/* Inverted boolean expression */ -iexpr : expr - { $$ = invert(scalar($1)); } - ; - -/* Expression with its own lexical scope */ -mexpr : expr - { $$ = $1; intro_my(); } - ; - -mnexpr : nexpr - { $$ = $1; intro_my(); } - ; - -miexpr : iexpr - { $$ = $1; intro_my(); } - ; - -/* Optional "MAIN:"-style loop labels */ -label : /* empty */ - { YYSTYPE tmplval; - tmplval.pval = Nullch; - $$ = newTOKEN(OP_NULL, tmplval, 0); } - | LABEL - ; - -/* Some kind of declaration - just hang on peg in the parse tree */ -decl : format - { $$ = $1; } - | subrout - { $$ = $1; } - | mysubrout - { $$ = $1; } - | package - { $$ = $1; } - | use - { $$ = $1; } - | peg - { $$ = $1; } - ; - -peg : PEG - { $$ = newOP(OP_NULL,0); - token_getmad($1,$$,'p'); - } - ; - -format : FORMAT startformsub formname block - { SvREFCNT_inc(PL_compcv); - $$ = newFORM($2, $3, $4); - prepend_madprops($1->tk_mad, $$, 'F'); - $1->tk_mad = 0; - token_free($1); - } - ; - -formname: WORD { $$ = $1; } - | /* NULL */ { $$ = Nullop; } - ; - -/* Unimplemented "my sub foo { }" */ -mysubrout: MYSUB startsub subname proto subattrlist subbody - { SvREFCNT_inc(PL_compcv); - $$ = newMYSUB($2, $3, $4, $5, $6); - token_getmad($1,$$,'d'); - } - ; - -/* Subroutine definition */ -subrout : SUB startsub subname proto subattrlist subbody - { SvREFCNT_inc(PL_compcv); - OP* o = newSVOP(OP_ANONCODE, 0, - (SV*)newATTRSUB($2, $3, $4, $5, $6)); - $$ = newOP(OP_NULL,0); - op_getmad(o,$$,'&'); - op_getmad($3,$$,'n'); - op_getmad($4,$$,'s'); - op_getmad($5,$$,'a'); - token_getmad($1,$$,'d'); - append_madprops($6->op_madprop, $$, 0); - $6->op_madprop = 0; - } - ; - -startsub: /* NULL */ /* start a regular subroutine scope */ - { $$ = start_subparse(FALSE, 0); - SAVEFREESV(PL_compcv); } - - ; - -startanonsub: /* NULL */ /* start an anonymous subroutine scope */ - { $$ = start_subparse(FALSE, CVf_ANON); - SAVEFREESV(PL_compcv); } - ; - -startformsub: /* NULL */ /* start a format subroutine scope */ - { $$ = start_subparse(TRUE, 0); - SAVEFREESV(PL_compcv); } - ; - -/* Name of a subroutine - must be a bareword, could be special */ -subname : WORD { const char *const name = SvPV_nolen_const(((SVOP*)$1)->op_sv); - if (strEQ(name, "BEGIN") || strEQ(name, "END") - || strEQ(name, "INIT") || strEQ(name, "CHECK") - || strEQ(name, "UNITCHECK")) - CvSPECIAL_on(PL_compcv); - $$ = $1; } - ; - -/* Subroutine prototype */ -proto : /* NULL */ - { $$ = Nullop; } - | THING - ; - -/* Optional list of subroutine attributes */ -subattrlist: /* NULL */ - { $$ = Nullop; } - | COLONATTR THING - { $$ = $2; - token_getmad($1,$$,':'); - } - | COLONATTR - { $$ = newOP(OP_NULL, 0); - token_getmad($1,$$,':'); - } - ; - -/* List of attributes for a "my" variable declaration */ -myattrlist: COLONATTR THING - { $$ = $2; - token_getmad($1,$$,':'); - } - | COLONATTR - { $$ = newOP(OP_NULL, 0); - token_getmad($1,$$,':'); - } - ; - -/* Subroutine body - either null or a block */ -subbody : block { $$ = $1; } - | ';' { $$ = newOP(OP_NULL,0); PL_expect = XSTATE; - token_getmad($1,$$,';'); - } - ; - -package : PACKAGE WORD ';' - { $$ = package($2); - token_getmad($1,$$,'o'); - token_getmad($3,$$,';'); - } - ; - -use : USE startsub - { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ } - WORD WORD listexpr ';' - { SvREFCNT_inc(PL_compcv); - $$ = utilize(($1)->tk_lval.ival, $2, $4, $5, $6); - token_getmad($1,$$,'o'); - token_getmad($7,$$,';'); - if (PL_rsfp_filters && AvFILLp(PL_rsfp_filters) >= 0) - append_madprops(newMADPROP('!', MAD_PV, "", 0), $$, 0); - } - ; - -/* Ordinary expressions; logical combinations */ -expr : expr ANDOP expr - { $$ = newLOGOP(OP_AND, 0, $1, $3); - token_getmad($2,$$,'o'); - } - | expr OROP expr - { $$ = newLOGOP(($2)->tk_lval.ival, 0, $1, $3); - token_getmad($2,$$,'o'); - } - | expr DOROP expr - { $$ = newLOGOP(OP_DOR, 0, $1, $3); - token_getmad($2,$$,'o'); - } - | argexpr %prec PREC_LOW - ; - -/* Expressions are a list of terms joined by commas */ -argexpr : argexpr ',' - { OP* op = newNULLLIST(); - token_getmad($2,op,','); - $$ = append_elem(OP_LIST, $1, op); - } - | argexpr ',' term - { - $3 = newUNOP(OP_NULL, 0, $3); - token_getmad($2,$3,','); - $$ = append_elem(OP_LIST, $1, $3); - } - | term %prec PREC_LOW - ; - -/* List operators */ -listop : LSTOP indirob argexpr /* print $fh @args */ - { $$ = convert(($1)->tk_lval.ival, OPf_STACKED, - prepend_elem(OP_LIST, newGVREF(($1)->tk_lval.ival,$2), $3) ); - token_getmad($1,$$,'o'); - } - | FUNC '(' indirob expr ')' /* print ($fh @args */ - { $$ = convert(($1)->tk_lval.ival, OPf_STACKED, - prepend_elem(OP_LIST, newGVREF(($1)->tk_lval.ival,$3), $4) ); - token_getmad($1,$$,'o'); - token_getmad($2,$$,'('); - token_getmad($5,$$,')'); - } - | term ARROW method '(' listexprcom ')' /* $foo->bar(list) */ - { $$ = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, scalar($1), $5), - newUNOP(OP_METHOD, 0, $3))); - token_getmad($2,$$,'A'); - token_getmad($4,$$,'('); - token_getmad($6,$$,')'); - } - | term ARROW method /* $foo->bar */ - { $$ = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, scalar($1), - newUNOP(OP_METHOD, 0, $3))); - token_getmad($2,$$,'A'); - } - | METHOD indirob listexpr /* new Class @args */ - { $$ = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, $2, $3), - newUNOP(OP_METHOD, 0, $1))); - } - | FUNCMETH indirob '(' listexprcom ')' /* method $object (@args) */ - { $$ = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, $2, $4), - newUNOP(OP_METHOD, 0, $1))); - token_getmad($3,$$,'('); - token_getmad($5,$$,')'); - } - | LSTOP listexpr /* print @args */ - { $$ = convert(($1)->tk_lval.ival, 0, $2); - token_getmad($1,$$,'o'); - } - | FUNC '(' listexprcom ')' /* print (@args) */ - { $$ = convert(($1)->tk_lval.ival, 0, $3); - token_getmad($1,$$,'o'); - token_getmad($2,$$,'('); - token_getmad($4,$$,')'); - } - | LSTOPSUB startanonsub block /* map { foo } ... */ - { SvREFCNT_inc(PL_compcv); - $3 = newANONATTRSUB($2, 0, Nullop, $3); } - listexpr %prec LSTOP /* ... @bar */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, $3, $5), $1)); - } - ; - -/* Names of methods. May use $object->$methodname */ -method : METHOD - | scalar - ; - -/* Some kind of subscripted expression */ -subscripted: star '{' expr ';' '}' /* *main::{something} */ - /* In this and all the hash accessors, ';' is - * provided by the tokeniser */ - { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3)); - PL_expect = XOPERATOR; - token_getmad($2,$$,'{'); - token_getmad($4,$$,';'); - token_getmad($5,$$,'}'); - } - | scalar '[' expr ']' /* $array[$element] */ - { $$ = newBINOP(OP_AELEM, 0, oopsAV($1), scalar($3)); - token_getmad($2,$$,'['); - token_getmad($4,$$,']'); - } - | term ARROW '[' expr ']' /* somearef->[$element] */ - { $$ = newBINOP(OP_AELEM, 0, - ref(newAVREF($1),OP_RV2AV), - scalar($4)); - token_getmad($2,$$,'a'); - token_getmad($3,$$,'['); - token_getmad($5,$$,']'); - } - | subscripted '[' expr ']' /* $foo->[$bar]->[$baz] */ - { $$ = newBINOP(OP_AELEM, 0, - ref(newAVREF($1),OP_RV2AV), - scalar($3)); - token_getmad($2,$$,'['); - token_getmad($4,$$,']'); - } - | scalar '{' expr ';' '}' /* $foo->{bar();} */ - { $$ = newBINOP(OP_HELEM, 0, oopsHV($1), jmaybe($3)); - PL_expect = XOPERATOR; - token_getmad($2,$$,'{'); - token_getmad($4,$$,';'); - token_getmad($5,$$,'}'); - } - | term ARROW '{' expr ';' '}' /* somehref->{bar();} */ - { $$ = newBINOP(OP_HELEM, 0, - ref(newHVREF($1),OP_RV2HV), - jmaybe($4)); - PL_expect = XOPERATOR; - token_getmad($2,$$,'a'); - token_getmad($3,$$,'{'); - token_getmad($5,$$,';'); - token_getmad($6,$$,'}'); - } - | subscripted '{' expr ';' '}' /* $foo->[bar]->{baz;} */ - { $$ = newBINOP(OP_HELEM, 0, - ref(newHVREF($1),OP_RV2HV), - jmaybe($3)); - PL_expect = XOPERATOR; - token_getmad($2,$$,'{'); - token_getmad($4,$$,';'); - token_getmad($5,$$,'}'); - } - | term ARROW '(' ')' /* $subref->() */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar($1))); - token_getmad($2,$$,'a'); - token_getmad($3,$$,'('); - token_getmad($4,$$,')'); - } - | term ARROW '(' expr ')' /* $subref->(@args) */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, $4, - newCVREF(0, scalar($1)))); - token_getmad($2,$$,'a'); - token_getmad($3,$$,'('); - token_getmad($5,$$,')'); - } - - | subscripted '(' expr ')' /* $foo->{bar}->(@args) */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, $3, - newCVREF(0, scalar($1)))); - token_getmad($2,$$,'('); - token_getmad($4,$$,')'); - } - | subscripted '(' ')' /* $foo->{bar}->() */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar($1))); - token_getmad($2,$$,'('); - token_getmad($3,$$,')'); - } - | '(' expr ')' '[' expr ']' /* list slice */ - { $$ = newSLICEOP(0, $5, $2); - token_getmad($1,$$,'('); - token_getmad($3,$$,')'); - token_getmad($4,$$,'['); - token_getmad($6,$$,']'); - } - | '(' ')' '[' expr ']' /* empty list slice! */ - { $$ = newSLICEOP(0, $4, Nullop); - token_getmad($1,$$,'('); - token_getmad($2,$$,')'); - token_getmad($3,$$,'['); - token_getmad($5,$$,']'); - } - ; - -/* Binary operators between terms */ -termbinop: term ASSIGNOP term /* $x = $y */ - { $$ = newASSIGNOP(OPf_STACKED, $1, ($2)->tk_lval.ival, $3); - token_getmad($2,$$,'o'); - } - | term POWOP term /* $x ** $y */ - { $$ = newBINOP(($2)->tk_lval.ival, 0, scalar($1), scalar($3)); - token_getmad($2,$$,'o'); - } - | term MULOP term /* $x * $y, $x x $y */ - { if (($2)->tk_lval.ival != OP_REPEAT) - scalar($1); - $$ = newBINOP(($2)->tk_lval.ival, 0, $1, scalar($3)); - token_getmad($2,$$,'o'); - } - | term ADDOP term /* $x + $y */ - { $$ = newBINOP(($2)->tk_lval.ival, 0, scalar($1), scalar($3)); - token_getmad($2,$$,'o'); - } - | term SHIFTOP term /* $x >> $y, $x << $y */ - { $$ = newBINOP(($2)->tk_lval.ival, 0, scalar($1), scalar($3)); - token_getmad($2,$$,'o'); - } - | term RELOP term /* $x > $y, etc. */ - { $$ = newBINOP(($2)->tk_lval.ival, 0, scalar($1), scalar($3)); - token_getmad($2,$$,'o'); - } - | term EQOP term /* $x == $y, $x eq $y */ - { $$ = newBINOP(($2)->tk_lval.ival, 0, scalar($1), scalar($3)); - token_getmad($2,$$,'o'); - } - | term BITANDOP term /* $x & $y */ - { $$ = newBINOP(($2)->tk_lval.ival, 0, scalar($1), scalar($3)); - token_getmad($2,$$,'o'); - } - | term BITOROP term /* $x | $y */ - { $$ = newBINOP(($2)->tk_lval.ival, 0, scalar($1), scalar($3)); - token_getmad($2,$$,'o'); - } - | term DOTDOT term /* $x..$y, $x...$y */ - { UNOP *op; - $$ = newRANGE(($2)->tk_lval.ival, scalar($1), scalar($3)); - op = (UNOP*)$$; - 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($2,(OP*)op,'o'); - } - | term ANDAND term /* $x && $y */ - { $$ = newLOGOP(OP_AND, 0, $1, $3); - token_getmad($2,$$,'o'); - } - | term OROR term /* $x || $y */ - { $$ = newLOGOP(OP_OR, 0, $1, $3); - token_getmad($2,$$,'o'); - } - | term DORDOR term /* $x // $y */ - { $$ = newLOGOP(OP_DOR, 0, $1, $3); - token_getmad($2,$$,'o'); - } - | term MATCHOP term /* $x =~ /$y/ */ - { $$ = bind_match(($2)->tk_lval.ival, $1, $3); - if ($$->op_type == OP_NOT) - token_getmad($2,((UNOP*)$$)->op_first,'~'); - else - token_getmad($2,$$,'~'); - } - ; - -/* Unary operators and terms */ -termunop : '-' term %prec UMINUS /* -$x */ - { $$ = newUNOP(OP_NEGATE, 0, scalar($2)); - token_getmad($1,$$,'o'); - } - | '+' term %prec UMINUS /* +$x */ - { $$ = newUNOP(OP_NULL, 0, $2); - token_getmad($1,$$,'+'); - } - | '!' term /* !$x */ - { $$ = newUNOP(OP_NOT, 0, scalar($2)); - token_getmad($1,$$,'o'); - } - | '~' term /* ~$x */ - { $$ = newUNOP(OP_COMPLEMENT, 0, scalar($2)); - token_getmad($1,$$,'o'); - } - | term POSTINC /* $x++ */ - { $$ = newUNOP(OP_POSTINC, 0, - mod(scalar($1), OP_POSTINC)); - token_getmad($2,$$,'o'); - } - | term POSTDEC /* $x-- */ - { $$ = newUNOP(OP_POSTDEC, 0, - mod(scalar($1), OP_POSTDEC)); - token_getmad($2,$$,'o'); - } - | PREINC term /* ++$x */ - { $$ = newUNOP(OP_PREINC, 0, - mod(scalar($2), OP_PREINC)); - token_getmad($1,$$,'o'); - } - | PREDEC term /* --$x */ - { $$ = newUNOP(OP_PREDEC, 0, - mod(scalar($2), OP_PREDEC)); - token_getmad($1,$$,'o'); - } - - ; - -/* Constructors for anonymous data */ -anonymous: '[' expr ']' - { $$ = newANONLIST($2); - token_getmad($1,$$,'['); - token_getmad($3,$$,']'); - } - | '[' ']' - { $$ = newANONLIST(Nullop); - token_getmad($1,$$,'['); - token_getmad($2,$$,']'); - } - | HASHBRACK expr ';' '}' %prec '(' /* { foo => "Bar" } */ - { $$ = newANONHASH($2); - token_getmad($1,$$,'{'); - token_getmad($3,$$,';'); - token_getmad($4,$$,'}'); - } - | HASHBRACK ';' '}' %prec '(' /* { } (';' by tokener) */ - { $$ = newANONHASH(Nullop); - token_getmad($1,$$,'{'); - token_getmad($2,$$,';'); - token_getmad($3,$$,'}'); - } - | ANONSUB startanonsub proto subattrlist block %prec '(' - { SvREFCNT_inc(PL_compcv); - $$ = newANONATTRSUB($2, $3, $4, $5); - token_getmad($1,$$,'o'); - op_getmad($3,$$,'s'); - op_getmad($4,$$,'a'); - } - - ; - -/* Things called with "do" */ -termdo : DO term %prec UNIOP /* do $filename */ - { $$ = dofile($2, $1); - token_getmad($1,$$,'o'); - } - | DO block %prec '(' /* do { code */ - { $$ = newUNOP(OP_NULL, OPf_SPECIAL, scope($2)); - token_getmad($1,$$,'D'); - } - | DO WORD '(' ')' /* do somesub() */ - { $$ = newUNOP(OP_ENTERSUB, - OPf_SPECIAL|OPf_STACKED, - prepend_elem(OP_LIST, - scalar(newCVREF( - (OPpENTERSUB_AMPER<<8), - scalar($2) - )),Nullop)); dep(); - token_getmad($1,$$,'o'); - token_getmad($3,$$,'('); - token_getmad($4,$$,')'); - } - | DO WORD '(' expr ')' /* do somesub(@args) */ - { $$ = newUNOP(OP_ENTERSUB, - OPf_SPECIAL|OPf_STACKED, - append_elem(OP_LIST, - $4, - scalar(newCVREF( - (OPpENTERSUB_AMPER<<8), - scalar($2) - )))); dep(); - token_getmad($1,$$,'o'); - token_getmad($3,$$,'('); - token_getmad($5,$$,')'); - } - | DO scalar '(' ')' /* do $subref () */ - { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, - prepend_elem(OP_LIST, - scalar(newCVREF(0,scalar($2))), Nullop)); dep(); - token_getmad($1,$$,'o'); - token_getmad($3,$$,'('); - token_getmad($4,$$,')'); - } - | DO scalar '(' expr ')' /* do $subref (@args) */ - { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, - prepend_elem(OP_LIST, - $4, - scalar(newCVREF(0,scalar($2))))); dep(); - token_getmad($1,$$,'o'); - token_getmad($3,$$,'('); - token_getmad($5,$$,')'); - } - - ; - -term : termbinop - | termunop - | anonymous - | termdo - | term '?' term ':' term - { $$ = newCONDOP(0, $1, $3, $5); - token_getmad($2,$$,'?'); - token_getmad($4,$$,':'); - } - | REFGEN term /* \$x, \@y, \%z */ - { $$ = newUNOP(OP_REFGEN, 0, mod($2,OP_REFGEN)); - token_getmad($1,$$,'o'); - } - | myattrterm %prec UNIOP - { $$ = $1; } - | LOCAL term %prec UNIOP - { $$ = localize($2,($1)->tk_lval.ival); - token_getmad($1,$$,'d'); - } - | '(' expr ')' - { $$ = sawparens(newUNOP(OP_NULL,0,$2)); - token_getmad($1,$$,'('); - token_getmad($3,$$,')'); - } - | '(' ')' - { $$ = sawparens(newNULLLIST()); - token_getmad($1,$$,'('); - token_getmad($2,$$,')'); - } - | scalar %prec '(' - { $$ = $1; } - | star %prec '(' - { $$ = $1; } - | hsh %prec '(' - { $$ = $1; } - | ary %prec '(' - { $$ = $1; } - | arylen %prec '(' /* $#x, $#{ something } */ - { $$ = newUNOP(OP_AV2ARYLEN, 0, ref($1, OP_AV2ARYLEN));} - | subscripted - { $$ = $1; } - | ary '[' expr ']' /* array slice */ - { $$ = prepend_elem(OP_ASLICE, - newOP(OP_PUSHMARK, 0), - newLISTOP(OP_ASLICE, 0, - list($3), - ref($1, OP_ASLICE))); - token_getmad($2,$$,'['); - token_getmad($4,$$,']'); - } - | ary '{' expr ';' '}' /* @hash{@keys} */ - { $$ = prepend_elem(OP_HSLICE, - newOP(OP_PUSHMARK, 0), - newLISTOP(OP_HSLICE, 0, - list($3), - ref(oopsHV($1), OP_HSLICE))); - PL_expect = XOPERATOR; - token_getmad($2,$$,'{'); - token_getmad($4,$$,';'); - token_getmad($5,$$,'}'); - } - | THING %prec '(' - { $$ = $1; } - | amper /* &foo; */ - { $$ = newUNOP(OP_ENTERSUB, 0, scalar($1)); } - | amper '(' ')' /* &foo() */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); - token_getmad($2,$$,'('); - token_getmad($3,$$,')'); - } - | amper '(' expr ')' /* &foo(@args) */ - { OP* op; - $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, $3, scalar($1))); - op = $$; - if (op->op_type == OP_CONST) { /* defeat const fold */ - op = (OP*)op->op_madprop->mad_val; - } - token_getmad($2,op,'('); - token_getmad($4,op,')'); - } - | NOAMP WORD listexpr /* foo(@args) */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, $3, scalar($2))); - token_getmad($1,$$,'o'); - } - | LOOPEX /* loop exiting command (goto, last, dump, etc) */ - { $$ = newOP(($1)->tk_lval.ival, OPf_SPECIAL); - PL_hints |= HINT_BLOCK_SCOPE; - token_getmad($1,$$,'o'); - } - | LOOPEX term - { $$ = newLOOPEX(($1)->tk_lval.ival,$2); - token_getmad($1,$$,'o'); - } - | NOTOP argexpr /* not $foo */ - { $$ = newUNOP(OP_NOT, 0, scalar($2)); - token_getmad($1,$$,'o'); - } - | UNIOP /* Unary op, $_ implied */ - { $$ = newOP(($1)->tk_lval.ival, 0); - token_getmad($1,$$,'o'); - } - | UNIOP block /* eval { foo }, I *think* */ - { $$ = newUNOP(($1)->tk_lval.ival, 0, $2); - token_getmad($1,$$,'o'); - } - | UNIOP term /* Unary op */ - { $$ = newUNOP(($1)->tk_lval.ival, 0, $2); - token_getmad($1,$$,'o'); - } - | REQUIRE /* require, $_ implied *//* FIMXE for MAD needed? */ - { $$ = newOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0); } - | REQUIRE term /* require Foo *//* FIMXE for MAD needed? */ - { $$ = newUNOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0, $2); } - | UNIOPSUB - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); } - | UNIOPSUB term /* Sub treated as unop */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, $2, scalar($1))); } - | FUNC0 /* Nullary operator */ - { $$ = newOP(($1)->tk_lval.ival, 0); - token_getmad($1,$$,'o'); - } - | FUNC0 '(' ')' - { $$ = newOP(($1)->tk_lval.ival, 0); - token_getmad($1,$$,'o'); - token_getmad($2,$$,'('); - token_getmad($3,$$,')'); - } - | FUNC0SUB /* Sub treated as nullop */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - scalar($1)); } - | FUNC1 '(' ')' /* not () */ - { $$ = newOP(($1)->tk_lval.ival, OPf_SPECIAL); - token_getmad($1,$$,'o'); - token_getmad($2,$$,'('); - token_getmad($3,$$,')'); - } - | FUNC1 '(' expr ')' /* not($foo) */ - { $$ = newUNOP(($1)->tk_lval.ival, 0, $3); - token_getmad($1,$$,'o'); - token_getmad($2,$$,'('); - token_getmad($4,$$,')'); - } - | PMFUNC '(' argexpr ')' /* m//, s///, tr/// */ - { $$ = pmruntime($1, $3, 1); - token_getmad($2,$$,'('); - token_getmad($4,$$,')'); - } - | WORD - | listop - ; - -/* "my" declarations, with optional attributes */ -myattrterm: MY myterm myattrlist - { $$ = my_attrs($2,$3); - token_getmad($1,$$,'d'); - append_madprops($3->op_madprop, $$, 'a'); - $3->op_madprop = 0; - } - | MY myterm - { $$ = localize($2,($1)->tk_lval.ival); - token_getmad($1,$$,'d'); - } - ; - -/* Things that can be "my"'d */ -myterm : '(' expr ')' - { $$ = sawparens($2); - token_getmad($1,$$,'('); - token_getmad($3,$$,')'); - } - | '(' ')' - { $$ = sawparens(newNULLLIST()); - token_getmad($1,$$,'('); - token_getmad($2,$$,')'); - } - | scalar %prec '(' - { $$ = $1; } - | hsh %prec '(' - { $$ = $1; } - | ary %prec '(' - { $$ = $1; } - ; - -/* Basic list expressions */ -listexpr: /* NULL */ %prec PREC_LOW - { $$ = Nullop; } - | argexpr %prec PREC_LOW - { $$ = $1; } - ; - -listexprcom: /* NULL */ - { $$ = Nullop; } - | expr - { $$ = $1; } - | expr ',' - { OP* op = newNULLLIST(); - token_getmad($2,op,','); - $$ = append_elem(OP_LIST, $1, op); - } - ; - -/* A little bit of trickery to make "for my $foo (@bar)" actually be - lexical */ -my_scalar: scalar - { PL_in_my = 0; $$ = my($1); } - ; - -amper : '&' indirob - { $$ = newCVREF(($1)->tk_lval.ival,$2); - token_getmad($1,$$,'&'); - } - ; - -scalar : '$' indirob - { $$ = newSVREF($2); - token_getmad($1,$$,'$'); - } - ; - -ary : '@' indirob - { $$ = newAVREF($2); - token_getmad($1,$$,'@'); - } - ; - -hsh : '%' indirob - { $$ = newHVREF($2); - token_getmad($1,$$,'%'); - } - ; - -arylen : DOLSHARP indirob - { $$ = newAVREF($2); - token_getmad($1,$$,'l'); - } - ; - -star : '*' indirob - { $$ = newGVREF(0,$2); - token_getmad($1,$$,'*'); - } - ; - -/* Indirect objects */ -indirob : WORD - { $$ = scalar($1); } - | scalar %prec PREC_LOW - { $$ = scalar($1); } - | block - { $$ = scope($1); } - - | PRIVATEREF - { $$ = $1; } - ; diff --git a/perly.act b/perly.act index f1b9340..2746a6d 100644 --- a/perly.act +++ b/perly.act @@ -1,1108 +1,1601 @@ case 2: -#line 105 "perly.y" - { (yyval.ival) = (yyvsp[-1].ival); newPROG(block_end((yyvsp[-1].ival),(yyvsp[0].opval))); ;} +#line 129 "perly.y" + { (yyval.ival) = (yyvsp[(1) - (2)].ival); newPROG(block_end((yyvsp[(1) - (2)].ival),(yyvsp[(2) - (2)].opval))); ;} break; case 3: -#line 110 "perly.y" - { if (PL_copline > (line_t)(yyvsp[-3].ival)) - PL_copline = (line_t)(yyvsp[-3].ival); - (yyval.opval) = block_end((yyvsp[-2].ival), (yyvsp[-1].opval)); ;} +#line 134 "perly.y" + { if (PL_copline > (line_t)IVAL((yyvsp[(1) - (4)].tkval))) + PL_copline = (line_t)IVAL((yyvsp[(1) - (4)].tkval)); + (yyval.opval) = block_end((yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (4)].tkval),(yyval.opval),'{'); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),'}'); + ;} break; case 4: -#line 116 "perly.y" +#line 143 "perly.y" { (yyval.ival) = block_start(TRUE); ;} break; case 5: -#line 120 "perly.y" +#line 147 "perly.y" { (yyval.ival) = (I32) allocmy("$_"); ;} break; case 6: -#line 124 "perly.y" +#line 151 "perly.y" { PL_expect = XSTATE; (yyval.ival) = block_start(TRUE); ;} break; case 7: -#line 131 "perly.y" - { if (PL_copline > (line_t)(yyvsp[-3].ival)) - PL_copline = (line_t)(yyvsp[-3].ival); - (yyval.opval) = block_end((yyvsp[-2].ival), (yyvsp[-1].opval)); ;} +#line 158 "perly.y" + { if (PL_copline > (line_t)IVAL((yyvsp[(1) - (4)].tkval))) + PL_copline = (line_t)IVAL((yyvsp[(1) - (4)].tkval)); + (yyval.opval) = block_end((yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (4)].tkval),(yyval.opval),'{'); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),'}'); + ;} break; case 8: -#line 137 "perly.y" +#line 167 "perly.y" { (yyval.ival) = block_start(FALSE); ;} break; case 9: -#line 141 "perly.y" +#line 171 "perly.y" { (yyval.ival) = PL_savestack_ix; ;} break; case 10: -#line 145 "perly.y" +#line 175 "perly.y" { (yyval.opval) = Nullop; ;} break; case 11: -#line 147 "perly.y" - { (yyval.opval) = (yyvsp[-1].opval); ;} +#line 177 "perly.y" + { + (yyval.opval) = IF_MAD( + append_list(OP_LINESEQ, + (LISTOP*)(yyvsp[(1) - (2)].opval), (LISTOP*)(yyvsp[(2) - (2)].opval)), + (yyvsp[(1) - (2)].opval)); + ;} break; case 12: -#line 149 "perly.y" - { LEAVE_SCOPE((yyvsp[-1].ival)); +#line 184 "perly.y" + { LEAVE_SCOPE((yyvsp[(2) - (3)].ival)); (yyval.opval) = append_list(OP_LINESEQ, - (LISTOP*)(yyvsp[-2].opval), (LISTOP*)(yyvsp[0].opval)); + (LISTOP*)(yyvsp[(1) - (3)].opval), (LISTOP*)(yyvsp[(3) - (3)].opval)); PL_pad_reset_pending = TRUE; - if ((yyvsp[-2].opval) && (yyvsp[0].opval)) PL_hints |= HINT_BLOCK_SCOPE; ;} + if ((yyvsp[(1) - (3)].opval) && (yyvsp[(3) - (3)].opval)) PL_hints |= HINT_BLOCK_SCOPE; ;} break; case 13: -#line 158 "perly.y" - { (yyval.opval) = newSTATEOP(0, (yyvsp[-1].pval), (yyvsp[0].opval)); ;} +#line 193 "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'); ;} break; case 15: -#line 161 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 197 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 16: -#line 163 "perly.y" - { (yyval.opval) = newSTATEOP(0, (yyvsp[-1].pval), (yyvsp[0].opval)); ;} +#line 199 "perly.y" + { (yyval.opval) = newSTATEOP(0, PVAL((yyvsp[(1) - (2)].p_tkval)), (yyvsp[(2) - (2)].opval)); ;} break; case 17: -#line 165 "perly.y" - { if ((yyvsp[-1].pval) != Nullch) { - (yyval.opval) = newSTATEOP(0, (yyvsp[-1].pval), newOP(OP_NULL, 0)); - } - else { - (yyval.opval) = Nullop; - PL_copline = NOLINE; - } - PL_expect = XSTATE; ;} +#line 201 "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)].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)].tkval),(yyval.opval),';'); + } + PL_expect = XSTATE; + ;} break; case 18: -#line 174 "perly.y" - { (yyval.opval) = newSTATEOP(0, (yyvsp[-2].pval), (yyvsp[-1].opval)); - PL_expect = XSTATE; ;} +#line 218 "perly.y" + { + (yyval.opval) = newSTATEOP(0, PVAL((yyvsp[(1) - (3)].p_tkval)), (yyvsp[(2) - (3)].opval)); + PL_expect = XSTATE; + DO_MAD( + /* sideff might already have a nexstate */ + OP* op = ((LISTOP*)(yyval.opval))->op_first; + if (op) { + 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)].tkval),op,';'); + } + ) + ;} break; case 19: -#line 180 "perly.y" +#line 237 "perly.y" { (yyval.opval) = Nullop; ;} break; case 20: -#line 182 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 239 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 21: -#line 184 "perly.y" - { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[0].opval), (yyvsp[-2].opval)); ;} +#line 241 "perly.y" + { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[(3) - (3)].opval), (yyvsp[(1) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'i'); + ;} break; case 22: -#line 186 "perly.y" - { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[0].opval), (yyvsp[-2].opval)); ;} +#line 245 "perly.y" + { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[(3) - (3)].opval), (yyvsp[(1) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'i'); + ;} break; case 23: -#line 188 "perly.y" - { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((yyvsp[0].opval)), (yyvsp[-2].opval)); ;} +#line 249 "perly.y" + { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((yyvsp[(3) - (3)].opval)), (yyvsp[(1) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'w'); + ;} break; case 24: -#line 190 "perly.y" - { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (yyvsp[0].opval), (yyvsp[-2].opval));;} +#line 253 "perly.y" + { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (yyvsp[(3) - (3)].opval), (yyvsp[(1) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'w'); + ;} break; case 25: -#line 192 "perly.y" - { (yyval.opval) = newFOROP(0, Nullch, (line_t)(yyvsp[-1].ival), - Nullop, (yyvsp[0].opval), (yyvsp[-2].opval), Nullop); ;} +#line 257 "perly.y" + { (yyval.opval) = newFOROP(0, Nullch, (line_t)IVAL((yyvsp[(2) - (3)].tkval)), + Nullop, (yyvsp[(3) - (3)].opval), (yyvsp[(1) - (3)].opval), Nullop); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),((LISTOP*)(yyval.opval))->op_first->op_sibling,'w'); + ;} break; case 26: -#line 198 "perly.y" +#line 265 "perly.y" { (yyval.opval) = Nullop; ;} break; case 27: -#line 200 "perly.y" - { ((yyvsp[0].opval))->op_flags |= OPf_PARENS; (yyval.opval) = scope((yyvsp[0].opval)); ;} +#line 267 "perly.y" + { ((yyvsp[(2) - (2)].opval))->op_flags |= OPf_PARENS; (yyval.opval) = scope((yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 28: -#line 202 "perly.y" - { PL_copline = (line_t)(yyvsp[-5].ival); - (yyval.opval) = newCONDOP(0, (yyvsp[-3].opval), scope((yyvsp[-1].opval)), (yyvsp[0].opval)); - PL_hints |= HINT_BLOCK_SCOPE; ;} +#line 271 "perly.y" + { PL_copline = (line_t)IVAL((yyvsp[(1) - (6)].tkval)); + (yyval.opval) = newCONDOP(0, (yyvsp[(3) - (6)].opval), scope((yyvsp[(5) - (6)].opval)), (yyvsp[(6) - (6)].opval)); + PL_hints |= HINT_BLOCK_SCOPE; + TOKEN_GETMAD((yyvsp[(1) - (6)].tkval),(yyval.opval),'I'); + TOKEN_GETMAD((yyvsp[(2) - (6)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(4) - (6)].tkval),(yyval.opval),')'); + ;} break; case 29: -#line 209 "perly.y" - { PL_copline = (line_t)(yyvsp[-6].ival); - (yyval.opval) = block_end((yyvsp[-4].ival), - newCONDOP(0, (yyvsp[-3].opval), scope((yyvsp[-1].opval)), (yyvsp[0].opval))); ;} +#line 282 "perly.y" + { PL_copline = (line_t)IVAL((yyvsp[(1) - (7)].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)].tkval),(yyval.opval),'I'); + TOKEN_GETMAD((yyvsp[(2) - (7)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(5) - (7)].tkval),(yyval.opval),')'); + ;} break; case 30: -#line 213 "perly.y" - { PL_copline = (line_t)(yyvsp[-6].ival); - (yyval.opval) = block_end((yyvsp[-4].ival), - newCONDOP(0, (yyvsp[-3].opval), scope((yyvsp[-1].opval)), (yyvsp[0].opval))); ;} +#line 290 "perly.y" + { PL_copline = (line_t)IVAL((yyvsp[(1) - (7)].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)].tkval),(yyval.opval),'I'); + TOKEN_GETMAD((yyvsp[(2) - (7)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(5) - (7)].tkval),(yyval.opval),')'); + ;} break; case 31: -#line 220 "perly.y" - { (yyval.opval) = block_end((yyvsp[-3].ival), - newWHENOP((yyvsp[-2].opval), scope((yyvsp[0].opval)))); ;} +#line 301 "perly.y" + { (yyval.opval) = block_end((yyvsp[(3) - (6)].ival), + newWHENOP((yyvsp[(4) - (6)].opval), scope((yyvsp[(6) - (6)].opval)))); ;} break; case 32: -#line 223 "perly.y" - { (yyval.opval) = newWHENOP(0, scope((yyvsp[0].opval))); ;} +#line 304 "perly.y" + { (yyval.opval) = newWHENOP(0, scope((yyvsp[(2) - (2)].opval))); ;} break; case 33: -#line 228 "perly.y" +#line 309 "perly.y" { (yyval.opval) = Nullop; ;} break; case 34: -#line 230 "perly.y" - { (yyval.opval) = scope((yyvsp[0].opval)); ;} +#line 311 "perly.y" + { (yyval.opval) = scope((yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 35: -#line 235 "perly.y" - { PL_copline = (line_t)(yyvsp[-7].ival); - (yyval.opval) = block_end((yyvsp[-5].ival), - newSTATEOP(0, (yyvsp[-8].pval), - newWHILEOP(0, 1, (LOOP*)Nullop, - (yyvsp[-7].ival), (yyvsp[-4].opval), (yyvsp[-1].opval), (yyvsp[0].opval), (yyvsp[-2].ival)))); ;} +#line 318 "perly.y" + { OP *innerop; + PL_copline = (line_t)(yyvsp[(2) - (9)].tkval); + (yyval.opval) = block_end((yyvsp[(4) - (9)].ival), + newSTATEOP(0, PVAL((yyvsp[(1) - (9)].p_tkval)), + innerop = newWHILEOP(0, 1, (LOOP*)Nullop, + IVAL((yyvsp[(2) - (9)].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)].tkval),innerop,'W'); + TOKEN_GETMAD((yyvsp[(3) - (9)].tkval),innerop,'('); + TOKEN_GETMAD((yyvsp[(6) - (9)].tkval),innerop,')'); + ;} break; case 36: -#line 241 "perly.y" - { PL_copline = (line_t)(yyvsp[-7].ival); - (yyval.opval) = block_end((yyvsp[-5].ival), - newSTATEOP(0, (yyvsp[-8].pval), - newWHILEOP(0, 1, (LOOP*)Nullop, - (yyvsp[-7].ival), (yyvsp[-4].opval), (yyvsp[-1].opval), (yyvsp[0].opval), (yyvsp[-2].ival)))); ;} +#line 331 "perly.y" + { OP *innerop; + PL_copline = (line_t)(yyvsp[(2) - (9)].tkval); + (yyval.opval) = block_end((yyvsp[(4) - (9)].ival), + newSTATEOP(0, PVAL((yyvsp[(1) - (9)].p_tkval)), + innerop = newWHILEOP(0, 1, (LOOP*)Nullop, + IVAL((yyvsp[(2) - (9)].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)].tkval),innerop,'W'); + TOKEN_GETMAD((yyvsp[(3) - (9)].tkval),innerop,'('); + TOKEN_GETMAD((yyvsp[(6) - (9)].tkval),innerop,')'); + ;} break; case 37: -#line 247 "perly.y" - { (yyval.opval) = block_end((yyvsp[-6].ival), - newFOROP(0, (yyvsp[-9].pval), (line_t)(yyvsp[-8].ival), (yyvsp[-5].opval), (yyvsp[-3].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); ;} +#line 343 "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)].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)].tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); + TOKEN_GETMAD((yyvsp[(3) - (10)].tkval),((LISTOP*)innerop)->op_first->op_sibling,'d'); + TOKEN_GETMAD((yyvsp[(6) - (10)].tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); + TOKEN_GETMAD((yyvsp[(8) - (10)].tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); + ;} break; case 38: -#line 250 "perly.y" - { (yyval.opval) = block_end((yyvsp[-4].ival), - newFOROP(0, (yyvsp[-8].pval), (line_t)(yyvsp[-7].ival), mod((yyvsp[-6].opval), OP_ENTERLOOP), - (yyvsp[-3].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); ;} +#line 354 "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)].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)].tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); + TOKEN_GETMAD((yyvsp[(4) - (9)].tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); + TOKEN_GETMAD((yyvsp[(7) - (9)].tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); + ;} break; case 39: -#line 254 "perly.y" - { (yyval.opval) = block_end((yyvsp[-4].ival), - newFOROP(0, (yyvsp[-7].pval), (line_t)(yyvsp[-6].ival), Nullop, (yyvsp[-3].opval), (yyvsp[-1].opval), (yyvsp[0].opval))); ;} +#line 364 "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)].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)].tkval),((LISTOP*)innerop)->op_first->op_sibling,'W'); + TOKEN_GETMAD((yyvsp[(3) - (8)].tkval),((LISTOP*)innerop)->op_first->op_sibling,'('); + TOKEN_GETMAD((yyvsp[(6) - (8)].tkval),((LISTOP*)innerop)->op_first->op_sibling,')'); + ;} break; case 40: -#line 259 "perly.y" +#line 376 "perly.y" { OP *forop; - PL_copline = (line_t)(yyvsp[-10].ival); - forop = newSTATEOP(0, (yyvsp[-11].pval), + PL_copline = (line_t)IVAL((yyvsp[(2) - (12)].tkval)); + forop = newSTATEOP(0, PVAL((yyvsp[(1) - (12)].p_tkval)), newWHILEOP(0, 1, (LOOP*)Nullop, - (yyvsp[-10].ival), scalar((yyvsp[-5].opval)), - (yyvsp[0].opval), (yyvsp[-2].opval), (yyvsp[-3].ival))); - if ((yyvsp[-7].opval)) { + IVAL((yyvsp[(2) - (12)].tkval)), scalar((yyvsp[(7) - (12)].opval)), + (yyvsp[(12) - (12)].opval), (yyvsp[(10) - (12)].opval), (yyvsp[(9) - (12)].ival))); +#ifdef MAD + if (!(yyvsp[(5) - (12)].opval)) + (yyvsp[(5) - (12)].opval) = newOP(OP_NULL, 0); + 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)), + forop)); + + token_getmad((yyvsp[(2) - (12)].tkval),forop,'3'); + token_getmad((yyvsp[(3) - (12)].tkval),forop,'('); + token_getmad((yyvsp[(6) - (12)].tkval),forop,'1'); + token_getmad((yyvsp[(8) - (12)].tkval),forop,'2'); + token_getmad((yyvsp[(11) - (12)].tkval),forop,')'); + token_getmad((yyvsp[(1) - (12)].p_tkval),forop,'L'); +#else + if ((yyvsp[(5) - (12)].opval)) { forop = append_elem(OP_LINESEQ, - newSTATEOP(0, ((yyvsp[-11].pval)?savepv((yyvsp[-11].pval)):Nullch), - (yyvsp[-7].opval)), + newSTATEOP(0, ((yyvsp[(1) - (12)].p_tkval)?savepv((yyvsp[(1) - (12)].p_tkval)):Nullch), + (yyvsp[(5) - (12)].opval)), forop); } - (yyval.opval) = block_end((yyvsp[-8].ival), forop); ;} + +#endif + (yyval.opval) = block_end((yyvsp[(4) - (12)].ival), forop); ;} break; case 41: -#line 274 "perly.y" - { (yyval.opval) = newSTATEOP(0, (yyvsp[-2].pval), +#line 410 "perly.y" + { (yyval.opval) = newSTATEOP(0, PVAL((yyvsp[(1) - (3)].p_tkval)), newWHILEOP(0, 1, (LOOP*)Nullop, - NOLINE, Nullop, (yyvsp[-1].opval), (yyvsp[0].opval), 0)); ;} + NOLINE, Nullop, (yyvsp[(2) - (3)].opval), (yyvsp[(3) - (3)].opval), 0)); + TOKEN_GETMAD((yyvsp[(1) - (3)].p_tkval),((LISTOP*)(yyval.opval))->op_first,'L'); ;} break; case 42: -#line 281 "perly.y" - { PL_copline = (line_t) (yyvsp[-6].ival); - (yyval.opval) = block_end((yyvsp[-4].ival), - newSTATEOP(0, (yyvsp[-7].pval), - newGIVENOP((yyvsp[-2].opval), scope((yyvsp[0].opval)), - (PADOFFSET) (yyvsp[-3].ival)) )); ;} +#line 418 "perly.y" + { PL_copline = (line_t) (yyvsp[(2) - (8)].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)) )); ;} break; case 43: -#line 290 "perly.y" +#line 427 "perly.y" { (yyval.ival) = (PL_min_intro_pending && PL_max_intro_pending >= PL_min_intro_pending); intro_my(); ;} break; case 44: -#line 296 "perly.y" +#line 433 "perly.y" { (yyval.opval) = Nullop; ;} break; case 46: -#line 302 "perly.y" - { (void)scan_num("1", &yylval); (yyval.opval) = yylval.opval; ;} +#line 439 "perly.y" + { YYSTYPE tmplval; + (void)scan_num("1", &tmplval); + (yyval.opval) = tmplval.opval; ;} break; case 48: -#line 308 "perly.y" - { (yyval.opval) = invert(scalar((yyvsp[0].opval))); ;} +#line 447 "perly.y" + { (yyval.opval) = invert(scalar((yyvsp[(1) - (1)].opval))); ;} break; case 49: -#line 313 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); intro_my(); ;} +#line 452 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); intro_my(); ;} break; case 50: -#line 317 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); intro_my(); ;} +#line 456 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); intro_my(); ;} break; case 51: -#line 321 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); intro_my(); ;} +#line 460 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); intro_my(); ;} break; case 52: -#line 326 "perly.y" - { (yyval.pval) = Nullch; ;} +#line 465 "perly.y" + { +#ifdef MAD + YYSTYPE tmplval; + tmplval.pval = Nullch; + (yyval.p_tkval) = newTOKEN(OP_NULL, tmplval, 0); +#else + (yyval.p_tkval) = Nullch; +#endif + ;} break; case 54: -#line 332 "perly.y" - { (yyval.ival) = 0; ;} +#line 479 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 55: -#line 334 "perly.y" - { (yyval.ival) = 0; ;} +#line 481 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 56: -#line 336 "perly.y" - { (yyval.ival) = 0; ;} +#line 483 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 57: -#line 338 "perly.y" - { (yyval.ival) = 0; ;} +#line 485 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 58: -#line 340 "perly.y" - { (yyval.ival) = 0; ;} +#line 487 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 59: -#line 344 "perly.y" - { SvREFCNT_inc(PL_compcv); - newFORM((yyvsp[-2].ival), (yyvsp[-1].opval), (yyvsp[0].opval)); ;} +#line 492 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 60: -#line 348 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 496 "perly.y" + { (yyval.opval) = newOP(OP_NULL,0); + TOKEN_GETMAD((yyvsp[(1) - (1)].tkval),(yyval.opval),'p'); + ;} break; case 61: -#line 349 "perly.y" - { (yyval.opval) = Nullop; ;} +#line 502 "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)].tkval)->tk_mad, (yyval.opval), 'F'); + (yyvsp[(1) - (4)].tkval)->tk_mad = 0; + token_free((yyvsp[(1) - (4)].tkval)); +#else + newFORM((yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].opval), (yyvsp[(4) - (4)].opval)); +#endif + ;} break; case 62: -#line 354 "perly.y" - { SvREFCNT_inc(PL_compcv); - newMYSUB((yyvsp[-4].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); ;} +#line 514 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 63: -#line 360 "perly.y" - { SvREFCNT_inc(PL_compcv); - newATTRSUB((yyvsp[-4].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); ;} +#line 515 "perly.y" + { (yyval.opval) = Nullop; ;} break; case 64: -#line 365 "perly.y" +#line 520 "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)].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)); +#endif + ;} + break; + + case 65: +#line 532 "perly.y" + { 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))); + (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)].tkval),(yyval.opval),'d'); + append_madprops((yyvsp[(6) - (6)].opval)->op_madprop, (yyval.opval), 0); + (yyvsp[(6) - (6)].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)); + (yyval.opval) = Nullop; +#endif + ;} + break; + + case 66: +#line 552 "perly.y" { (yyval.ival) = start_subparse(FALSE, 0); SAVEFREESV(PL_compcv); ;} break; - case 65: -#line 370 "perly.y" + case 67: +#line 558 "perly.y" { (yyval.ival) = start_subparse(FALSE, CVf_ANON); SAVEFREESV(PL_compcv); ;} break; - case 66: -#line 375 "perly.y" + case 68: +#line 563 "perly.y" { (yyval.ival) = start_subparse(TRUE, 0); SAVEFREESV(PL_compcv); ;} break; - case 67: -#line 380 "perly.y" - { const char *const name = SvPV_nolen_const(((SVOP*)(yyvsp[0].opval))->op_sv); + case 69: +#line 568 "perly.y" + { const char *const name = SvPV_nolen_const(((SVOP*)(yyvsp[(1) - (1)].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[0].opval); ;} - break; - - case 68: -#line 390 "perly.y" - { (yyval.opval) = Nullop; ;} + (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 70: -#line 396 "perly.y" +#line 578 "perly.y" { (yyval.opval) = Nullop; ;} break; - case 71: -#line 398 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} - break; - case 72: -#line 400 "perly.y" +#line 584 "perly.y" { (yyval.opval) = Nullop; ;} break; case 73: -#line 405 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 586 "perly.y" + { (yyval.opval) = (yyvsp[(2) - (2)].opval); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),':'); + ;} break; case 74: -#line 407 "perly.y" - { (yyval.opval) = Nullop; ;} +#line 590 "perly.y" + { (yyval.opval) = IF_MAD( + newOP(OP_NULL, 0), + Nullop + ); + TOKEN_GETMAD((yyvsp[(1) - (1)].tkval),(yyval.opval),':'); + ;} break; case 75: -#line 411 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 600 "perly.y" + { (yyval.opval) = (yyvsp[(2) - (2)].opval); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),':'); + ;} break; case 76: -#line 412 "perly.y" - { (yyval.opval) = Nullop; PL_expect = XSTATE; ;} +#line 604 "perly.y" + { (yyval.opval) = IF_MAD( + newOP(OP_NULL, 0), + Nullop + ); + TOKEN_GETMAD((yyvsp[(1) - (1)].tkval),(yyval.opval),':'); + ;} break; case 77: -#line 416 "perly.y" - { package((yyvsp[-1].opval)); ;} +#line 613 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 78: -#line 420 "perly.y" - { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ ;} +#line 614 "perly.y" + { (yyval.opval) = IF_MAD( + newOP(OP_NULL,0), + Nullop + ); + PL_expect = XSTATE; + TOKEN_GETMAD((yyvsp[(1) - (1)].tkval),(yyval.opval),';'); + ;} break; case 79: -#line 422 "perly.y" - { SvREFCNT_inc(PL_compcv); - utilize((yyvsp[-6].ival), (yyvsp[-5].ival), (yyvsp[-3].opval), (yyvsp[-2].opval), (yyvsp[-1].opval)); ;} +#line 624 "perly.y" + { +#ifdef MAD + (yyval.opval) = package((yyvsp[(2) - (3)].opval)); + token_getmad((yyvsp[(1) - (3)].tkval),(yyval.opval),'o'); + token_getmad((yyvsp[(3) - (3)].tkval),(yyval.opval),';'); +#else + package((yyvsp[(2) - (3)].opval)); +#endif + ;} break; case 80: -#line 428 "perly.y" - { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;} +#line 636 "perly.y" + { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ ;} break; case 81: -#line 430 "perly.y" - { (yyval.opval) = newLOGOP((yyvsp[-1].ival), 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;} +#line 638 "perly.y" + { SvREFCNT_inc(PL_compcv); +#ifdef MAD + (yyval.opval) = utilize(IVAL((yyvsp[(1) - (7)].tkval)), (yyvsp[(2) - (7)].ival), (yyvsp[(4) - (7)].opval), (yyvsp[(5) - (7)].opval), (yyvsp[(6) - (7)].opval)); + token_getmad((yyvsp[(1) - (7)].tkval),(yyval.opval),'o'); + token_getmad((yyvsp[(7) - (7)].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)].tkval)), (yyvsp[(2) - (7)].ival), (yyvsp[(4) - (7)].opval), (yyvsp[(5) - (7)].opval), (yyvsp[(6) - (7)].opval)); +#endif + ;} break; case 82: -#line 432 "perly.y" - { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;} +#line 653 "perly.y" + { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; - case 84: -#line 438 "perly.y" - { (yyval.opval) = (yyvsp[-1].opval); ;} + case 83: +#line 657 "perly.y" + { (yyval.opval) = newLOGOP(IVAL((yyvsp[(2) - (3)].tkval)), 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; - case 85: -#line 440 "perly.y" - { (yyval.opval) = append_elem(OP_LIST, (yyvsp[-2].opval), (yyvsp[0].opval)); ;} + case 84: +#line 661 "perly.y" + { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; - case 87: -#line 446 "perly.y" - { (yyval.opval) = convert((yyvsp[-2].ival), OPf_STACKED, - prepend_elem(OP_LIST, newGVREF((yyvsp[-2].ival),(yyvsp[-1].opval)), (yyvsp[0].opval)) ); ;} + case 86: +#line 669 "perly.y" + { +#ifdef MAD + OP* op = newNULLLIST(); + token_getmad((yyvsp[(2) - (2)].tkval),op,','); + (yyval.opval) = append_elem(OP_LIST, (yyvsp[(1) - (2)].opval), op); +#else + (yyval.opval) = (yyvsp[(1) - (2)].opval); +#endif + ;} break; - case 88: -#line 449 "perly.y" - { (yyval.opval) = convert((yyvsp[-4].ival), OPf_STACKED, - prepend_elem(OP_LIST, newGVREF((yyvsp[-4].ival),(yyvsp[-2].opval)), (yyvsp[-1].opval)) ); ;} + case 87: +#line 679 "perly.y" + { + DO_MAD( + (yyvsp[(3) - (3)].opval) = newUNOP(OP_NULL, 0, (yyvsp[(3) - (3)].opval)); + token_getmad((yyvsp[(2) - (3)].tkval),(yyvsp[(3) - (3)].opval),','); + ) + (yyval.opval) = append_elem(OP_LIST, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); + ;} break; case 89: -#line 452 "perly.y" - { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, scalar((yyvsp[-5].opval)), (yyvsp[-1].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[-3].opval)))); ;} +#line 691 "perly.y" + { (yyval.opval) = convert(IVAL((yyvsp[(1) - (3)].tkval)), OPf_STACKED, + prepend_elem(OP_LIST, newGVREF(IVAL((yyvsp[(1) - (3)].tkval)),(yyvsp[(2) - (3)].opval)), (yyvsp[(3) - (3)].opval)) ); + TOKEN_GETMAD((yyvsp[(1) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 90: -#line 457 "perly.y" - { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, scalar((yyvsp[-2].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[0].opval)))); ;} +#line 696 "perly.y" + { (yyval.opval) = convert(IVAL((yyvsp[(1) - (5)].tkval)), OPf_STACKED, + prepend_elem(OP_LIST, newGVREF(IVAL((yyvsp[(1) - (5)].tkval)),(yyvsp[(3) - (5)].opval)), (yyvsp[(4) - (5)].opval)) ); + TOKEN_GETMAD((yyvsp[(1) - (5)].tkval),(yyval.opval),'o'); + TOKEN_GETMAD((yyvsp[(2) - (5)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),')'); + ;} break; case 91: -#line 461 "perly.y" +#line 703 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, - prepend_elem(OP_LIST, (yyvsp[-1].opval), (yyvsp[0].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[-2].opval)))); ;} + 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)].tkval),(yyval.opval),'A'); + TOKEN_GETMAD((yyvsp[(4) - (6)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(6) - (6)].tkval),(yyval.opval),')'); + ;} break; case 92: -#line 466 "perly.y" +#line 712 "perly.y" { (yyval.opval) = convert(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, (yyvsp[-3].opval), (yyvsp[-1].opval)), - newUNOP(OP_METHOD, 0, (yyvsp[-4].opval)))); ;} + append_elem(OP_LIST, scalar((yyvsp[(1) - (3)].opval)), + newUNOP(OP_METHOD, 0, (yyvsp[(3) - (3)].opval)))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'A'); + ;} break; case 93: -#line 471 "perly.y" - { (yyval.opval) = convert((yyvsp[-1].ival), 0, (yyvsp[0].opval)); ;} +#line 718 "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)))); + ;} break; case 94: -#line 473 "perly.y" - { (yyval.opval) = convert((yyvsp[-3].ival), 0, (yyvsp[-1].opval)); ;} +#line 724 "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)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),')'); + ;} break; case 95: -#line 475 "perly.y" - { SvREFCNT_inc(PL_compcv); - (yyvsp[0].opval) = newANONATTRSUB((yyvsp[-1].ival), 0, Nullop, (yyvsp[0].opval)); ;} +#line 732 "perly.y" + { (yyval.opval) = convert(IVAL((yyvsp[(1) - (2)].tkval)), 0, (yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 96: -#line 478 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, - prepend_elem(OP_LIST, (yyvsp[-2].opval), (yyvsp[0].opval)), (yyvsp[-4].opval))); ;} +#line 736 "perly.y" + { (yyval.opval) = convert(IVAL((yyvsp[(1) - (4)].tkval)), 0, (yyvsp[(3) - (4)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (4)].tkval),(yyval.opval),'o'); + TOKEN_GETMAD((yyvsp[(2) - (4)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),')'); + ;} break; - case 99: -#line 492 "perly.y" - { (yyval.opval) = newBINOP(OP_GELEM, 0, (yyvsp[-4].opval), scalar((yyvsp[-2].opval))); - PL_expect = XOPERATOR; ;} + case 97: +#line 742 "perly.y" + { SvREFCNT_inc(PL_compcv); + (yyvsp[(3) - (3)].opval) = newANONATTRSUB((yyvsp[(2) - (3)].ival), 0, Nullop, (yyvsp[(3) - (3)].opval)); ;} break; - case 100: -#line 495 "perly.y" - { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((yyvsp[-3].opval)), scalar((yyvsp[-1].opval))); ;} + case 98: +#line 745 "perly.y" + { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, + prepend_elem(OP_LIST, (yyvsp[(3) - (5)].opval), (yyvsp[(5) - (5)].opval)), (yyvsp[(1) - (5)].opval))); + ;} break; case 101: -#line 497 "perly.y" - { (yyval.opval) = newBINOP(OP_AELEM, 0, - ref(newAVREF((yyvsp[-4].opval)),OP_RV2AV), - scalar((yyvsp[-1].opval)));;} +#line 760 "perly.y" + { (yyval.opval) = newBINOP(OP_GELEM, 0, (yyvsp[(1) - (5)].opval), scalar((yyvsp[(3) - (5)].opval))); + PL_expect = XOPERATOR; + TOKEN_GETMAD((yyvsp[(2) - (5)].tkval),(yyval.opval),'{'); + TOKEN_GETMAD((yyvsp[(4) - (5)].tkval),(yyval.opval),';'); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),'}'); + ;} break; case 102: -#line 501 "perly.y" - { (yyval.opval) = newBINOP(OP_AELEM, 0, - ref(newAVREF((yyvsp[-3].opval)),OP_RV2AV), - scalar((yyvsp[-1].opval)));;} +#line 767 "perly.y" + { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((yyvsp[(1) - (4)].opval)), scalar((yyvsp[(3) - (4)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (4)].tkval),(yyval.opval),'['); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),']'); + ;} break; case 103: -#line 505 "perly.y" - { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((yyvsp[-4].opval)), jmaybe((yyvsp[-2].opval))); - PL_expect = XOPERATOR; ;} +#line 772 "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)].tkval),(yyval.opval),'a'); + TOKEN_GETMAD((yyvsp[(3) - (5)].tkval),(yyval.opval),'['); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),']'); + ;} break; case 104: -#line 508 "perly.y" - { (yyval.opval) = newBINOP(OP_HELEM, 0, - ref(newHVREF((yyvsp[-5].opval)),OP_RV2HV), - jmaybe((yyvsp[-2].opval))); - PL_expect = XOPERATOR; ;} +#line 780 "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)].tkval),(yyval.opval),'['); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),']'); + ;} break; case 105: -#line 513 "perly.y" - { (yyval.opval) = newBINOP(OP_HELEM, 0, - ref(newHVREF((yyvsp[-4].opval)),OP_RV2HV), - jmaybe((yyvsp[-2].opval))); - PL_expect = XOPERATOR; ;} +#line 787 "perly.y" + { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((yyvsp[(1) - (5)].opval)), jmaybe((yyvsp[(3) - (5)].opval))); + PL_expect = XOPERATOR; + TOKEN_GETMAD((yyvsp[(2) - (5)].tkval),(yyval.opval),'{'); + TOKEN_GETMAD((yyvsp[(4) - (5)].tkval),(yyval.opval),';'); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),'}'); + ;} break; case 106: -#line 518 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar((yyvsp[-3].opval)))); ;} +#line 794 "perly.y" + { (yyval.opval) = newBINOP(OP_HELEM, 0, + ref(newHVREF((yyvsp[(1) - (6)].opval)),OP_RV2HV), + jmaybe((yyvsp[(4) - (6)].opval))); + PL_expect = XOPERATOR; + TOKEN_GETMAD((yyvsp[(2) - (6)].tkval),(yyval.opval),'a'); + TOKEN_GETMAD((yyvsp[(3) - (6)].tkval),(yyval.opval),'{'); + TOKEN_GETMAD((yyvsp[(5) - (6)].tkval),(yyval.opval),';'); + TOKEN_GETMAD((yyvsp[(6) - (6)].tkval),(yyval.opval),'}'); + ;} break; case 107: -#line 521 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[-1].opval), - newCVREF(0, scalar((yyvsp[-4].opval))))); ;} +#line 804 "perly.y" + { (yyval.opval) = newBINOP(OP_HELEM, 0, + ref(newHVREF((yyvsp[(1) - (5)].opval)),OP_RV2HV), + jmaybe((yyvsp[(3) - (5)].opval))); + PL_expect = XOPERATOR; + TOKEN_GETMAD((yyvsp[(2) - (5)].tkval),(yyval.opval),'{'); + TOKEN_GETMAD((yyvsp[(4) - (5)].tkval),(yyval.opval),';'); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),'}'); + ;} break; case 108: -#line 526 "perly.y" +#line 813 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[-1].opval), - newCVREF(0, scalar((yyvsp[-3].opval))))); ;} + newCVREF(0, scalar((yyvsp[(1) - (4)].opval)))); + TOKEN_GETMAD((yyvsp[(2) - (4)].tkval),(yyval.opval),'a'); + TOKEN_GETMAD((yyvsp[(3) - (4)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),')'); + ;} break; case 109: -#line 530 "perly.y" +#line 820 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar((yyvsp[-2].opval)))); ;} + append_elem(OP_LIST, (yyvsp[(4) - (5)].opval), + newCVREF(0, scalar((yyvsp[(1) - (5)].opval))))); + TOKEN_GETMAD((yyvsp[(2) - (5)].tkval),(yyval.opval),'a'); + TOKEN_GETMAD((yyvsp[(3) - (5)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),')'); + ;} break; case 110: -#line 533 "perly.y" - { (yyval.opval) = newSLICEOP(0, (yyvsp[-1].opval), (yyvsp[-4].opval)); ;} +#line 829 "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)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),')'); + ;} break; case 111: -#line 535 "perly.y" - { (yyval.opval) = newSLICEOP(0, (yyvsp[-1].opval), Nullop); ;} +#line 836 "perly.y" + { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, + newCVREF(0, scalar((yyvsp[(1) - (3)].opval)))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(3) - (3)].tkval),(yyval.opval),')'); + ;} break; case 112: -#line 540 "perly.y" - { (yyval.opval) = newASSIGNOP(OPf_STACKED, (yyvsp[-2].opval), (yyvsp[-1].ival), (yyvsp[0].opval)); ;} +#line 842 "perly.y" + { (yyval.opval) = newSLICEOP(0, (yyvsp[(5) - (6)].opval), (yyvsp[(2) - (6)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (6)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(3) - (6)].tkval),(yyval.opval),')'); + TOKEN_GETMAD((yyvsp[(4) - (6)].tkval),(yyval.opval),'['); + TOKEN_GETMAD((yyvsp[(6) - (6)].tkval),(yyval.opval),']'); + ;} break; case 113: -#line 542 "perly.y" - { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;} +#line 849 "perly.y" + { (yyval.opval) = newSLICEOP(0, (yyvsp[(4) - (5)].opval), Nullop); + TOKEN_GETMAD((yyvsp[(1) - (5)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(2) - (5)].tkval),(yyval.opval),')'); + TOKEN_GETMAD((yyvsp[(3) - (5)].tkval),(yyval.opval),'['); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),']'); + ;} break; case 114: -#line 544 "perly.y" - { if ((yyvsp[-1].ival) != OP_REPEAT) - scalar((yyvsp[-2].opval)); - (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, (yyvsp[-2].opval), scalar((yyvsp[0].opval))); ;} +#line 859 "perly.y" + { (yyval.opval) = newASSIGNOP(OPf_STACKED, (yyvsp[(1) - (3)].opval), IVAL((yyvsp[(2) - (3)].tkval)), (yyvsp[(3) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 115: -#line 548 "perly.y" - { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;} +#line 863 "perly.y" + { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 116: -#line 550 "perly.y" - { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;} +#line 867 "perly.y" + { if (IVAL((yyvsp[(2) - (3)].tkval)) != OP_REPEAT) + scalar((yyvsp[(1) - (3)].opval)); + (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].tkval)), 0, (yyvsp[(1) - (3)].opval), scalar((yyvsp[(3) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 117: -#line 552 "perly.y" - { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;} +#line 873 "perly.y" + { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 118: -#line 554 "perly.y" - { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;} +#line 877 "perly.y" + { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 119: -#line 556 "perly.y" - { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;} +#line 881 "perly.y" + { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 120: -#line 558 "perly.y" - { (yyval.opval) = newBINOP((yyvsp[-1].ival), 0, scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval))); ;} +#line 885 "perly.y" + { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 121: -#line 560 "perly.y" - { (yyval.opval) = newRANGE((yyvsp[-1].ival), scalar((yyvsp[-2].opval)), scalar((yyvsp[0].opval)));;} +#line 889 "perly.y" + { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 122: -#line 562 "perly.y" - { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;} +#line 893 "perly.y" + { (yyval.opval) = newBINOP(IVAL((yyvsp[(2) - (3)].tkval)), 0, scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 123: -#line 564 "perly.y" - { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;} +#line 897 "perly.y" + { + (yyval.opval) = newRANGE(IVAL((yyvsp[(2) - (3)].tkval)), scalar((yyvsp[(1) - (3)].opval)), scalar((yyvsp[(3) - (3)].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)].tkval),(OP*)op,'o'); + ) + ;} break; case 124: -#line 566 "perly.y" - { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[-2].opval), (yyvsp[0].opval)); ;} +#line 909 "perly.y" + { (yyval.opval) = newLOGOP(OP_AND, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 125: -#line 568 "perly.y" - { (yyval.opval) = bind_match((yyvsp[-1].ival), (yyvsp[-2].opval), (yyvsp[0].opval)); ;} +#line 913 "perly.y" + { (yyval.opval) = newLOGOP(OP_OR, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 126: -#line 573 "perly.y" - { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((yyvsp[0].opval))); ;} +#line 917 "perly.y" + { (yyval.opval) = newLOGOP(OP_DOR, 0, (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'o'); + ;} break; case 127: -#line 575 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 921 "perly.y" + { (yyval.opval) = bind_match(IVAL((yyvsp[(2) - (3)].tkval)), (yyvsp[(1) - (3)].opval), (yyvsp[(3) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval), + ((yyval.opval)->op_type == OP_NOT + ? ((UNOP*)(yyval.opval))->op_first : (yyval.opval)), + '~'); + ;} break; case 128: -#line 577 "perly.y" - { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[0].opval))); ;} +#line 931 "perly.y" + { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((yyvsp[(2) - (2)].opval))); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 129: -#line 579 "perly.y" - { (yyval.opval) = newUNOP(OP_COMPLEMENT, 0, scalar((yyvsp[0].opval)));;} +#line 935 "perly.y" + { (yyval.opval) = IF_MAD( + newUNOP(OP_NULL, 0, (yyvsp[(2) - (2)].opval)), + (yyvsp[(2) - (2)].opval) + ); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'+'); + ;} break; case 130: -#line 581 "perly.y" - { (yyval.opval) = newUNOP(OP_POSTINC, 0, - mod(scalar((yyvsp[-1].opval)), OP_POSTINC)); ;} +#line 942 "perly.y" + { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[(2) - (2)].opval))); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 131: -#line 584 "perly.y" - { (yyval.opval) = newUNOP(OP_POSTDEC, 0, - mod(scalar((yyvsp[-1].opval)), OP_POSTDEC)); ;} +#line 946 "perly.y" + { (yyval.opval) = newUNOP(OP_COMPLEMENT, 0, scalar((yyvsp[(2) - (2)].opval))); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 132: -#line 587 "perly.y" - { (yyval.opval) = newUNOP(OP_PREINC, 0, - mod(scalar((yyvsp[0].opval)), OP_PREINC)); ;} +#line 950 "perly.y" + { (yyval.opval) = newUNOP(OP_POSTINC, 0, + mod(scalar((yyvsp[(1) - (2)].opval)), OP_POSTINC)); + TOKEN_GETMAD((yyvsp[(2) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 133: -#line 590 "perly.y" - { (yyval.opval) = newUNOP(OP_PREDEC, 0, - mod(scalar((yyvsp[0].opval)), OP_PREDEC)); ;} +#line 955 "perly.y" + { (yyval.opval) = newUNOP(OP_POSTDEC, 0, + mod(scalar((yyvsp[(1) - (2)].opval)), OP_POSTDEC)); + TOKEN_GETMAD((yyvsp[(2) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 134: -#line 597 "perly.y" - { (yyval.opval) = newANONLIST((yyvsp[-1].opval)); ;} +#line 960 "perly.y" + { (yyval.opval) = newUNOP(OP_PREINC, 0, + mod(scalar((yyvsp[(2) - (2)].opval)), OP_PREINC)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 135: -#line 599 "perly.y" - { (yyval.opval) = newANONLIST(Nullop); ;} +#line 965 "perly.y" + { (yyval.opval) = newUNOP(OP_PREDEC, 0, + mod(scalar((yyvsp[(2) - (2)].opval)), OP_PREDEC)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 136: -#line 601 "perly.y" - { (yyval.opval) = newANONHASH((yyvsp[-2].opval)); ;} +#line 974 "perly.y" + { (yyval.opval) = newANONLIST((yyvsp[(2) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (3)].tkval),(yyval.opval),'['); + TOKEN_GETMAD((yyvsp[(3) - (3)].tkval),(yyval.opval),']'); + ;} break; case 137: -#line 603 "perly.y" - { (yyval.opval) = newANONHASH(Nullop); ;} +#line 979 "perly.y" + { (yyval.opval) = newANONLIST(Nullop); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'['); + TOKEN_GETMAD((yyvsp[(2) - (2)].tkval),(yyval.opval),']'); + ;} break; case 138: -#line 605 "perly.y" - { SvREFCNT_inc(PL_compcv); - (yyval.opval) = newANONATTRSUB((yyvsp[-3].ival), (yyvsp[-2].opval), (yyvsp[-1].opval), (yyvsp[0].opval)); ;} +#line 984 "perly.y" + { (yyval.opval) = newANONHASH((yyvsp[(2) - (4)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (4)].tkval),(yyval.opval),'{'); + TOKEN_GETMAD((yyvsp[(3) - (4)].tkval),(yyval.opval),';'); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),'}'); + ;} break; case 139: -#line 612 "perly.y" - { (yyval.opval) = dofile((yyvsp[0].opval), (yyvsp[-1].ival)); ;} +#line 990 "perly.y" + { (yyval.opval) = newANONHASH(Nullop); + TOKEN_GETMAD((yyvsp[(1) - (3)].tkval),(yyval.opval),'{'); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),';'); + TOKEN_GETMAD((yyvsp[(3) - (3)].tkval),(yyval.opval),'}'); + ;} break; case 140: -#line 614 "perly.y" - { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, scope((yyvsp[0].opval))); ;} +#line 996 "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)].tkval),(yyval.opval),'o'); + OP_GETMAD((yyvsp[(3) - (5)].opval),(yyval.opval),'s'); + OP_GETMAD((yyvsp[(4) - (5)].opval),(yyval.opval),'a'); + ;} break; case 141: -#line 616 "perly.y" +#line 1007 "perly.y" + { (yyval.opval) = dofile((yyvsp[(2) - (2)].opval), (yyvsp[(1) - (2)].tkval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} + break; + + case 142: +#line 1011 "perly.y" + { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, scope((yyvsp[(2) - (2)].opval))); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'D'); + ;} + break; + + case 143: +#line 1015 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, scalar(newCVREF( (OPpENTERSUB_AMPER<<8), - scalar((yyvsp[-2].opval)) - )),Nullop)); dep();;} + scalar((yyvsp[(2) - (4)].opval)) + )),Nullop)); dep(); + TOKEN_GETMAD((yyvsp[(1) - (4)].tkval),(yyval.opval),'o'); + TOKEN_GETMAD((yyvsp[(3) - (4)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),')'); + ;} break; - case 142: -#line 624 "perly.y" + case 144: +#line 1027 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, append_elem(OP_LIST, - (yyvsp[-1].opval), + (yyvsp[(4) - (5)].opval), scalar(newCVREF( (OPpENTERSUB_AMPER<<8), - scalar((yyvsp[-3].opval)) - )))); dep();;} + scalar((yyvsp[(2) - (5)].opval)) + )))); dep(); + TOKEN_GETMAD((yyvsp[(1) - (5)].tkval),(yyval.opval),'o'); + TOKEN_GETMAD((yyvsp[(3) - (5)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),')'); + ;} break; - case 143: -#line 633 "perly.y" + case 145: +#line 1040 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, - scalar(newCVREF(0,scalar((yyvsp[-2].opval)))), Nullop)); dep();;} + scalar(newCVREF(0,scalar((yyvsp[(2) - (4)].opval)))), Nullop)); dep(); + TOKEN_GETMAD((yyvsp[(1) - (4)].tkval),(yyval.opval),'o'); + TOKEN_GETMAD((yyvsp[(3) - (4)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),')'); + ;} break; - case 144: -#line 637 "perly.y" + case 146: +#line 1048 "perly.y" { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, - (yyvsp[-1].opval), - scalar(newCVREF(0,scalar((yyvsp[-3].opval)))))); dep();;} - break; - - case 149: -#line 649 "perly.y" - { (yyval.opval) = newCONDOP(0, (yyvsp[-4].opval), (yyvsp[-2].opval), (yyvsp[0].opval)); ;} - break; - - case 150: -#line 651 "perly.y" - { (yyval.opval) = newUNOP(OP_REFGEN, 0, mod((yyvsp[0].opval),OP_REFGEN)); ;} + (yyvsp[(4) - (5)].opval), + scalar(newCVREF(0,scalar((yyvsp[(2) - (5)].opval)))))); dep(); + TOKEN_GETMAD((yyvsp[(1) - (5)].tkval),(yyval.opval),'o'); + TOKEN_GETMAD((yyvsp[(3) - (5)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),')'); + ;} break; case 151: -#line 653 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1064 "perly.y" + { (yyval.opval) = newCONDOP(0, (yyvsp[(1) - (5)].opval), (yyvsp[(3) - (5)].opval), (yyvsp[(5) - (5)].opval)); + TOKEN_GETMAD((yyvsp[(2) - (5)].tkval),(yyval.opval),'?'); + TOKEN_GETMAD((yyvsp[(4) - (5)].tkval),(yyval.opval),':'); + ;} break; case 152: -#line 655 "perly.y" - { (yyval.opval) = localize((yyvsp[0].opval),(yyvsp[-1].ival)); ;} +#line 1069 "perly.y" + { (yyval.opval) = newUNOP(OP_REFGEN, 0, mod((yyvsp[(2) - (2)].opval),OP_REFGEN)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 153: -#line 657 "perly.y" - { (yyval.opval) = sawparens((yyvsp[-1].opval)); ;} +#line 1073 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 154: -#line 659 "perly.y" - { (yyval.opval) = sawparens(newNULLLIST()); ;} +#line 1075 "perly.y" + { (yyval.opval) = localize((yyvsp[(2) - (2)].opval),IVAL((yyvsp[(1) - (2)].tkval))); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'d'); + ;} break; case 155: -#line 661 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1079 "perly.y" + { (yyval.opval) = sawparens(IF_MAD(newUNOP(OP_NULL,0,(yyvsp[(2) - (3)].opval)), (yyvsp[(2) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(1) - (3)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(3) - (3)].tkval),(yyval.opval),')'); + ;} break; case 156: -#line 663 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1084 "perly.y" + { (yyval.opval) = sawparens(newNULLLIST()); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(2) - (2)].tkval),(yyval.opval),')'); + ;} break; case 157: -#line 665 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1089 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 158: -#line 667 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1091 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 159: -#line 669 "perly.y" - { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((yyvsp[0].opval), OP_AV2ARYLEN));;} +#line 1093 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 160: -#line 671 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1095 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 161: -#line 673 "perly.y" - { (yyval.opval) = prepend_elem(OP_ASLICE, - newOP(OP_PUSHMARK, 0), - newLISTOP(OP_ASLICE, 0, - list((yyvsp[-1].opval)), - ref((yyvsp[-3].opval), OP_ASLICE))); ;} +#line 1097 "perly.y" + { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((yyvsp[(1) - (1)].opval), OP_AV2ARYLEN));;} break; case 162: -#line 679 "perly.y" - { (yyval.opval) = prepend_elem(OP_HSLICE, - newOP(OP_PUSHMARK, 0), - newLISTOP(OP_HSLICE, 0, - list((yyvsp[-2].opval)), - ref(oopsHV((yyvsp[-4].opval)), OP_HSLICE))); - PL_expect = XOPERATOR; ;} +#line 1099 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 163: -#line 686 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1101 "perly.y" + { (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)].tkval),(yyval.opval),'['); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),']'); + ;} break; case 164: -#line 688 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((yyvsp[0].opval))); ;} +#line 1110 "perly.y" + { (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))); + PL_expect = XOPERATOR; + TOKEN_GETMAD((yyvsp[(2) - (5)].tkval),(yyval.opval),'{'); + TOKEN_GETMAD((yyvsp[(4) - (5)].tkval),(yyval.opval),';'); + TOKEN_GETMAD((yyvsp[(5) - (5)].tkval),(yyval.opval),'}'); + ;} break; case 165: -#line 690 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[-2].opval))); ;} +#line 1121 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 166: -#line 692 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[-1].opval), scalar((yyvsp[-3].opval)))); ;} +#line 1123 "perly.y" + { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((yyvsp[(1) - (1)].opval))); ;} break; case 167: -#line 695 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[0].opval), scalar((yyvsp[-1].opval)))); ;} +#line 1125 "perly.y" + { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[(1) - (3)].opval))); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(3) - (3)].tkval),(yyval.opval),')'); + ;} break; case 168: -#line 698 "perly.y" - { (yyval.opval) = newOP((yyvsp[0].ival), OPf_SPECIAL); - PL_hints |= HINT_BLOCK_SCOPE; ;} +#line 1130 "perly.y" + { + (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, (yyvsp[(3) - (4)].opval), scalar((yyvsp[(1) - (4)].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)].tkval),op,'('); + token_getmad((yyvsp[(4) - (4)].tkval),op,')'); + ) + ;} break; case 169: -#line 701 "perly.y" - { (yyval.opval) = newLOOPEX((yyvsp[-1].ival),(yyvsp[0].opval)); ;} +#line 1143 "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)].tkval),(yyval.opval),'o'); + ;} break; case 170: -#line 703 "perly.y" - { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[0].opval))); ;} +#line 1148 "perly.y" + { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (1)].tkval)), OPf_SPECIAL); + PL_hints |= HINT_BLOCK_SCOPE; + TOKEN_GETMAD((yyvsp[(1) - (1)].tkval),(yyval.opval),'o'); + ;} break; case 171: -#line 705 "perly.y" - { (yyval.opval) = newOP((yyvsp[0].ival), 0); ;} +#line 1153 "perly.y" + { (yyval.opval) = newLOOPEX(IVAL((yyvsp[(1) - (2)].tkval)),(yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 172: -#line 707 "perly.y" - { (yyval.opval) = newUNOP((yyvsp[-1].ival), 0, (yyvsp[0].opval)); ;} +#line 1157 "perly.y" + { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((yyvsp[(2) - (2)].opval))); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 173: -#line 709 "perly.y" - { (yyval.opval) = newUNOP((yyvsp[-1].ival), 0, (yyvsp[0].opval)); ;} +#line 1161 "perly.y" + { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (1)].tkval)), 0); + TOKEN_GETMAD((yyvsp[(1) - (1)].tkval),(yyval.opval),'o'); + ;} break; case 174: -#line 711 "perly.y" - { (yyval.opval) = newOP(OP_REQUIRE, (yyvsp[0].ival) ? OPf_SPECIAL : 0); ;} +#line 1165 "perly.y" + { (yyval.opval) = newUNOP(IVAL((yyvsp[(1) - (2)].tkval)), 0, (yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 175: -#line 713 "perly.y" - { (yyval.opval) = newUNOP(OP_REQUIRE, (yyvsp[-1].ival) ? OPf_SPECIAL : 0, (yyvsp[0].opval)); ;} +#line 1169 "perly.y" + { (yyval.opval) = newUNOP(IVAL((yyvsp[(1) - (2)].tkval)), 0, (yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'o'); + ;} break; case 176: -#line 715 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[0].opval))); ;} +#line 1173 "perly.y" + { (yyval.opval) = newOP(OP_REQUIRE, (yyvsp[(1) - (1)].tkval) ? OPf_SPECIAL : 0); ;} break; case 177: -#line 717 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, (yyvsp[0].opval), scalar((yyvsp[-1].opval)))); ;} +#line 1175 "perly.y" + { (yyval.opval) = newUNOP(OP_REQUIRE, (yyvsp[(1) - (2)].tkval) ? OPf_SPECIAL : 0, (yyvsp[(2) - (2)].opval)); ;} break; case 178: -#line 720 "perly.y" - { (yyval.opval) = newOP((yyvsp[0].ival), 0); ;} +#line 1177 "perly.y" + { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((yyvsp[(1) - (1)].opval))); ;} break; case 179: -#line 722 "perly.y" - { (yyval.opval) = newOP((yyvsp[-2].ival), 0); ;} +#line 1179 "perly.y" + { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, (yyvsp[(2) - (2)].opval), scalar((yyvsp[(1) - (2)].opval)))); ;} break; case 180: -#line 724 "perly.y" - { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, - scalar((yyvsp[0].opval))); ;} +#line 1182 "perly.y" + { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (1)].tkval)), 0); + TOKEN_GETMAD((yyvsp[(1) - (1)].tkval),(yyval.opval),'o'); + ;} break; case 181: -#line 727 "perly.y" - { (yyval.opval) = (yyvsp[-2].ival) == OP_NOT ? newUNOP((yyvsp[-2].ival), 0, newSVOP(OP_CONST, 0, newSViv(0))) - : newOP((yyvsp[-2].ival), OPf_SPECIAL); ;} +#line 1186 "perly.y" + { (yyval.opval) = newOP(IVAL((yyvsp[(1) - (3)].tkval)), 0); + TOKEN_GETMAD((yyvsp[(1) - (3)].tkval),(yyval.opval),'o'); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(3) - (3)].tkval),(yyval.opval),')'); + ;} break; case 182: -#line 730 "perly.y" - { (yyval.opval) = newUNOP((yyvsp[-3].ival), 0, (yyvsp[-1].opval)); ;} +#line 1192 "perly.y" + { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, + scalar((yyvsp[(1) - (1)].opval))); ;} break; case 183: -#line 732 "perly.y" - { (yyval.opval) = pmruntime((yyvsp[-3].opval), (yyvsp[-1].opval), 1); ;} +#line 1195 "perly.y" + { (yyval.opval) = (IVAL((yyvsp[(1) - (3)].tkval)) == OP_NOT) + ? newUNOP(IVAL((yyvsp[(1) - (3)].tkval)), 0, newSVOP(OP_CONST, 0, newSViv(0))) + : newOP(IVAL((yyvsp[(1) - (3)].tkval)), OPf_SPECIAL); + + TOKEN_GETMAD((yyvsp[(1) - (3)].tkval),(yyval.opval),'o'); + TOKEN_GETMAD((yyvsp[(2) - (3)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(3) - (3)].tkval),(yyval.opval),')'); + ;} break; - case 186: -#line 739 "perly.y" - { (yyval.opval) = my_attrs((yyvsp[-1].opval),(yyvsp[0].opval)); ;} + case 184: +#line 1204 "perly.y" + { (yyval.opval) = newUNOP(IVAL((yyvsp[(1) - (4)].tkval)), 0, (yyvsp[(3) - (4)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (4)].tkval),(yyval.opval),'o'); + TOKEN_GETMAD((yyvsp[(2) - (4)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),')'); + ;} break; - case 187: -#line 741 "perly.y" - { (yyval.opval) = localize((yyvsp[0].opval),(yyvsp[-1].ival)); ;} + case 185: +#line 1210 "perly.y" + { (yyval.opval) = pmruntime((yyvsp[(1) - (4)].opval), (yyvsp[(3) - (4)].opval), 1); + TOKEN_GETMAD((yyvsp[(2) - (4)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(4) - (4)].tkval),(yyval.opval),')'); + ;} break; case 188: -#line 746 "perly.y" - { (yyval.opval) = sawparens((yyvsp[-1].opval)); ;} +#line 1220 "perly.y" + { (yyval.opval) = my_attrs((yyvsp[(2) - (3)].opval),(yyvsp[(3) - (3)].opval)); + DO_MAD( + token_getmad((yyvsp[(1) - (3)].tkval),(yyval.opval),'d'); + append_madprops((yyvsp[(3) - (3)].opval)->op_madprop, (yyval.opval), 'a'); + (yyvsp[(3) - (3)].opval)->op_madprop = 0; + ) + ;} break; case 189: -#line 748 "perly.y" - { (yyval.opval) = sawparens(newNULLLIST()); ;} +#line 1228 "perly.y" + { (yyval.opval) = localize((yyvsp[(2) - (2)].opval),IVAL((yyvsp[(1) - (2)].tkval))); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'d'); + ;} break; case 190: -#line 750 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1235 "perly.y" + { (yyval.opval) = sawparens((yyvsp[(2) - (3)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (3)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(3) - (3)].tkval),(yyval.opval),')'); + ;} break; case 191: -#line 752 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1240 "perly.y" + { (yyval.opval) = sawparens(newNULLLIST()); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'('); + TOKEN_GETMAD((yyvsp[(2) - (2)].tkval),(yyval.opval),')'); + ;} break; case 192: -#line 754 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1245 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 193: -#line 759 "perly.y" - { (yyval.opval) = Nullop; ;} +#line 1247 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 194: -#line 761 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1249 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 195: -#line 765 "perly.y" +#line 1254 "perly.y" { (yyval.opval) = Nullop; ;} break; case 196: -#line 767 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1256 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 197: -#line 769 "perly.y" - { (yyval.opval) = (yyvsp[-1].opval); ;} +#line 1260 "perly.y" + { (yyval.opval) = Nullop; ;} break; case 198: -#line 775 "perly.y" - { PL_in_my = 0; (yyval.opval) = my((yyvsp[0].opval)); ;} +#line 1262 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} break; case 199: -#line 779 "perly.y" - { (yyval.opval) = newCVREF((yyvsp[-1].ival),(yyvsp[0].opval)); ;} +#line 1264 "perly.y" + { +#ifdef MAD + OP* op = newNULLLIST(); + token_getmad((yyvsp[(2) - (2)].tkval),op,','); + (yyval.opval) = append_elem(OP_LIST, (yyvsp[(1) - (2)].opval), op); +#else + (yyval.opval) = (yyvsp[(1) - (2)].opval); +#endif + + ;} break; case 200: -#line 783 "perly.y" - { (yyval.opval) = newSVREF((yyvsp[0].opval)); ;} +#line 1279 "perly.y" + { PL_in_my = 0; (yyval.opval) = my((yyvsp[(1) - (1)].opval)); ;} break; case 201: -#line 787 "perly.y" - { (yyval.opval) = newAVREF((yyvsp[0].opval)); ;} +#line 1283 "perly.y" + { (yyval.opval) = newCVREF(IVAL((yyvsp[(1) - (2)].tkval)),(yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'&'); + ;} break; case 202: -#line 791 "perly.y" - { (yyval.opval) = newHVREF((yyvsp[0].opval)); ;} +#line 1289 "perly.y" + { (yyval.opval) = newSVREF((yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'$'); + ;} break; case 203: -#line 795 "perly.y" - { (yyval.opval) = newAVREF((yyvsp[0].opval)); ;} +#line 1295 "perly.y" + { (yyval.opval) = newAVREF((yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'@'); + ;} break; case 204: -#line 799 "perly.y" - { (yyval.opval) = newGVREF(0,(yyvsp[0].opval)); ;} +#line 1301 "perly.y" + { (yyval.opval) = newHVREF((yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'%'); + ;} break; case 205: -#line 804 "perly.y" - { (yyval.opval) = scalar((yyvsp[0].opval)); ;} +#line 1307 "perly.y" + { (yyval.opval) = newAVREF((yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'l'); + ;} break; case 206: -#line 806 "perly.y" - { (yyval.opval) = scalar((yyvsp[0].opval)); ;} +#line 1313 "perly.y" + { (yyval.opval) = newGVREF(0,(yyvsp[(2) - (2)].opval)); + TOKEN_GETMAD((yyvsp[(1) - (2)].tkval),(yyval.opval),'*'); + ;} break; case 207: -#line 808 "perly.y" - { (yyval.opval) = scope((yyvsp[0].opval)); ;} +#line 1320 "perly.y" + { (yyval.opval) = scalar((yyvsp[(1) - (1)].opval)); ;} break; case 208: -#line 811 "perly.y" - { (yyval.opval) = (yyvsp[0].opval); ;} +#line 1322 "perly.y" + { (yyval.opval) = scalar((yyvsp[(1) - (1)].opval)); ;} break; + case 209: +#line 1324 "perly.y" + { (yyval.opval) = scope((yyvsp[(1) - (1)].opval)); ;} + break; + + case 210: +#line 1327 "perly.y" + { (yyval.opval) = (yyvsp[(1) - (1)].opval); ;} + break; + + +/* Line 1267 of yacc.c. */ default: break; diff --git a/perly.c b/perly.c index 50a998e..031e947 100644 --- a/perly.c +++ b/perly.c @@ -7,8 +7,8 @@ * * Note that this file was originally generated as an output from * GNU bison version 1.875, but now the code is statically maintained - * and edited; the bits that are dependent on perly.y/madly.y are now - * #included from the files perly.tab/madly.tab and perly.act/madly.act. + * and edited; the bits that are dependent on perly.y are now + * #included from the files perly.tab and perly.act. * * Here is an important copyright statement from the original, generated * file: @@ -20,8 +20,8 @@ * * Note that this file is also #included in madly.c, to allow compilation * of a second parser, Perl_madparse, that is identical to Perl_yyparse, - * but which includes the parser tables from madly.{tab,act} rather than - * perly.{tab,act}. This is controlled by the PERL_IN_MADLY_C define. + * but which includes extra code for dumping the parse tree. + * This is controlled by the PERL_IN_MADLY_C define. */ @@ -45,12 +45,8 @@ typedef signed char yysigned_char; # define YYDEBUG 0 #endif -/* contains all the parser state tables; auto-generated from perly.y/madly.y */ -#ifdef PERL_IN_MADLY_C -# include "madly.tab" -#else -# include "perly.tab" -#endif +/* contains all the parser state tables; auto-generated from perly.y */ +#include "perly.tab" # define YYSIZE_T size_t @@ -435,12 +431,10 @@ Perl_yyparse (pTHX) /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((Perl_debug_log, "Reading a token: ")); -#ifndef PERL_IN_MADLY_C -# ifdef PERL_MAD +#ifdef PERL_IN_MADLY_C yychar = PL_madskills ? madlex() : yylex(); -# else +#else yychar = yylex(); -# endif #endif # ifdef EBCDIC @@ -530,15 +524,32 @@ Perl_yyparse (pTHX) YY_REDUCE_PRINT (yyn); switch (yyn) { -/* contains all the rule actions; auto-generated from perly.y or madly.y */ #define dep() deprecate("\"do\" to call subroutines") + #ifdef PERL_IN_MADLY_C -# include "madly.act" +# define IVAL(i) (i)->tk_lval.ival +# define PVAL(p) (p)->tk_lval.pval +# define TOKEN_GETMAD(a,b,c) token_getmad((a),(b),(c)) +# define TOKEN_FREE(a) token_free(a) +# define OP_GETMAD(a,b,c) op_getmad((a),(b),(c)) +# define IF_MAD(a,b) (a) +# define DO_MAD(a) a +# define MAD #else -# include "perly.act" +# define IVAL(i) (i) +# define PVAL(p) (p) +# define TOKEN_GETMAD(a,b,c) +# define TOKEN_FREE(a) +# define OP_GETMAD(a,b,c) +# define IF_MAD(a,b) (b) +# define DO_MAD(a) +# undef MAD #endif +/* contains all the rule actions; auto-generated from perly.y */ +#include "perly.act" + } yyvsp -= yylen; diff --git a/perly.h b/perly.h index 38bad2a..cadd593 100644 --- a/perly.h +++ b/perly.h @@ -1,8 +1,10 @@ #ifdef PERL_CORE -/* A Bison parser, made by GNU Bison 2.1. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,10 +21,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE @@ -174,17 +184,23 @@ #endif /* PERL_CORE */ -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -typedef union YYSTYPE { +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ I32 ival; char *pval; -#ifdef PERL_MAD - TOKEN* tkval; -#endif OP *opval; GV *gvval; -} YYSTYPE; -/* Line 1447 of yacc.c. */ +#ifdef PERL_IN_MADLY_C + TOKEN* p_tkval; + TOKEN* tkval; +#else + char *p_tkval; + I32 tkval; +#endif +} +/* Line 1529 of yacc.c. */ + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -192,5 +208,3 @@ typedef union YYSTYPE { - - diff --git a/perly.tab b/perly.tab index 51fc317..42f6147 100644 --- a/perly.tab +++ b/perly.tab @@ -1,15 +1,15 @@ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2065 +#define YYLAST 2064 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 90 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 65 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 208 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 418 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 66 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 210 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 420 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -19,21 +19,21 @@ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 67, 2, 2, 86, 88, 50, 2, - 78, 77, 89, 85, 56, 84, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 59, 82, - 2, 2, 2, 58, 87, 2, 2, 2, 2, 2, + 2, 2, 2, 77, 2, 2, 9, 11, 13, 2, + 88, 87, 12, 8, 66, 7, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 69, 14, + 2, 2, 2, 68, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 79, 2, 83, 2, 2, 2, 2, 2, 2, + 2, 5, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 3, 2, 81, 68, 2, 2, 2, + 2, 2, 2, 3, 2, 4, 78, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -46,20 +46,20 @@ static const unsigned char yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 51, 52, 53, 54, 55, 57, - 60, 61, 62, 63, 64, 65, 66, 69, 70, 71, - 72, 73, 74, 75, 76, 80 + 2, 2, 2, 2, 2, 2, 1, 2, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, + 70, 71, 72, 73, 74, 75, 76, 79, 80, 81, + 82, 83, 84, 85, 86, 89 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned short int yyprhs[] = +static const yytype_uint16 yyprhs[] = { 0, 0, 3, 6, 11, 12, 13, 14, 19, 20, 21, 22, 25, 29, 32, 34, 36, 39, 42, 46, @@ -67,827 +67,833 @@ static const unsigned short int yyprhs[] = 89, 97, 104, 107, 108, 111, 121, 131, 142, 152, 161, 174, 178, 187, 188, 189, 191, 192, 194, 196, 198, 200, 202, 203, 205, 207, 209, 211, 213, 215, - 220, 222, 223, 230, 237, 238, 239, 240, 242, 243, - 245, 246, 249, 251, 254, 256, 258, 260, 264, 265, - 273, 277, 281, 285, 287, 290, 294, 296, 300, 306, - 313, 317, 321, 327, 330, 335, 336, 342, 344, 346, - 352, 357, 363, 368, 374, 381, 387, 392, 398, 403, - 407, 414, 420, 424, 428, 432, 436, 440, 444, 448, - 452, 456, 460, 464, 468, 472, 476, 479, 482, 485, - 488, 491, 494, 497, 500, 504, 507, 512, 516, 522, - 525, 528, 533, 539, 544, 550, 552, 554, 556, 558, - 564, 567, 569, 572, 576, 579, 581, 583, 585, 587, - 589, 591, 596, 602, 604, 606, 610, 615, 619, 621, - 624, 627, 629, 632, 635, 637, 640, 642, 645, 647, - 651, 653, 657, 662, 667, 669, 671, 675, 678, 682, - 685, 687, 689, 691, 692, 694, 695, 697, 700, 702, - 705, 708, 711, 714, 717, 720, 722, 724, 726 + 217, 219, 224, 226, 227, 234, 241, 242, 243, 244, + 246, 247, 249, 250, 253, 255, 258, 260, 262, 264, + 268, 269, 277, 281, 285, 289, 291, 294, 298, 300, + 304, 310, 317, 321, 325, 331, 334, 339, 340, 346, + 348, 350, 356, 361, 367, 372, 378, 385, 391, 396, + 402, 407, 411, 418, 424, 428, 432, 436, 440, 444, + 448, 452, 456, 460, 464, 468, 472, 476, 480, 483, + 486, 489, 492, 495, 498, 501, 504, 508, 511, 516, + 520, 526, 529, 532, 537, 543, 548, 554, 556, 558, + 560, 562, 568, 571, 573, 576, 580, 583, 585, 587, + 589, 591, 593, 595, 600, 606, 608, 610, 614, 619, + 623, 625, 628, 631, 633, 636, 639, 641, 644, 646, + 649, 651, 655, 657, 661, 666, 671, 673, 675, 679, + 682, 686, 689, 691, 693, 695, 696, 698, 699, 701, + 704, 706, 709, 712, 715, 718, 721, 724, 726, 728, + 730 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short int yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = { - 91, 0, -1, 95, 99, -1, 3, 93, 99, 81, - -1, -1, -1, -1, 3, 97, 99, 81, -1, -1, + 91, 0, -1, 95, 99, -1, 3, 93, 99, 4, + -1, -1, -1, -1, 3, 97, 99, 4, -1, -1, -1, -1, 99, 116, -1, 99, 98, 100, -1, 115, 103, -1, 106, -1, 107, -1, 115, 104, -1, 115, - 82, -1, 115, 101, 82, -1, 1, -1, 132, -1, - 132, 21, 132, -1, 132, 22, 132, -1, 132, 19, - 132, -1, 132, 20, 111, -1, 132, 26, 132, -1, - -1, 23, 96, -1, 24, 78, 112, 77, 96, 102, - -1, 21, 78, 93, 112, 77, 96, 102, -1, 22, - 78, 93, 114, 77, 96, 102, -1, 28, 78, 93, - 112, 77, 96, -1, 29, 92, -1, -1, 25, 92, - -1, 115, 19, 78, 93, 110, 77, 108, 96, 105, - -1, 115, 20, 78, 93, 111, 77, 108, 96, 105, - -1, 115, 26, 46, 93, 147, 78, 112, 77, 96, - 105, -1, 115, 26, 149, 78, 93, 112, 77, 96, - 105, -1, 115, 26, 78, 93, 112, 77, 96, 105, - -1, 115, 26, 78, 93, 113, 82, 110, 82, 108, - 113, 77, 96, -1, 115, 92, 105, -1, 115, 27, - 78, 93, 94, 112, 77, 96, -1, -1, -1, 101, - -1, -1, 132, -1, 132, -1, 132, -1, 109, -1, - 111, -1, -1, 13, -1, 117, -1, 120, -1, 119, - -1, 129, -1, 130, -1, 14, 123, 118, 92, -1, - 4, -1, -1, 47, 121, 124, 125, 126, 128, -1, - 15, 121, 124, 125, 126, 128, -1, -1, -1, -1, - 4, -1, -1, 7, -1, -1, 49, 7, -1, 49, - -1, 49, 7, -1, 49, -1, 92, -1, 82, -1, - 17, 4, 82, -1, -1, 18, 121, 131, 4, 4, - 145, 82, -1, 132, 54, 132, -1, 132, 53, 132, - -1, 132, 52, 132, -1, 133, -1, 133, 56, -1, - 133, 56, 142, -1, 142, -1, 36, 154, 133, -1, - 34, 78, 154, 132, 77, -1, 142, 76, 136, 78, - 146, 77, -1, 142, 76, 136, -1, 5, 154, 145, - -1, 6, 154, 78, 146, 77, -1, 36, 145, -1, - 34, 78, 146, 77, -1, -1, 12, 122, 92, 135, - 145, -1, 5, -1, 149, -1, 153, 3, 132, 82, - 81, -1, 149, 79, 132, 83, -1, 142, 76, 79, - 132, 83, -1, 137, 79, 132, 83, -1, 149, 3, - 132, 82, 81, -1, 142, 76, 3, 132, 82, 81, - -1, 137, 3, 132, 82, 81, -1, 142, 76, 78, - 77, -1, 142, 76, 78, 132, 77, -1, 137, 78, - 132, 77, -1, 137, 78, 77, -1, 78, 132, 77, - 79, 132, 83, -1, 78, 77, 79, 132, 83, -1, - 142, 57, 142, -1, 142, 71, 142, -1, 142, 39, - 142, -1, 142, 40, 142, -1, 142, 65, 142, -1, - 142, 37, 142, -1, 142, 38, 142, -1, 142, 64, - 142, -1, 142, 63, 142, -1, 142, 31, 142, -1, - 142, 62, 142, -1, 142, 61, 142, -1, 142, 60, - 142, -1, 142, 66, 142, -1, 84, 142, -1, 85, - 142, -1, 67, 142, -1, 68, 142, -1, 142, 73, - -1, 142, 72, -1, 75, 142, -1, 74, 142, -1, - 79, 132, 83, -1, 79, 83, -1, 43, 132, 82, - 81, -1, 43, 82, 81, -1, 16, 122, 125, 126, - 92, -1, 42, 142, -1, 42, 92, -1, 42, 4, - 78, 77, -1, 42, 4, 78, 132, 77, -1, 42, - 149, 78, 77, -1, 42, 149, 78, 132, 77, -1, - 138, -1, 139, -1, 140, -1, 141, -1, 142, 58, - 142, 59, 142, -1, 69, 142, -1, 143, -1, 45, - 142, -1, 78, 132, 77, -1, 78, 77, -1, 149, - -1, 153, -1, 151, -1, 150, -1, 152, -1, 137, - -1, 150, 79, 132, 83, -1, 150, 3, 132, 82, - 81, -1, 7, -1, 148, -1, 148, 78, 77, -1, - 148, 78, 132, 77, -1, 44, 4, 145, -1, 30, - -1, 30, 142, -1, 55, 133, -1, 35, -1, 35, - 92, -1, 35, 142, -1, 48, -1, 48, 142, -1, - 11, -1, 11, 142, -1, 32, -1, 32, 78, 77, - -1, 10, -1, 33, 78, 77, -1, 33, 78, 132, - 77, -1, 8, 78, 133, 77, -1, 4, -1, 134, - -1, 46, 144, 127, -1, 46, 144, -1, 78, 132, - 77, -1, 78, 77, -1, 149, -1, 151, -1, 150, - -1, -1, 133, -1, -1, 132, -1, 132, 56, -1, - 149, -1, 50, 154, -1, 86, 154, -1, 87, 154, - -1, 88, 154, -1, 41, 154, -1, 89, 154, -1, - 4, -1, 149, -1, 92, -1, 9, -1 + 14, -1, 115, 101, 14, -1, 1, -1, 133, -1, + 133, 32, 133, -1, 133, 33, 133, -1, 133, 30, + 133, -1, 133, 31, 111, -1, 133, 37, 133, -1, + -1, 34, 96, -1, 35, 88, 112, 87, 96, 102, + -1, 32, 88, 93, 112, 87, 96, 102, -1, 33, + 88, 93, 114, 87, 96, 102, -1, 39, 88, 93, + 112, 87, 96, -1, 40, 92, -1, -1, 36, 92, + -1, 115, 30, 88, 93, 110, 87, 108, 96, 105, + -1, 115, 31, 88, 93, 111, 87, 108, 96, 105, + -1, 115, 37, 57, 93, 148, 88, 112, 87, 96, + 105, -1, 115, 37, 150, 88, 93, 112, 87, 96, + 105, -1, 115, 37, 88, 93, 112, 87, 96, 105, + -1, 115, 37, 88, 93, 113, 14, 110, 14, 108, + 113, 87, 96, -1, 115, 92, 105, -1, 115, 38, + 88, 93, 94, 112, 87, 96, -1, -1, -1, 101, + -1, -1, 133, -1, 133, -1, 133, -1, 109, -1, + 111, -1, -1, 24, -1, 118, -1, 121, -1, 120, + -1, 130, -1, 131, -1, 117, -1, 89, -1, 25, + 124, 119, 92, -1, 15, -1, -1, 58, 122, 125, + 126, 127, 129, -1, 26, 122, 125, 126, 127, 129, + -1, -1, -1, -1, 15, -1, -1, 18, -1, -1, + 60, 18, -1, 60, -1, 60, 18, -1, 60, -1, + 92, -1, 14, -1, 28, 15, 14, -1, -1, 29, + 122, 132, 15, 15, 146, 14, -1, 133, 64, 133, + -1, 133, 63, 133, -1, 133, 62, 133, -1, 134, + -1, 134, 66, -1, 134, 66, 143, -1, 143, -1, + 47, 155, 134, -1, 45, 88, 155, 133, 87, -1, + 143, 86, 137, 88, 147, 87, -1, 143, 86, 137, + -1, 16, 155, 146, -1, 17, 155, 88, 147, 87, + -1, 47, 146, -1, 45, 88, 147, 87, -1, -1, + 23, 123, 92, 136, 146, -1, 16, -1, 150, -1, + 154, 3, 133, 14, 4, -1, 150, 5, 133, 6, + -1, 143, 86, 5, 133, 6, -1, 138, 5, 133, + 6, -1, 150, 3, 133, 14, 4, -1, 143, 86, + 3, 133, 14, 4, -1, 138, 3, 133, 14, 4, + -1, 143, 86, 88, 87, -1, 143, 86, 88, 133, + 87, -1, 138, 88, 133, 87, -1, 138, 88, 87, + -1, 88, 133, 87, 5, 133, 6, -1, 88, 87, + 5, 133, 6, -1, 143, 67, 143, -1, 143, 81, + 143, -1, 143, 50, 143, -1, 143, 51, 143, -1, + 143, 75, 143, -1, 143, 48, 143, -1, 143, 49, + 143, -1, 143, 74, 143, -1, 143, 73, 143, -1, + 143, 42, 143, -1, 143, 72, 143, -1, 143, 71, + 143, -1, 143, 70, 143, -1, 143, 76, 143, -1, + 7, 143, -1, 8, 143, -1, 77, 143, -1, 78, + 143, -1, 143, 83, -1, 143, 82, -1, 85, 143, + -1, 84, 143, -1, 5, 133, 6, -1, 5, 6, + -1, 54, 133, 14, 4, -1, 54, 14, 4, -1, + 27, 123, 126, 127, 92, -1, 53, 143, -1, 53, + 92, -1, 53, 15, 88, 87, -1, 53, 15, 88, + 133, 87, -1, 53, 150, 88, 87, -1, 53, 150, + 88, 133, 87, -1, 139, -1, 140, -1, 141, -1, + 142, -1, 143, 68, 143, 69, 143, -1, 79, 143, + -1, 144, -1, 56, 143, -1, 88, 133, 87, -1, + 88, 87, -1, 150, -1, 154, -1, 152, -1, 151, + -1, 153, -1, 138, -1, 151, 5, 133, 6, -1, + 151, 3, 133, 14, 4, -1, 18, -1, 149, -1, + 149, 88, 87, -1, 149, 88, 133, 87, -1, 55, + 15, 146, -1, 41, -1, 41, 143, -1, 65, 134, + -1, 46, -1, 46, 92, -1, 46, 143, -1, 59, + -1, 59, 143, -1, 22, -1, 22, 143, -1, 43, + -1, 43, 88, 87, -1, 21, -1, 44, 88, 87, + -1, 44, 88, 133, 87, -1, 19, 88, 134, 87, + -1, 15, -1, 135, -1, 57, 145, 128, -1, 57, + 145, -1, 88, 133, 87, -1, 88, 87, -1, 150, + -1, 152, -1, 151, -1, -1, 134, -1, -1, 133, + -1, 133, 66, -1, 150, -1, 13, 155, -1, 9, + 155, -1, 10, 155, -1, 11, 155, -1, 52, 155, + -1, 12, 155, -1, 15, -1, 150, -1, 92, -1, + 20, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = +static const yytype_uint16 yyrline[] = { - 0, 103, 103, 109, 116, 120, 124, 130, 137, 141, - 145, 146, 148, 157, 159, 160, 162, 164, 173, 179, - 181, 183, 185, 187, 189, 191, 198, 199, 201, 208, - 212, 219, 222, 228, 229, 234, 240, 246, 249, 253, - 256, 273, 280, 290, 296, 297, 302, 303, 307, 312, - 316, 320, 326, 327, 331, 333, 335, 337, 339, 343, - 348, 349, 353, 359, 365, 370, 375, 380, 390, 391, - 396, 397, 399, 404, 406, 411, 412, 415, 420, 419, - 427, 429, 431, 433, 437, 439, 441, 445, 448, 451, - 456, 460, 465, 470, 472, 475, 474, 484, 485, 489, - 494, 496, 500, 504, 507, 512, 517, 520, 525, 529, - 532, 534, 539, 541, 543, 547, 549, 551, 553, 555, - 557, 559, 561, 563, 565, 567, 572, 574, 576, 578, - 580, 583, 586, 589, 596, 598, 600, 602, 604, 611, - 613, 615, 623, 632, 636, 644, 645, 646, 647, 648, - 650, 652, 654, 656, 658, 660, 662, 664, 666, 668, - 670, 672, 678, 685, 687, 689, 691, 694, 697, 700, - 702, 704, 706, 708, 710, 712, 714, 716, 719, 721, - 723, 726, 729, 731, 733, 734, 738, 740, 745, 747, - 749, 751, 753, 758, 760, 765, 766, 768, 774, 778, - 782, 786, 790, 794, 798, 803, 805, 807, 810 + 0, 127, 127, 133, 143, 147, 151, 157, 167, 171, + 175, 176, 183, 192, 195, 196, 198, 200, 217, 236, + 238, 240, 244, 248, 252, 256, 265, 266, 270, 281, + 289, 300, 303, 309, 310, 317, 330, 342, 353, 363, + 373, 409, 417, 427, 433, 434, 439, 442, 446, 451, + 455, 459, 465, 474, 478, 480, 482, 484, 486, 491, + 495, 501, 514, 515, 519, 531, 552, 558, 563, 568, + 578, 579, 584, 585, 589, 599, 603, 613, 614, 623, + 636, 635, 652, 656, 660, 664, 668, 678, 686, 690, + 695, 702, 711, 717, 723, 731, 735, 742, 741, 752, + 753, 757, 766, 771, 779, 786, 793, 803, 812, 819, + 828, 835, 841, 848, 858, 862, 866, 872, 876, 880, + 884, 888, 892, 896, 908, 912, 916, 920, 930, 934, + 941, 945, 949, 954, 959, 964, 973, 978, 983, 989, + 995, 1006, 1010, 1014, 1026, 1039, 1047, 1059, 1060, 1061, + 1062, 1063, 1068, 1072, 1074, 1078, 1083, 1088, 1090, 1092, + 1094, 1096, 1098, 1100, 1109, 1120, 1122, 1124, 1129, 1142, + 1147, 1152, 1156, 1160, 1164, 1168, 1172, 1174, 1176, 1178, + 1181, 1185, 1191, 1194, 1203, 1209, 1214, 1215, 1219, 1227, + 1234, 1239, 1244, 1246, 1248, 1253, 1255, 1260, 1261, 1263, + 1278, 1282, 1288, 1294, 1300, 1306, 1312, 1319, 1321, 1323, + 1326 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "'{'", "WORD", "METHOD", "FUNCMETH", + "$end", "error", "$undefined", "'{'", "'}'", "'['", "']'", "'-'", "'+'", + "'$'", "'@'", "'%'", "'*'", "'&'", "';'", "WORD", "METHOD", "FUNCMETH", "THING", "PMFUNC", "PRIVATEREF", "FUNC0SUB", "UNIOPSUB", "LSTOPSUB", "LABEL", "FORMAT", "SUB", "ANONSUB", "PACKAGE", "USE", "WHILE", "UNTIL", "IF", "UNLESS", "ELSE", "ELSIF", "CONTINUE", "FOR", "GIVEN", "WHEN", "DEFAULT", "LOOPEX", "DOTDOT", "FUNC0", "FUNC1", "FUNC", "UNIOP", "LSTOP", "RELOP", "EQOP", "MULOP", "ADDOP", "DOLSHARP", "DO", "HASHBRACK", "NOAMP", "LOCAL", "MY", "MYSUB", "REQUIRE", "COLONATTR", - "'&'", "PREC_LOW", "DOROP", "OROP", "ANDOP", "NOTOP", "','", "ASSIGNOP", - "'?'", "':'", "DORDOR", "OROR", "ANDAND", "BITOROP", "BITANDOP", - "SHIFTOP", "MATCHOP", "'!'", "'~'", "REFGEN", "UMINUS", "POWOP", - "POSTDEC", "POSTINC", "PREDEC", "PREINC", "ARROW", "')'", "'('", "'['", - "PEG", "'}'", "';'", "']'", "'-'", "'+'", "'$'", "'@'", "'%'", "'*'", - "$accept", "prog", "block", "remember", "mydefsv", "progstart", "mblock", + "PREC_LOW", "DOROP", "OROP", "ANDOP", "NOTOP", "','", "ASSIGNOP", "'?'", + "':'", "DORDOR", "OROR", "ANDAND", "BITOROP", "BITANDOP", "SHIFTOP", + "MATCHOP", "'!'", "'~'", "REFGEN", "UMINUS", "POWOP", "POSTDEC", + "POSTINC", "PREDEC", "PREINC", "ARROW", "')'", "'('", "PEG", "$accept", + "prog", "block", "remember", "mydefsv", "progstart", "mblock", "mremember", "savescope", "lineseq", "line", "sideff", "else", "cond", "case", "cont", "loop", "switch", "mintro", "nexpr", "texpr", "iexpr", - "mexpr", "mnexpr", "miexpr", "label", "decl", "format", "formname", - "mysubrout", "subrout", "startsub", "startanonsub", "startformsub", - "subname", "proto", "subattrlist", "myattrlist", "subbody", "package", - "use", "@1", "expr", "argexpr", "listop", "@2", "method", "subscripted", - "termbinop", "termunop", "anonymous", "termdo", "term", "myattrterm", - "myterm", "listexpr", "listexprcom", "my_scalar", "amper", "scalar", - "ary", "hsh", "arylen", "star", "indirob", 0 + "mexpr", "mnexpr", "miexpr", "label", "decl", "peg", "format", + "formname", "mysubrout", "subrout", "startsub", "startanonsub", + "startformsub", "subname", "proto", "subattrlist", "myattrlist", + "subbody", "package", "use", "@1", "expr", "argexpr", "listop", "@2", + "method", "subscripted", "termbinop", "termunop", "anonymous", "termdo", + "term", "myattrterm", "myterm", "listexpr", "listexprcom", "my_scalar", + "amper", "scalar", "ary", "hsh", "arylen", "star", "indirob", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = +static const yytype_uint16 yytoknum[] = { - 0, 256, 257, 123, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 38, 304, 305, 306, 307, 308, 44, 309, 63, 58, + 0, 256, 257, 123, 125, 91, 93, 45, 43, 36, + 64, 37, 42, 38, 59, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, + 303, 304, 305, 306, 307, 308, 44, 309, 63, 58, 310, 311, 312, 313, 314, 315, 316, 33, 126, 317, - 318, 319, 320, 321, 322, 323, 324, 41, 40, 91, - 325, 125, 59, 93, 45, 43, 36, 64, 37, 42 + 318, 319, 320, 321, 322, 323, 324, 41, 40, 325 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = +static const yytype_uint8 yyr1[] = { 0, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 99, 99, 100, 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 101, 102, 102, 102, 103, 103, 104, 104, 105, 105, 106, 106, 106, 106, 106, 106, 106, 107, 108, 109, 109, 110, 110, 111, 112, - 113, 114, 115, 115, 116, 116, 116, 116, 116, 117, - 118, 118, 119, 120, 121, 122, 123, 124, 125, 125, - 126, 126, 126, 127, 127, 128, 128, 129, 131, 130, - 132, 132, 132, 132, 133, 133, 133, 134, 134, 134, - 134, 134, 134, 134, 134, 135, 134, 136, 136, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 139, 139, 139, 139, - 139, 139, 139, 139, 140, 140, 140, 140, 140, 141, - 141, 141, 141, 141, 141, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 142, 143, 143, 144, 144, - 144, 144, 144, 145, 145, 146, 146, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 154, 154, 154 + 113, 114, 115, 115, 116, 116, 116, 116, 116, 116, + 117, 118, 119, 119, 120, 121, 122, 123, 124, 125, + 126, 126, 127, 127, 127, 128, 128, 129, 129, 130, + 132, 131, 133, 133, 133, 133, 134, 134, 134, 135, + 135, 135, 135, 135, 135, 135, 135, 136, 135, 137, + 137, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 140, 140, + 140, 140, 140, 140, 140, 140, 141, 141, 141, 141, + 141, 142, 142, 142, 142, 142, 142, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 144, 144, + 145, 145, 145, 145, 145, 146, 146, 147, 147, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 155, 155, + 155 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = +static const yytype_uint8 yyr2[] = { 0, 2, 2, 4, 0, 0, 0, 4, 0, 0, 0, 2, 3, 2, 1, 1, 2, 2, 3, 1, 1, 3, 3, 3, 3, 3, 0, 2, 6, 7, 7, 6, 2, 0, 2, 9, 9, 10, 9, 8, 12, 3, 8, 0, 0, 1, 0, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 4, - 1, 0, 6, 6, 0, 0, 0, 1, 0, 1, - 0, 2, 1, 2, 1, 1, 1, 3, 0, 7, - 3, 3, 3, 1, 2, 3, 1, 3, 5, 6, - 3, 3, 5, 2, 4, 0, 5, 1, 1, 5, - 4, 5, 4, 5, 6, 5, 4, 5, 4, 3, - 6, 5, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, - 2, 2, 2, 2, 3, 2, 4, 3, 5, 2, - 2, 4, 5, 4, 5, 1, 1, 1, 1, 5, - 2, 1, 2, 3, 2, 1, 1, 1, 1, 1, - 1, 4, 5, 1, 1, 3, 4, 3, 1, 2, - 2, 1, 2, 2, 1, 2, 1, 2, 1, 3, - 1, 3, 4, 4, 1, 1, 3, 2, 3, 2, - 1, 1, 1, 0, 1, 0, 1, 2, 1, 2, - 2, 2, 2, 2, 2, 1, 1, 1, 1 + 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 1, 0, 6, 6, 0, 0, 0, 1, + 0, 1, 0, 2, 1, 2, 1, 1, 1, 3, + 0, 7, 3, 3, 3, 1, 2, 3, 1, 3, + 5, 6, 3, 3, 5, 2, 4, 0, 5, 1, + 1, 5, 4, 5, 4, 5, 6, 5, 4, 5, + 4, 3, 6, 5, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, + 2, 2, 2, 2, 2, 2, 3, 2, 4, 3, + 5, 2, 2, 4, 5, 4, 5, 1, 1, 1, + 1, 5, 2, 1, 2, 3, 2, 1, 1, 1, + 1, 1, 1, 4, 5, 1, 1, 3, 4, 3, + 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, + 1, 3, 1, 3, 4, 4, 1, 1, 3, 2, + 3, 2, 1, 1, 1, 0, 1, 0, 1, 2, + 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, + 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const unsigned char yydefact[] = +static const yytype_uint8 yydefact[] = { - 6, 0, 10, 1, 9, 66, 64, 0, 64, 64, - 52, 11, 54, 56, 55, 57, 58, 61, 0, 0, - 78, 0, 53, 12, 14, 15, 0, 60, 0, 67, - 68, 77, 0, 68, 19, 4, 184, 0, 0, 163, - 0, 180, 176, 65, 65, 0, 0, 0, 0, 0, - 0, 0, 0, 168, 178, 0, 0, 171, 193, 0, - 0, 0, 0, 0, 0, 174, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, - 0, 0, 33, 0, 13, 16, 20, 83, 185, 160, - 145, 146, 147, 148, 86, 151, 164, 155, 158, 157, - 159, 156, 59, 69, 70, 0, 70, 10, 205, 208, - 207, 206, 193, 0, 0, 177, 0, 68, 4, 4, - 4, 4, 4, 4, 0, 4, 4, 32, 169, 0, - 0, 195, 172, 173, 205, 194, 93, 206, 0, 203, - 184, 140, 139, 155, 0, 0, 193, 152, 0, 187, - 190, 192, 191, 175, 199, 170, 128, 129, 150, 133, - 132, 154, 0, 135, 0, 126, 127, 200, 201, 202, - 204, 0, 41, 18, 0, 0, 0, 0, 0, 0, - 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, + 6, 0, 10, 1, 9, 68, 66, 0, 66, 66, + 60, 52, 11, 59, 54, 56, 55, 57, 58, 63, + 0, 0, 80, 0, 53, 12, 14, 15, 0, 62, + 0, 69, 70, 79, 0, 70, 19, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 186, 0, 0, + 165, 0, 182, 178, 67, 67, 0, 0, 0, 0, + 0, 0, 0, 0, 170, 180, 0, 0, 173, 195, + 0, 0, 0, 0, 0, 0, 176, 0, 0, 0, + 0, 0, 0, 0, 33, 0, 13, 16, 20, 85, + 187, 162, 147, 148, 149, 150, 88, 153, 166, 157, + 160, 159, 161, 158, 61, 71, 72, 0, 72, 10, + 137, 0, 128, 129, 207, 210, 209, 208, 202, 203, + 204, 206, 201, 195, 0, 0, 179, 0, 70, 4, + 4, 4, 4, 4, 4, 0, 4, 4, 32, 171, + 0, 0, 197, 174, 175, 207, 196, 95, 208, 0, + 205, 186, 142, 141, 157, 0, 0, 195, 154, 0, + 189, 192, 194, 193, 177, 172, 130, 131, 152, 135, + 134, 156, 0, 0, 41, 18, 0, 0, 0, 0, + 0, 0, 0, 0, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 131, 130, 0, 0, 0, 0, 0, 0, 0, - 72, 0, 193, 0, 9, 91, 195, 0, 95, 70, - 46, 0, 0, 0, 0, 0, 4, 5, 0, 179, - 181, 0, 196, 0, 0, 87, 0, 0, 137, 0, - 167, 189, 0, 74, 186, 0, 153, 134, 34, 23, - 24, 48, 21, 22, 25, 82, 81, 80, 85, 0, - 109, 0, 0, 121, 117, 118, 114, 115, 112, 0, - 124, 123, 122, 120, 119, 116, 125, 113, 0, 97, - 0, 0, 90, 98, 165, 0, 0, 0, 0, 0, - 0, 71, 76, 75, 63, 0, 62, 3, 0, 183, - 193, 0, 0, 47, 0, 0, 49, 51, 0, 0, - 198, 45, 50, 0, 0, 20, 0, 0, 0, 182, - 197, 94, 0, 141, 0, 143, 0, 136, 188, 73, - 0, 0, 0, 108, 102, 0, 0, 106, 0, 0, - 195, 166, 0, 100, 0, 161, 0, 79, 92, 96, - 138, 43, 43, 0, 0, 0, 0, 46, 0, 0, - 0, 88, 142, 144, 111, 0, 105, 149, 0, 107, - 101, 0, 103, 162, 99, 0, 0, 8, 26, 26, - 0, 33, 0, 0, 0, 31, 110, 104, 89, 33, - 33, 10, 0, 0, 29, 30, 0, 39, 43, 33, - 42, 35, 36, 9, 27, 0, 33, 0, 38, 7, - 0, 37, 0, 0, 0, 26, 40, 28 + 0, 0, 0, 133, 132, 0, 0, 0, 0, 0, + 0, 0, 74, 0, 195, 0, 9, 136, 93, 197, + 0, 97, 72, 46, 0, 0, 0, 0, 0, 4, + 5, 0, 181, 183, 0, 198, 0, 0, 89, 0, + 0, 139, 0, 169, 191, 0, 76, 188, 0, 155, + 34, 23, 24, 48, 21, 22, 25, 84, 83, 82, + 87, 0, 0, 111, 0, 123, 119, 120, 116, 117, + 114, 0, 126, 125, 124, 122, 121, 118, 127, 115, + 0, 0, 99, 0, 92, 100, 167, 0, 0, 0, + 0, 0, 0, 73, 78, 77, 65, 0, 64, 3, + 0, 185, 195, 0, 0, 47, 0, 0, 49, 51, + 0, 0, 200, 45, 50, 0, 0, 20, 0, 0, + 0, 184, 199, 96, 0, 143, 0, 145, 0, 138, + 190, 75, 0, 0, 0, 104, 110, 0, 0, 0, + 108, 0, 197, 168, 0, 102, 0, 163, 0, 81, + 94, 98, 140, 43, 43, 0, 0, 0, 0, 46, + 0, 0, 0, 90, 144, 146, 113, 0, 107, 151, + 0, 103, 109, 0, 105, 164, 101, 0, 0, 8, + 26, 26, 0, 33, 0, 0, 0, 31, 112, 106, + 91, 33, 33, 10, 0, 0, 29, 30, 0, 39, + 43, 33, 42, 35, 36, 9, 27, 0, 33, 0, + 38, 7, 0, 37, 0, 0, 0, 26, 40, 28 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const short int yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = { - -1, 1, 110, 107, 317, 2, 378, 391, 10, 4, - 23, 311, 394, 84, 85, 172, 24, 25, 375, 312, - 302, 250, 305, 314, 308, 26, 11, 12, 28, 13, - 14, 18, 116, 17, 30, 104, 211, 244, 294, 15, - 16, 32, 306, 87, 88, 300, 282, 89, 90, 91, - 92, 93, 94, 95, 149, 136, 233, 309, 96, 97, - 98, 99, 100, 101, 112 + -1, 1, 116, 109, 319, 2, 380, 393, 11, 4, + 25, 313, 396, 86, 87, 174, 26, 27, 377, 314, + 304, 252, 307, 316, 310, 28, 12, 13, 14, 30, + 15, 16, 20, 127, 19, 32, 106, 213, 247, 296, + 17, 18, 34, 308, 89, 90, 302, 284, 91, 92, + 93, 94, 95, 96, 97, 160, 147, 236, 311, 98, + 99, 100, 101, 102, 103, 118 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -362 -static const short int yypact[] = +#define YYPACT_NINF -370 +static const yytype_int16 yypact[] = { - -362, 13, -362, -362, 198, -362, -362, 23, -362, -362, - 19, -362, -362, -362, -362, -362, -362, 37, 51, -9, - -362, 51, -362, -362, -362, -362, 316, -362, 54, -362, - 112, -362, 95, 112, -362, -362, -362, 16, 16, -362, - 43, -362, 1701, -362, -362, 50, 56, 60, 66, -25, - 68, 93, 54, 1701, 96, 98, 99, 668, 581, 16, - 755, 841, 127, 1701, 118, 1701, 16, 1701, 1701, 1701, - 1701, 1701, 1701, 927, 1013, -362, 1701, 1701, 16, 16, - 16, 16, 107, 85, -362, -362, 287, 114, -362, 11, - -362, -362, -362, -362, 1929, -362, 106, 8, 14, -362, - -362, 170, -362, -362, 137, 197, 137, -362, -362, -362, - -362, -362, 1701, 124, 1701, 353, 54, 112, -362, -362, - -362, -362, -362, -362, 129, -362, -362, -362, 1929, 140, - 1099, 581, -362, 353, 1839, 114, -362, 1774, 1701, -362, - 136, -362, 353, 39, 142, -23, 1701, 353, 1185, 169, - -362, -362, -362, 353, -362, 114, 168, 168, 168, 92, - 92, 167, 390, -362, 89, 168, 168, -362, -362, -362, - -362, 54, -362, -362, 1701, 1701, 1701, 1701, 1701, 1701, - 1701, 1701, 1701, 1701, 1271, 1701, 1701, 1701, 1701, 1701, - 1701, 1701, 1701, 1701, 1701, 1701, 1701, 1701, 1701, 1701, - 1701, -362, -362, 47, 1357, 1701, 1701, 1701, 1701, 1701, - 240, 6, 1701, 6, 64, -362, 1701, -19, -362, 137, - 1701, 1701, 1701, 1701, 163, 405, -362, -362, 1701, -362, - -362, 409, 242, 179, 1701, 114, 1443, 1529, -362, 177, - -362, -362, 479, 259, -362, 1701, 192, -362, -362, -14, - -362, -14, -14, -14, -14, 221, 221, -362, 1929, 31, - -362, 600, 207, 1989, 741, 567, 796, 788, 1929, 1886, - 1744, 1744, 393, 481, 654, 90, 168, 168, 1701, -362, - 1615, 1701, 200, -362, -362, 609, 139, 324, 230, 424, - 234, -362, -362, -362, -362, 194, -362, -362, 202, -362, - 1701, 54, 214, -14, 215, 220, -14, -362, 222, 225, - -362, -362, -362, 227, 236, 248, 1701, 1701, 252, -362, - -362, -362, 629, -362, 687, -362, 696, -362, -362, -362, - 460, 1701, 249, -362, -362, 1701, 315, -362, 716, 512, - 1701, -362, 253, -362, 272, -362, 273, -362, -362, -362, - -362, -362, -362, 330, 330, 1701, 330, 1701, 286, 293, - 330, -362, -362, -362, -362, 547, -362, 1972, 294, -362, - -362, 297, -362, -362, -362, 330, 330, -362, 53, 53, - 302, 107, 298, 330, 330, -362, -362, -362, -362, 107, - 107, -362, 330, 304, -362, -362, 330, -362, -362, 107, - -362, -362, -362, 122, -362, 1701, 107, 494, -362, -362, - 309, -362, 310, 330, 330, 53, -362, -362 + -370, 30, -370, -370, 21, -370, -370, 36, -370, -370, + -370, 42, -370, -370, -370, -370, -370, -370, -370, 59, + 75, 22, -370, 75, -370, -370, -370, -370, 352, -370, + 86, -370, 80, -370, 96, 80, -370, -370, 914, 1750, + 1750, 336, 336, 336, 336, 336, -370, -370, 336, 336, + -370, 28, -370, 1750, -370, -370, 40, 55, 78, 89, + 47, 98, 102, 86, 1750, 106, 109, 111, 686, 602, + 336, 770, 996, 103, 1750, 76, 1750, 1750, 1750, 1750, + 1750, 1750, 1750, 1078, 129, 128, -370, -370, 139, 126, + -370, 4, -370, -370, -370, -370, 1894, -370, 117, 54, + 79, -370, -370, 203, -370, -370, 147, 199, 147, -370, + -370, 77, -48, -48, -370, -370, -370, -370, -370, -370, + -370, -370, -370, 1750, 127, 1750, 337, 86, 80, -370, + -370, -370, -370, -370, -370, 131, -370, -370, -370, 1894, + 160, 1162, 602, -370, 337, 1810, 126, -370, 831, 1750, + -370, 157, -370, 337, 12, 246, 240, 1750, 337, 1246, + 191, -370, -370, -370, 337, 126, -48, -48, -48, 20, + 20, 251, 211, 86, -370, -370, 1750, 1750, 1750, 1750, + 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1330, 1750, 1750, + 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, + 1750, 1750, 1750, -370, -370, 158, 1414, 1750, 1750, 1750, + 1750, 1750, 250, 15, 1750, 15, 35, -370, -370, 1750, + -46, -370, 147, 1750, 1750, 1750, 1750, 258, 434, -370, + -370, 1750, -370, -370, 271, 249, 185, 1750, 126, 1498, + 1582, -370, 272, -370, -370, 338, 263, -370, 1750, 284, + -370, 74, -370, 74, 74, 74, 74, 232, 232, -370, + 1894, 244, 82, -370, 420, 1978, 802, 671, 718, 464, + 1894, 1852, 422, 422, 503, 588, 757, 382, -48, -48, + 1750, 1750, -370, 1666, 230, -370, -370, 564, 266, 154, + 274, 198, 280, -370, -370, -370, -370, 306, -370, -370, + 238, -370, 1750, 86, 245, 74, 253, 254, 74, -370, + 259, 239, -370, -370, -370, 265, 340, 260, 1750, 1750, + 285, -370, -370, -370, 578, -370, 613, -370, 648, -370, + -370, -370, 202, 1750, 372, -370, -370, 1750, 286, 207, + -370, 661, 1750, -370, 373, -370, 376, -370, 390, -370, + -370, -370, -370, -370, -370, 383, 383, 1750, 383, 1750, + 316, 323, 383, -370, -370, -370, -370, 220, -370, 1936, + 410, -370, -370, 328, -370, -370, -370, 383, 383, -370, + -12, -12, 329, 129, 407, 383, 383, -370, -370, -370, + -370, 129, 129, -370, 383, 334, -370, -370, 383, -370, + -370, 129, -370, -370, -370, 104, -370, 1750, 129, 516, + -370, -370, 339, -370, 341, 383, 383, -12, -370, -370 }; /* YYPGOTO[NTERM-NUM]. */ -static const short int yypgoto[] = +static const yytype_int16 yypgoto[] = { - -362, -362, -24, -51, -362, -362, -103, -362, -362, -106, - -362, 362, -361, -362, -362, -34, -362, -362, -342, -362, - 32, -197, -220, -11, -362, -362, -362, -362, -362, -362, - -362, 115, 355, -362, 387, -17, -99, -362, 201, -362, - -362, -362, -26, -52, -362, -362, -362, -362, -362, -362, - -362, -362, 38, -362, -362, -100, -213, -362, -362, -15, - 356, 358, -362, -362, 184 + -370, -370, -26, -61, -370, -370, -99, -370, -370, -108, + -370, 396, -369, -370, -370, -82, -370, -370, -338, -370, + 68, -51, -223, 25, -370, -370, -370, -370, -370, -370, + -370, -370, 69, 399, -370, 415, -21, -95, -370, 247, + -370, -370, -370, -28, -58, -370, -370, -370, -370, -370, + -370, -370, -370, 41, -370, -370, -117, -216, -370, -370, + -17, 384, 385, -370, -370, 179 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -185 -static const short int yytable[] = +#define YYTABLE_NINF -187 +static const yytype_int16 yytable[] = { - 86, 214, 82, 298, 102, 313, 135, 213, 318, 35, - 376, 205, 215, 3, 183, 155, 106, 207, 395, 35, - 108, 122, 111, 111, 304, 109, 307, 19, 127, 179, - 180, 181, 22, 132, 124, 145, 141, 182, 179, 180, - 181, 27, 205, 137, 111, 143, 240, 162, 164, 150, - 278, 111, 279, 123, 417, 29, 407, 35, 299, 239, - 135, 78, 217, 111, 111, 111, 111, 220, 221, 222, - 223, 224, 225, 31, 227, 228, 392, 393, 5, 6, - 115, 7, 8, 179, 180, 181, 235, 206, 292, 184, - 185, 128, 218, 208, 135, 133, 358, 359, 142, 105, - 219, 147, 78, 153, 231, 232, 156, 157, 158, 159, - 160, 9, 295, 332, 165, 166, 137, 237, 206, 103, - 301, 114, 242, 20, 21, 280, 281, 371, 118, 189, - 190, 146, 171, 78, 119, 380, 5, 6, 120, 7, - 8, 179, 180, 181, 121, 297, 125, 248, 249, 251, - 252, 253, 254, 255, 256, 257, 199, 259, 261, 262, - 135, 200, 201, 202, -185, -185, 203, 173, 203, 9, - 182, 126, 247, 209, 129, 316, 130, 131, 285, 286, - 287, 288, 289, 290, 204, 410, 210, 293, 283, 293, - 232, 179, 180, 181, 303, 251, 148, 251, -2, 315, - 349, 212, 216, 409, 78, 79, 80, 226, 322, 310, - 324, 326, 5, 6, 236, 7, 8, 229, 243, 330, - 258, 342, 113, 238, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 200, - 201, 202, 138, 139, 203, 9, 245, 291, 135, 78, - 154, 379, 336, 381, 338, 339, 321, 385, 327, 179, - 180, 181, 167, 168, 169, 170, 329, 174, 175, 176, - 177, 331, 389, 390, 178, 181, 347, 350, 340, 348, - 399, 400, 179, 180, 181, 403, 179, 180, 181, 404, - 334, 351, 352, 406, 179, 180, 181, 353, 320, 354, - 179, 180, 181, 355, 356, 365, 174, 175, 176, 177, - 415, 416, 344, 178, 232, 234, 346, 34, 357, 35, - 36, 37, 38, 39, 40, -49, 41, 42, 43, 360, - 366, 303, 44, 377, 372, 45, 46, 47, 48, 179, - 180, 181, 49, 50, 51, 52, 53, 397, 54, 55, - 56, 57, 58, 373, 374, 401, 402, 59, 60, 61, - 62, 63, 64, 383, 65, 408, 66, 179, 180, 181, - 384, 67, 411, 367, 388, 387, 179, 180, 181, 396, - 398, 86, 405, 68, 69, 70, 413, 414, 83, 382, - 71, 72, 189, 190, 73, 74, 412, 368, 75, 117, - 76, 77, 78, 79, 80, 81, 34, 343, 33, 36, - 37, 38, 39, 40, 296, 41, 42, 43, 198, 199, - 151, 44, 152, 0, 200, 201, 202, 0, 0, 203, - 187, 188, 189, 190, 0, 53, 0, 54, 55, 56, - 57, 58, 179, 180, 181, 0, 59, 60, 61, 62, - 63, 64, 0, 65, 0, 66, 196, 197, 198, 199, - 67, 179, 180, 181, 200, 201, 202, 246, 0, 203, - 0, 0, 68, 69, 70, 0, 179, 180, 181, 71, - 72, 0, 0, 73, 74, 0, 319, -44, 0, 76, - 77, 78, 79, 80, 81, 34, 0, 0, 36, 37, - 38, 39, 40, 0, 41, 42, 43, 345, 0, 0, - 44, 0, 179, 180, 181, 0, 0, 0, 187, 188, - 189, 190, 0, 0, 53, 0, 54, 55, 56, 57, - 58, 179, 180, 181, 0, 59, 60, 61, 62, 63, - 64, 0, 65, 364, 66, 197, 198, 199, 0, 67, - 0, 0, 200, 201, 202, 0, 328, 203, 0, 0, - 0, 68, 69, 70, 179, 180, 181, 0, 71, 72, - 0, -44, 73, 74, 0, 0, 0, 0, 76, 77, - 78, 79, 80, 81, 35, 134, 37, 38, 39, 40, - 109, 41, 42, 43, 0, 370, 0, 44, 0, 179, - 180, 181, 0, 0, 187, -185, 189, 190, 0, 0, - 0, 53, 0, 54, 55, 56, 57, 58, 0, 0, - 0, 0, 59, 60, 61, 62, 63, 64, 0, 65, - 386, 66, 198, 199, 0, 0, 67, 0, 200, 201, - 202, 0, 0, 203, 0, 0, 0, 0, 68, 69, - 70, 0, 179, 180, 181, 71, 72, 0, 0, 73, - 74, 179, 180, 181, 0, 76, 77, 78, 79, 80, - 81, 35, 36, 37, 38, 39, 40, 333, 41, 42, - 43, 179, 180, 181, 44, 0, 341, 0, 0, 0, - 0, 187, 188, 189, 190, 0, 0, 0, 53, 0, - 54, 55, 56, 57, 58, 0, 361, 0, 0, 59, - 60, 61, 62, 63, 64, 0, 65, 0, 66, 198, - 199, 0, 0, 67, 0, 200, 201, 202, 0, 0, - 203, 0, 0, 0, 0, 68, 69, 70, 0, 179, - 180, 181, 71, 72, 0, 0, 73, 74, 179, 180, - 181, 0, 76, 77, 78, 79, 80, 81, 35, 140, - 37, 38, 39, 40, 362, 41, 42, 43, 179, 180, - 181, 44, 0, 363, 0, 0, 0, 0, -185, 0, - 189, 190, 0, 0, 0, 53, 0, 54, 55, 56, - 57, 58, 0, 369, 0, 0, 59, 60, 61, 62, - 63, 64, 0, 65, 0, 66, 198, 199, 0, 0, - 67, 0, 200, 201, 202, 0, 0, 203, 0, 0, - 0, 0, 68, 69, 70, 0, 0, 189, 0, 71, - 72, 0, 0, 73, 74, 0, 0, 0, 0, 76, - 77, 78, 79, 80, 81, 36, 37, 38, 39, 40, - 0, 41, 42, 43, 199, 0, 0, 44, 0, 200, - 201, 202, 199, 0, 203, 0, 0, 200, 201, 202, - 0, 53, 203, 54, 55, 56, 57, 58, 0, 0, - 0, 0, 59, 60, 61, 62, 63, 64, 0, 65, - 0, 66, 0, 0, 0, 0, 67, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 69, - 70, 0, 0, 0, 0, 71, 72, 0, 0, 73, - 74, 0, 0, 144, 0, 76, 77, 78, 79, 80, - 81, 36, 37, 38, 39, 40, 0, 41, 42, 43, - 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 53, 0, 54, - 55, 56, 57, 58, 0, 0, 0, 0, 59, 60, - 61, 62, 63, 64, 0, 65, 0, 66, 0, 0, - 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 69, 70, 0, 0, 0, - 0, 71, 72, 0, 161, 73, 74, 0, 0, 0, - 0, 76, 77, 78, 79, 80, 81, 36, 37, 38, - 39, 40, 0, 41, 42, 43, 0, 0, 0, 44, + 88, 216, 84, 300, 104, 315, 218, 185, 320, 186, + 111, 146, 397, 215, 108, 207, 378, 208, 37, 165, + 184, -2, 394, 395, 117, 117, 117, 117, 117, 294, + 3, 117, 117, 202, 203, 204, 33, 138, 205, 299, + 243, 301, 143, 135, 156, 152, 5, 6, 419, 7, + 8, 21, 148, 117, 154, 172, 41, 207, 161, 208, + 5, 6, 409, 7, 8, 146, 24, 220, 223, 224, + 225, 226, 227, 228, 29, 230, 231, 22, 23, 9, + 112, 113, 209, 217, 210, 41, 42, 43, 335, 37, + 31, 238, 187, 9, 126, 360, 361, 297, 105, 146, + 240, 221, -187, -187, 133, 139, 205, 222, 411, 144, + 10, 107, 153, 234, 235, 158, 125, 164, 157, 166, + 167, 168, 169, 170, 10, 148, 373, 303, 129, 5, + 6, 245, 7, 8, 382, 134, 181, 182, 183, 181, + 182, 183, 175, 130, 181, 182, 183, 250, 251, 253, + 254, 255, 256, 257, 258, 259, 146, 261, 262, 264, + 345, 280, 9, 281, 159, 173, 131, 41, 318, 176, + 177, 178, 179, 306, 282, 309, 180, 132, 287, 288, + 289, 290, 291, 292, 412, 351, 136, 295, 285, 295, + 137, 235, 184, 10, 140, 305, 253, 141, 253, 142, + 317, 181, 182, 183, 347, 206, 211, 212, 366, 324, + 312, 326, 328, 371, 214, 219, 181, 182, 183, 229, + 332, 119, 120, 121, 122, 260, 388, 123, 124, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 146, 239, 283, 232, 149, 150, + 241, 246, 338, 339, 242, 341, 248, 381, 334, 383, + 181, 182, 183, 387, 181, 182, 183, 41, 293, 181, + 182, 183, 323, 181, 182, 183, 329, 352, 391, 392, + 344, 331, 181, 182, 183, 405, 401, 402, 346, 333, + 176, 177, 178, 179, 348, 406, 183, 180, 249, 408, + 370, 399, 181, 182, 183, 367, 181, 182, 183, 403, + 404, 181, 182, 183, 235, 322, 417, 418, 342, 410, + 349, 237, 181, 182, 183, 350, 413, 357, 181, 182, + 183, 305, 353, 181, 182, 183, 181, 182, 183, 37, + 354, 355, 181, 182, 183, 41, 356, -49, 181, 182, + 183, 114, 358, 36, 359, 37, 115, 38, 321, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 362, 52, 53, 54, 368, 374, 369, 55, + 375, 88, 56, 57, 58, 59, 379, 191, 192, 60, + 61, 62, 63, 64, 376, 65, 66, 67, 68, 69, + 181, 182, 183, 385, 70, 71, 72, 73, 74, 75, + 386, 76, 200, 201, 389, 390, 398, 77, 202, 203, + 204, 400, 407, 205, 85, 330, 415, 384, 416, 78, + 79, 80, 191, 192, 414, 36, 81, 82, 35, 38, + 83, 39, 40, 41, 42, 43, 44, 45, -44, 47, + 48, 49, 50, 51, 128, 52, 53, 54, 201, 162, + 163, 55, 298, 202, 203, 204, 0, 0, 205, 0, + 189, 190, 191, 192, 0, 64, 0, 65, 66, 67, + 68, 69, 181, 182, 183, 0, 70, 71, 72, 73, + 74, 75, 0, 76, 197, 198, 199, 200, 201, 77, + 0, 0, 0, 202, 203, 204, 0, 336, 205, 0, + 0, 78, 79, 80, 191, 0, 0, 36, 81, 82, + 0, 38, 83, 39, 40, 41, 42, 43, 44, 45, + 0, 47, 48, 49, 50, 51, 0, 52, 53, 54, + 201, 0, 0, 55, 0, 202, 203, 204, 0, 0, + 205, 189, 190, 191, 192, 0, 0, 64, 0, 65, + 66, 67, 68, 69, 0, 0, 0, 0, 70, 71, + 72, 73, 74, 75, 0, 76, 198, 199, 200, 201, + 0, 77, 0, 0, 202, 203, 204, 0, 0, 205, + 0, 0, 0, 78, 79, 80, 0, 0, 0, 0, + 81, 82, 0, -44, 83, 37, 0, 38, 0, 39, + 40, 41, 42, 43, 44, 45, 0, 145, 48, 49, + 50, 51, 115, 52, 53, 54, 181, 182, 183, 55, + 0, 0, 0, 0, 0, 0, 189, 190, 191, 192, + 181, 182, 183, 64, 0, 65, 66, 67, 68, 69, + 0, 343, 0, 0, 70, 71, 72, 73, 74, 75, + 0, 76, 199, 200, 201, 363, 0, 77, 0, 202, + 203, 204, 0, 0, 205, 181, 182, 183, 0, 78, + 79, 80, 0, 0, 0, 0, 81, 82, 0, 37, + 83, 38, 0, 39, 40, 41, 42, 43, 44, 45, + 364, 47, 48, 49, 50, 51, 0, 52, 53, 54, + 181, 182, 183, 55, 0, 0, 0, 0, 0, 189, + -187, 191, 192, 181, 182, 183, 0, 64, 0, 65, + 66, 67, 68, 69, 0, 365, 0, 0, 70, 71, + 72, 73, 74, 75, 0, 76, 200, 201, 372, 0, + 0, 77, 202, 203, 204, 0, 0, 205, 0, 0, + 0, 0, 0, 78, 79, 80, 0, 0, 0, 0, + 81, 82, 0, 37, 83, 38, 0, 39, 40, 41, + 42, 43, 44, 45, 0, 151, 48, 49, 50, 51, + 0, 52, 53, 54, 201, 0, 0, 55, 0, 202, + 203, 204, 0, 0, 205, 189, 190, 191, 192, 0, + 0, 64, 0, 65, 66, 67, 68, 69, 0, 0, + 0, 0, 70, 71, 72, 73, 74, 75, 0, 76, + 0, 0, 200, 201, 207, 77, 208, -157, 202, 203, + 204, 0, 0, 205, 0, -157, 0, 78, 79, 80, + -187, 0, 191, 192, 81, 82, 0, 0, 83, 0, + 0, -157, -157, -157, -157, 0, 0, 0, -157, 0, + 0, 0, 0, -157, 0, 0, 0, 200, 201, -157, + -157, -157, -157, 202, 203, 204, 0, 0, 205, 0, + 0, 0, 0, -157, -157, -157, 0, -157, -157, -157, + -157, -157, -157, -157, -157, -157, -157, -157, 0, 0, + 0, 0, -157, -157, -157, 0, 0, -157, -157, 38, + 110, 39, 40, 41, 42, 43, 44, 45, 0, 47, + 48, 49, 50, 51, 0, 52, 53, 54, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 64, 0, 65, 66, 67, + 68, 69, 0, 0, 0, 0, 70, 71, 72, 73, + 74, 75, 0, 76, 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 53, 0, 54, 55, 56, 57, 58, - 0, 0, 0, 0, 59, 60, 61, 62, 63, 64, - 0, 65, 0, 66, 0, 0, 0, 0, 67, 0, + 0, 78, 79, 80, 0, 0, 0, 0, 81, 82, + 0, 38, 83, 39, 40, 41, 42, 43, 44, 45, + 155, 47, 48, 49, 50, 51, 0, 52, 53, 54, + 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 64, 0, 65, + 66, 67, 68, 69, 0, 0, 0, 0, 70, 71, + 72, 73, 74, 75, 0, 76, 0, 0, 0, 0, + 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 78, 79, 80, 0, 0, 0, 0, + 81, 82, 0, 38, 83, 39, 40, 41, 42, 43, + 44, 45, 0, 47, 48, 49, 50, 51, 0, 52, + 53, 54, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, + 0, 65, 66, 67, 68, 69, 0, 0, 0, 0, + 70, 71, 72, 73, 74, 75, 0, 76, 0, 0, + 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 78, 79, 80, 0, 0, + 0, 0, 81, 82, 0, 171, 83, 38, 0, 39, + 40, 41, 42, 43, 44, 45, 0, 47, 48, 49, + 50, 51, 0, 52, 53, 54, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 69, 70, 0, 0, 0, 0, 71, 72, 0, - 0, 73, 74, 0, 0, 0, 163, 76, 77, 78, - 79, 80, 81, 36, 37, 38, 39, 40, 0, 41, - 42, 43, 0, 0, 0, 44, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - 0, 54, 55, 56, 57, 58, 0, 0, 0, 0, - 59, 60, 61, 62, 63, 64, 0, 65, 0, 66, - 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 68, 69, 70, 0, - 0, 0, 0, 71, 72, 0, 230, 73, 74, 0, - 0, 0, 0, 76, 77, 78, 79, 80, 81, 36, - 37, 38, 39, 40, 0, 41, 42, 43, 0, 0, - 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 53, 0, 54, 55, 56, - 57, 58, 0, 0, 0, 0, 59, 60, 61, 62, - 63, 64, 0, 65, 0, 66, 0, 0, 0, 0, - 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 68, 69, 70, 0, 0, 0, 0, 71, - 72, 0, 241, 73, 74, 0, 0, 0, 0, 76, - 77, 78, 79, 80, 81, 36, 37, 38, 39, 40, - 0, 41, 42, 43, 0, 0, 0, 44, 0, 0, + 0, 0, 0, 64, 0, 65, 66, 67, 68, 69, + 0, 0, 0, 0, 70, 71, 72, 73, 74, 75, + 0, 76, 0, 0, 0, 0, 0, 77, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, + 79, 80, 0, 0, 0, 0, 81, 82, 0, 233, + 83, 38, 0, 39, 40, 41, 42, 43, 44, 45, + 0, 47, 48, 49, 50, 51, 0, 52, 53, 54, + 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 64, 0, 65, + 66, 67, 68, 69, 0, 0, 0, 0, 70, 71, + 72, 73, 74, 75, 0, 76, 0, 0, 0, 0, + 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 78, 79, 80, 0, 0, 0, 0, + 81, 82, 0, 244, 83, 38, 0, 39, 40, 41, + 42, 43, 44, 45, 0, 47, 48, 49, 50, 51, + 0, 52, 53, 54, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 0, 54, 55, 56, 57, 58, 0, 0, - 0, 0, 59, 60, 61, 62, 63, 64, 0, 65, - 0, 66, 0, 0, 0, 0, 67, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 69, - 70, 0, 0, 0, 0, 71, 72, 0, 260, 73, - 74, 0, 0, 0, 0, 76, 77, 78, 79, 80, - 81, 36, 37, 38, 39, 40, 0, 41, 42, 43, - 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 53, 0, 54, - 55, 56, 57, 58, 0, 0, 0, 0, 59, 60, - 61, 62, 63, 64, 0, 65, 0, 66, 0, 0, - 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 69, 70, 0, 0, 0, - 0, 71, 72, 0, 284, 73, 74, 0, 0, 0, - 0, 76, 77, 78, 79, 80, 81, 36, 37, 38, - 39, 40, 0, 41, 42, 43, 0, 0, 0, 44, + 0, 64, 0, 65, 66, 67, 68, 69, 0, 0, + 0, 0, 70, 71, 72, 73, 74, 75, 0, 76, + 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 78, 79, 80, + 0, 0, 0, 0, 81, 82, 0, 263, 83, 38, + 0, 39, 40, 41, 42, 43, 44, 45, 0, 47, + 48, 49, 50, 51, 0, 52, 53, 54, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 64, 0, 65, 66, 67, + 68, 69, 0, 0, 0, 0, 70, 71, 72, 73, + 74, 75, 0, 76, 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 53, 0, 54, 55, 56, 57, 58, - 0, 0, 0, 0, 59, 60, 61, 62, 63, 64, - 0, 65, 0, 66, 0, 0, 0, 0, 67, 0, + 0, 78, 79, 80, 0, 0, 0, 0, 81, 82, + 0, 286, 83, 38, 0, 39, 40, 41, 42, 43, + 44, 45, 0, 47, 48, 49, 50, 51, 0, 52, + 53, 54, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, + 0, 65, 66, 67, 68, 69, 0, 0, 0, 0, + 70, 71, 72, 73, 74, 75, 0, 76, 0, 0, + 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 78, 79, 80, 0, 0, + 0, 0, 81, 82, 0, 325, 83, 38, 0, 39, + 40, 41, 42, 43, 44, 45, 0, 47, 48, 49, + 50, 51, 0, 52, 53, 54, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 69, 70, 0, 0, 0, 0, 71, 72, 0, - 323, 73, 74, 0, 0, 0, 0, 76, 77, 78, - 79, 80, 81, 36, 37, 38, 39, 40, 0, 41, - 42, 43, 0, 0, 0, 44, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - 0, 54, 55, 56, 57, 58, 0, 0, 0, 0, - 59, 60, 61, 62, 63, 64, 0, 65, 0, 66, - 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 68, 69, 70, 0, - 0, 0, 0, 71, 72, 0, 325, 73, 74, 0, - 0, 0, 0, 76, 77, 78, 79, 80, 81, 36, - 37, 38, 39, 40, 0, 41, 42, 43, 0, 0, - 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 53, 0, 54, 55, 56, - 57, 58, 0, 0, 0, 0, 59, 60, 61, 62, - 63, 64, 0, 65, 0, 66, 0, 0, 0, 0, - 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 68, 69, 70, 0, 0, 0, 0, 71, - 72, 0, 337, 73, 74, 0, 0, 0, 0, 76, - 77, 78, 79, 80, 81, 36, 37, 38, 39, 40, - 0, 41, 42, 43, 0, 0, 0, 44, 0, 0, + 0, 0, 0, 64, 0, 65, 66, 67, 68, 69, + 0, 0, 0, 0, 70, 71, 72, 73, 74, 75, + 0, 76, 0, 0, 0, 0, 0, 77, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, + 79, 80, 0, 0, 0, 0, 81, 82, 0, 327, + 83, 38, 0, 39, 40, 41, 42, 43, 44, 45, + 0, 47, 48, 49, 50, 51, 0, 52, 53, 54, + 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 64, 0, 65, + 66, 67, 68, 69, 0, 0, 0, 0, 70, 71, + 72, 73, 74, 75, 0, 76, 0, 0, 0, 0, + 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 78, 79, 80, 0, 0, 0, 0, + 81, 82, 0, 340, 83, 38, 0, 39, 40, 41, + 42, 43, 44, 45, 0, 47, 48, 49, 50, 51, + 0, 52, 53, 54, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 53, 0, 54, 55, 56, 57, 58, 0, 0, - 0, 0, 59, 60, 61, 62, 63, 64, 0, 65, - 0, 66, 0, 0, 0, 0, 67, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 69, - 70, 0, 0, 0, 0, 71, 72, 205, 0, 73, - 74, 187, 188, 189, 190, 76, 77, 78, 79, 80, - 81, 0, 0, -155, -155, -155, -155, 0, 0, 0, - -155, 0, 0, 0, 0, -155, 195, 196, 197, 198, - 199, -155, -155, -155, -155, 200, 201, 202, 0, 0, - 203, 0, 0, 0, 0, 0, -155, -155, -155, 0, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, 0, 0, 0, 0, -155, -155, -155, 0, 0, - -155, -155, 0, 206, 0, 0, -155, -155, -184, -184, - -184, -184, 0, 0, 0, -184, 0, 0, 0, 0, - -184, 0, 0, 0, 0, 0, -184, -184, -184, -184, + 0, 64, 0, 65, 66, 67, 68, 69, 0, 0, + 0, 0, 70, 71, 72, 73, 74, 75, 0, 76, + 0, 0, 0, 0, 0, 77, -186, 0, 0, 0, + 0, 0, 0, 0, -186, 0, 0, 78, 79, 80, + 0, 0, 0, 0, 81, 82, 0, 0, 83, 0, + -186, -186, -186, -186, 0, 0, 0, -186, 0, 0, + 0, 0, -186, 0, 0, 0, 0, 0, -186, -186, + -186, -186, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -186, -186, -186, 0, -186, -186, -186, -186, + -186, -186, -186, -186, -186, -186, -186, 0, 0, 0, + 0, -186, -186, -186, 188, 0, -186, -186, 0, 0, + 189, 190, 191, 192, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, + 194, 337, 195, 196, 197, 198, 199, 200, 201, 0, + 0, 0, 0, 202, 203, 204, 188, 0, 205, 0, + 0, 0, 189, 190, 191, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -184, -184, -184, 0, -184, -184, -184, -184, -184, - -184, -184, -184, -184, -184, -184, 0, 0, 0, 0, - -184, -184, -184, 0, 0, -184, -184, 186, 0, 0, - 0, -184, -184, 187, 188, 189, 190, 0, 0, 0, + 0, 193, 194, 0, 195, 196, 197, 198, 199, 200, + 201, 0, 0, 0, 0, 202, 203, 204, 188, 0, + 205, 0, 0, 0, 189, 190, 191, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 191, 192, 335, 193, 194, 195, 196, - 197, 198, 199, 0, 0, 0, 0, 200, 201, 202, - 186, 0, 203, 0, 0, 0, 187, 188, 189, 190, + 0, 0, 0, 0, 194, 0, 195, 196, 197, 198, + 199, 200, 201, 0, 0, 0, 0, 202, 203, 204, + -187, 0, 205, 0, 0, 0, 189, 190, 191, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 191, 192, 0, 193, - 194, 195, 196, 197, 198, 199, 0, 0, 0, 0, - 200, 201, 202, 186, 0, 203, 0, 0, 0, 187, - 188, 189, 190, 0, 0, 0, 0, 0, 0, 0, - -185, 0, 0, 0, 0, 0, 187, 188, 189, 190, - 192, 0, 193, 194, 195, 196, 197, 198, 199, 0, - 0, 0, 0, 200, 201, 202, 0, 0, 203, 193, - 194, 195, 196, 197, 198, 199, 0, 0, 0, 0, - 200, 201, 202, 0, 0, 203 + 0, 0, 0, 0, 0, 0, 0, 0, 195, 196, + 197, 198, 199, 200, 201, 0, 0, 0, 0, 202, + 203, 204, 0, 0, 205 }; -static const short int yycheck[] = +static const yytype_int16 yycheck[] = { - 26, 107, 26, 216, 28, 225, 58, 106, 228, 3, - 352, 3, 112, 0, 3, 67, 33, 3, 379, 3, - 4, 46, 37, 38, 221, 9, 223, 4, 52, 52, - 53, 54, 13, 57, 49, 61, 60, 56, 52, 53, - 54, 4, 3, 58, 59, 60, 146, 73, 74, 64, - 3, 66, 5, 78, 415, 4, 398, 3, 77, 82, - 112, 86, 114, 78, 79, 80, 81, 118, 119, 120, - 121, 122, 123, 82, 125, 126, 23, 24, 14, 15, - 42, 17, 18, 52, 53, 54, 138, 79, 82, 78, - 79, 53, 116, 79, 146, 57, 316, 317, 60, 4, - 117, 63, 86, 65, 130, 131, 68, 69, 70, 71, - 72, 47, 212, 82, 76, 77, 131, 78, 79, 7, - 219, 78, 148, 8, 9, 78, 79, 340, 78, 39, - 40, 4, 25, 86, 78, 355, 14, 15, 78, 17, - 18, 52, 53, 54, 78, 81, 78, 171, 174, 175, - 176, 177, 178, 179, 180, 181, 66, 183, 184, 185, - 212, 71, 72, 73, 72, 73, 76, 82, 76, 47, - 56, 78, 83, 3, 78, 226, 78, 78, 204, 205, - 206, 207, 208, 209, 78, 405, 49, 211, 203, 213, - 216, 52, 53, 54, 220, 221, 78, 223, 0, 225, - 300, 4, 78, 81, 86, 87, 88, 78, 234, 224, - 236, 237, 14, 15, 78, 17, 18, 77, 49, 245, - 182, 82, 38, 81, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 71, - 72, 73, 58, 59, 76, 47, 79, 7, 300, 86, - 66, 354, 278, 356, 280, 281, 77, 360, 81, 52, - 53, 54, 78, 79, 80, 81, 7, 19, 20, 21, - 22, 79, 375, 376, 26, 54, 82, 301, 78, 77, - 383, 384, 52, 53, 54, 391, 52, 53, 54, 392, - 83, 77, 77, 396, 52, 53, 54, 77, 56, 77, - 52, 53, 54, 78, 77, 331, 19, 20, 21, 22, - 413, 414, 82, 26, 340, 131, 82, 1, 82, 3, - 4, 5, 6, 7, 8, 77, 10, 11, 12, 77, - 81, 357, 16, 3, 81, 19, 20, 21, 22, 52, - 53, 54, 26, 27, 28, 29, 30, 381, 32, 33, - 34, 35, 36, 81, 81, 389, 390, 41, 42, 43, - 44, 45, 46, 77, 48, 399, 50, 52, 53, 54, - 77, 55, 406, 335, 77, 81, 52, 53, 54, 77, - 82, 407, 78, 67, 68, 69, 77, 77, 26, 357, - 74, 75, 39, 40, 78, 79, 407, 82, 82, 44, - 84, 85, 86, 87, 88, 89, 1, 83, 21, 4, - 5, 6, 7, 8, 213, 10, 11, 12, 65, 66, - 64, 16, 64, -1, 71, 72, 73, -1, -1, 76, - 37, 38, 39, 40, -1, 30, -1, 32, 33, 34, - 35, 36, 52, 53, 54, -1, 41, 42, 43, 44, - 45, 46, -1, 48, -1, 50, 63, 64, 65, 66, - 55, 52, 53, 54, 71, 72, 73, 77, -1, 76, - -1, -1, 67, 68, 69, -1, 52, 53, 54, 74, - 75, -1, -1, 78, 79, -1, 77, 82, -1, 84, - 85, 86, 87, 88, 89, 1, -1, -1, 4, 5, - 6, 7, 8, -1, 10, 11, 12, 83, -1, -1, - 16, -1, 52, 53, 54, -1, -1, -1, 37, 38, - 39, 40, -1, -1, 30, -1, 32, 33, 34, 35, - 36, 52, 53, 54, -1, 41, 42, 43, 44, 45, - 46, -1, 48, 83, 50, 64, 65, 66, -1, 55, - -1, -1, 71, 72, 73, -1, 77, 76, -1, -1, - -1, 67, 68, 69, 52, 53, 54, -1, 74, 75, - -1, 77, 78, 79, -1, -1, -1, -1, 84, 85, - 86, 87, 88, 89, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, -1, 83, -1, 16, -1, 52, - 53, 54, -1, -1, 37, 38, 39, 40, -1, -1, - -1, 30, -1, 32, 33, 34, 35, 36, -1, -1, - -1, -1, 41, 42, 43, 44, 45, 46, -1, 48, - 83, 50, 65, 66, -1, -1, 55, -1, 71, 72, - 73, -1, -1, 76, -1, -1, -1, -1, 67, 68, - 69, -1, 52, 53, 54, 74, 75, -1, -1, 78, - 79, 52, 53, 54, -1, 84, 85, 86, 87, 88, - 89, 3, 4, 5, 6, 7, 8, 77, 10, 11, - 12, 52, 53, 54, 16, -1, 77, -1, -1, -1, - -1, 37, 38, 39, 40, -1, -1, -1, 30, -1, - 32, 33, 34, 35, 36, -1, 77, -1, -1, 41, - 42, 43, 44, 45, 46, -1, 48, -1, 50, 65, - 66, -1, -1, 55, -1, 71, 72, 73, -1, -1, - 76, -1, -1, -1, -1, 67, 68, 69, -1, 52, - 53, 54, 74, 75, -1, -1, 78, 79, 52, 53, - 54, -1, 84, 85, 86, 87, 88, 89, 3, 4, - 5, 6, 7, 8, 77, 10, 11, 12, 52, 53, - 54, 16, -1, 77, -1, -1, -1, -1, 37, -1, - 39, 40, -1, -1, -1, 30, -1, 32, 33, 34, - 35, 36, -1, 77, -1, -1, 41, 42, 43, 44, - 45, 46, -1, 48, -1, 50, 65, 66, -1, -1, - 55, -1, 71, 72, 73, -1, -1, 76, -1, -1, - -1, -1, 67, 68, 69, -1, -1, 39, -1, 74, - 75, -1, -1, 78, 79, -1, -1, -1, -1, 84, - 85, 86, 87, 88, 89, 4, 5, 6, 7, 8, - -1, 10, 11, 12, 66, -1, -1, 16, -1, 71, - 72, 73, 66, -1, 76, -1, -1, 71, 72, 73, - -1, 30, 76, 32, 33, 34, 35, 36, -1, -1, - -1, -1, 41, 42, 43, 44, 45, 46, -1, 48, - -1, 50, -1, -1, -1, -1, 55, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, - 69, -1, -1, -1, -1, 74, 75, -1, -1, 78, - 79, -1, -1, 82, -1, 84, 85, 86, 87, 88, - 89, 4, 5, 6, 7, 8, -1, 10, 11, 12, - -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 30, -1, 32, - 33, 34, 35, 36, -1, -1, -1, -1, 41, 42, - 43, 44, 45, 46, -1, 48, -1, 50, -1, -1, - -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 67, 68, 69, -1, -1, -1, - -1, 74, 75, -1, 77, 78, 79, -1, -1, -1, - -1, 84, 85, 86, 87, 88, 89, 4, 5, 6, - 7, 8, -1, 10, 11, 12, -1, -1, -1, 16, + 28, 109, 28, 219, 30, 228, 123, 3, 231, 5, + 38, 69, 381, 108, 35, 3, 354, 5, 3, 77, + 66, 0, 34, 35, 41, 42, 43, 44, 45, 14, + 0, 48, 49, 81, 82, 83, 14, 63, 86, 4, + 157, 87, 68, 60, 72, 71, 25, 26, 417, 28, + 29, 15, 69, 70, 71, 83, 9, 3, 75, 5, + 25, 26, 400, 28, 29, 123, 24, 125, 129, 130, + 131, 132, 133, 134, 15, 136, 137, 8, 9, 58, + 39, 40, 3, 6, 5, 9, 10, 11, 6, 3, + 15, 149, 88, 58, 53, 318, 319, 214, 18, 157, + 88, 127, 82, 83, 57, 64, 86, 128, 4, 68, + 89, 15, 71, 141, 142, 74, 88, 76, 15, 78, + 79, 80, 81, 82, 89, 142, 342, 222, 88, 25, + 26, 159, 28, 29, 357, 88, 62, 63, 64, 62, + 63, 64, 14, 88, 62, 63, 64, 173, 176, 177, + 178, 179, 180, 181, 182, 183, 214, 185, 186, 187, + 6, 3, 58, 5, 88, 36, 88, 9, 229, 30, + 31, 32, 33, 224, 16, 226, 37, 88, 206, 207, + 208, 209, 210, 211, 407, 302, 88, 213, 205, 215, + 88, 219, 66, 89, 88, 223, 224, 88, 226, 88, + 228, 62, 63, 64, 6, 88, 3, 60, 6, 237, + 227, 239, 240, 6, 15, 88, 62, 63, 64, 88, + 248, 42, 43, 44, 45, 184, 6, 48, 49, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 302, 88, 88, 87, 69, 70, + 4, 60, 280, 281, 14, 283, 5, 356, 14, 358, + 62, 63, 64, 362, 62, 63, 64, 9, 18, 62, + 63, 64, 87, 62, 63, 64, 4, 303, 377, 378, + 14, 18, 62, 63, 64, 393, 385, 386, 14, 5, + 30, 31, 32, 33, 14, 394, 64, 37, 87, 398, + 14, 383, 62, 63, 64, 333, 62, 63, 64, 391, + 392, 62, 63, 64, 342, 66, 415, 416, 88, 401, + 14, 142, 62, 63, 64, 87, 408, 88, 62, 63, + 64, 359, 87, 62, 63, 64, 62, 63, 64, 3, + 87, 87, 62, 63, 64, 9, 87, 87, 62, 63, + 64, 15, 87, 1, 14, 3, 20, 5, 87, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 87, 21, 22, 23, 4, 4, 337, 27, + 4, 409, 30, 31, 32, 33, 3, 50, 51, 37, + 38, 39, 40, 41, 4, 43, 44, 45, 46, 47, + 62, 63, 64, 87, 52, 53, 54, 55, 56, 57, + 87, 59, 75, 76, 4, 87, 87, 65, 81, 82, + 83, 14, 88, 86, 28, 87, 87, 359, 87, 77, + 78, 79, 50, 51, 409, 1, 84, 85, 23, 5, + 88, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 55, 21, 22, 23, 76, 75, + 75, 27, 215, 81, 82, 83, -1, -1, 86, -1, + 48, 49, 50, 51, -1, 41, -1, 43, 44, 45, + 46, 47, 62, 63, 64, -1, 52, 53, 54, 55, + 56, 57, -1, 59, 72, 73, 74, 75, 76, 65, + -1, -1, -1, 81, 82, 83, -1, 87, 86, -1, + -1, 77, 78, 79, 50, -1, -1, 1, 84, 85, + -1, 5, 88, 7, 8, 9, 10, 11, 12, 13, + -1, 15, 16, 17, 18, 19, -1, 21, 22, 23, + 76, -1, -1, 27, -1, 81, 82, 83, -1, -1, + 86, 48, 49, 50, 51, -1, -1, 41, -1, 43, + 44, 45, 46, 47, -1, -1, -1, -1, 52, 53, + 54, 55, 56, 57, -1, 59, 73, 74, 75, 76, + -1, 65, -1, -1, 81, 82, 83, -1, -1, 86, + -1, -1, -1, 77, 78, 79, -1, -1, -1, -1, + 84, 85, -1, 87, 88, 3, -1, 5, -1, 7, + 8, 9, 10, 11, 12, 13, -1, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 62, 63, 64, 27, + -1, -1, -1, -1, -1, -1, 48, 49, 50, 51, + 62, 63, 64, 41, -1, 43, 44, 45, 46, 47, + -1, 87, -1, -1, 52, 53, 54, 55, 56, 57, + -1, 59, 74, 75, 76, 87, -1, 65, -1, 81, + 82, 83, -1, -1, 86, 62, 63, 64, -1, 77, + 78, 79, -1, -1, -1, -1, 84, 85, -1, 3, + 88, 5, -1, 7, 8, 9, 10, 11, 12, 13, + 87, 15, 16, 17, 18, 19, -1, 21, 22, 23, + 62, 63, 64, 27, -1, -1, -1, -1, -1, 48, + 49, 50, 51, 62, 63, 64, -1, 41, -1, 43, + 44, 45, 46, 47, -1, 87, -1, -1, 52, 53, + 54, 55, 56, 57, -1, 59, 75, 76, 87, -1, + -1, 65, 81, 82, 83, -1, -1, 86, -1, -1, + -1, -1, -1, 77, 78, 79, -1, -1, -1, -1, + 84, 85, -1, 3, 88, 5, -1, 7, 8, 9, + 10, 11, 12, 13, -1, 15, 16, 17, 18, 19, + -1, 21, 22, 23, 76, -1, -1, 27, -1, 81, + 82, 83, -1, -1, 86, 48, 49, 50, 51, -1, + -1, 41, -1, 43, 44, 45, 46, 47, -1, -1, + -1, -1, 52, 53, 54, 55, 56, 57, -1, 59, + -1, -1, 75, 76, 3, 65, 5, 6, 81, 82, + 83, -1, -1, 86, -1, 14, -1, 77, 78, 79, + 48, -1, 50, 51, 84, 85, -1, -1, 88, -1, + -1, 30, 31, 32, 33, -1, -1, -1, 37, -1, + -1, -1, -1, 42, -1, -1, -1, 75, 76, 48, + 49, 50, 51, 81, 82, 83, -1, -1, 86, -1, + -1, -1, -1, 62, 63, 64, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, -1, -1, + -1, -1, 81, 82, 83, -1, -1, 86, 87, 5, + 6, 7, 8, 9, 10, 11, 12, 13, -1, 15, + 16, 17, 18, 19, -1, 21, 22, 23, -1, -1, + -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 41, -1, 43, 44, 45, + 46, 47, -1, -1, -1, -1, 52, 53, 54, 55, + 56, 57, -1, 59, -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 30, -1, 32, 33, 34, 35, 36, - -1, -1, -1, -1, 41, 42, 43, 44, 45, 46, - -1, 48, -1, 50, -1, -1, -1, -1, 55, -1, + -1, 77, 78, 79, -1, -1, -1, -1, 84, 85, + -1, 5, 88, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, -1, 21, 22, 23, + -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 41, -1, 43, + 44, 45, 46, 47, -1, -1, -1, -1, 52, 53, + 54, 55, 56, 57, -1, 59, -1, -1, -1, -1, + -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 77, 78, 79, -1, -1, -1, -1, + 84, 85, -1, 5, 88, 7, 8, 9, 10, 11, + 12, 13, -1, 15, 16, 17, 18, 19, -1, 21, + 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, + -1, 43, 44, 45, 46, 47, -1, -1, -1, -1, + 52, 53, 54, 55, 56, 57, -1, 59, -1, -1, + -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 77, 78, 79, -1, -1, + -1, -1, 84, 85, -1, 87, 88, 5, -1, 7, + 8, 9, 10, 11, 12, 13, -1, 15, 16, 17, + 18, 19, -1, 21, 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 67, 68, 69, -1, -1, -1, -1, 74, 75, -1, - -1, 78, 79, -1, -1, -1, 83, 84, 85, 86, - 87, 88, 89, 4, 5, 6, 7, 8, -1, 10, - 11, 12, -1, -1, -1, 16, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, - -1, 32, 33, 34, 35, 36, -1, -1, -1, -1, - 41, 42, 43, 44, 45, 46, -1, 48, -1, 50, - -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, - -1, -1, -1, 74, 75, -1, 77, 78, 79, -1, - -1, -1, -1, 84, 85, 86, 87, 88, 89, 4, - 5, 6, 7, 8, -1, 10, 11, 12, -1, -1, - -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 30, -1, 32, 33, 34, - 35, 36, -1, -1, -1, -1, 41, 42, 43, 44, - 45, 46, -1, 48, -1, 50, -1, -1, -1, -1, - 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 67, 68, 69, -1, -1, -1, -1, 74, - 75, -1, 77, 78, 79, -1, -1, -1, -1, 84, - 85, 86, 87, 88, 89, 4, 5, 6, 7, 8, - -1, 10, 11, 12, -1, -1, -1, 16, -1, -1, + -1, -1, -1, 41, -1, 43, 44, 45, 46, 47, + -1, -1, -1, -1, 52, 53, 54, 55, 56, 57, + -1, 59, -1, -1, -1, -1, -1, 65, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 77, + 78, 79, -1, -1, -1, -1, 84, 85, -1, 87, + 88, 5, -1, 7, 8, 9, 10, 11, 12, 13, + -1, 15, 16, 17, 18, 19, -1, 21, 22, 23, + -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 41, -1, 43, + 44, 45, 46, 47, -1, -1, -1, -1, 52, 53, + 54, 55, 56, 57, -1, 59, -1, -1, -1, -1, + -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 77, 78, 79, -1, -1, -1, -1, + 84, 85, -1, 87, 88, 5, -1, 7, 8, 9, + 10, 11, 12, 13, -1, 15, 16, 17, 18, 19, + -1, 21, 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 30, -1, 32, 33, 34, 35, 36, -1, -1, - -1, -1, 41, 42, 43, 44, 45, 46, -1, 48, - -1, 50, -1, -1, -1, -1, 55, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, - 69, -1, -1, -1, -1, 74, 75, -1, 77, 78, - 79, -1, -1, -1, -1, 84, 85, 86, 87, 88, - 89, 4, 5, 6, 7, 8, -1, 10, 11, 12, - -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 30, -1, 32, - 33, 34, 35, 36, -1, -1, -1, -1, 41, 42, - 43, 44, 45, 46, -1, 48, -1, 50, -1, -1, - -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 67, 68, 69, -1, -1, -1, - -1, 74, 75, -1, 77, 78, 79, -1, -1, -1, - -1, 84, 85, 86, 87, 88, 89, 4, 5, 6, - 7, 8, -1, 10, 11, 12, -1, -1, -1, 16, + -1, 41, -1, 43, 44, 45, 46, 47, -1, -1, + -1, -1, 52, 53, 54, 55, 56, 57, -1, 59, + -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 77, 78, 79, + -1, -1, -1, -1, 84, 85, -1, 87, 88, 5, + -1, 7, 8, 9, 10, 11, 12, 13, -1, 15, + 16, 17, 18, 19, -1, 21, 22, 23, -1, -1, + -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 41, -1, 43, 44, 45, + 46, 47, -1, -1, -1, -1, 52, 53, 54, 55, + 56, 57, -1, 59, -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 30, -1, 32, 33, 34, 35, 36, - -1, -1, -1, -1, 41, 42, 43, 44, 45, 46, - -1, 48, -1, 50, -1, -1, -1, -1, 55, -1, + -1, 77, 78, 79, -1, -1, -1, -1, 84, 85, + -1, 87, 88, 5, -1, 7, 8, 9, 10, 11, + 12, 13, -1, 15, 16, 17, 18, 19, -1, 21, + 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, + -1, 43, 44, 45, 46, 47, -1, -1, -1, -1, + 52, 53, 54, 55, 56, 57, -1, 59, -1, -1, + -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 77, 78, 79, -1, -1, + -1, -1, 84, 85, -1, 87, 88, 5, -1, 7, + 8, 9, 10, 11, 12, 13, -1, 15, 16, 17, + 18, 19, -1, 21, 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 67, 68, 69, -1, -1, -1, -1, 74, 75, -1, - 77, 78, 79, -1, -1, -1, -1, 84, 85, 86, - 87, 88, 89, 4, 5, 6, 7, 8, -1, 10, - 11, 12, -1, -1, -1, 16, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, - -1, 32, 33, 34, 35, 36, -1, -1, -1, -1, - 41, 42, 43, 44, 45, 46, -1, 48, -1, 50, - -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, - -1, -1, -1, 74, 75, -1, 77, 78, 79, -1, - -1, -1, -1, 84, 85, 86, 87, 88, 89, 4, - 5, 6, 7, 8, -1, 10, 11, 12, -1, -1, - -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 30, -1, 32, 33, 34, - 35, 36, -1, -1, -1, -1, 41, 42, 43, 44, - 45, 46, -1, 48, -1, 50, -1, -1, -1, -1, - 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 67, 68, 69, -1, -1, -1, -1, 74, - 75, -1, 77, 78, 79, -1, -1, -1, -1, 84, - 85, 86, 87, 88, 89, 4, 5, 6, 7, 8, - -1, 10, 11, 12, -1, -1, -1, 16, -1, -1, + -1, -1, -1, 41, -1, 43, 44, 45, 46, 47, + -1, -1, -1, -1, 52, 53, 54, 55, 56, 57, + -1, 59, -1, -1, -1, -1, -1, 65, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 77, + 78, 79, -1, -1, -1, -1, 84, 85, -1, 87, + 88, 5, -1, 7, 8, 9, 10, 11, 12, 13, + -1, 15, 16, 17, 18, 19, -1, 21, 22, 23, + -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 41, -1, 43, + 44, 45, 46, 47, -1, -1, -1, -1, 52, 53, + 54, 55, 56, 57, -1, 59, -1, -1, -1, -1, + -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 77, 78, 79, -1, -1, -1, -1, + 84, 85, -1, 87, 88, 5, -1, 7, 8, 9, + 10, 11, 12, 13, -1, 15, 16, 17, 18, 19, + -1, 21, 22, 23, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 30, -1, 32, 33, 34, 35, 36, -1, -1, - -1, -1, 41, 42, 43, 44, 45, 46, -1, 48, - -1, 50, -1, -1, -1, -1, 55, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, - 69, -1, -1, -1, -1, 74, 75, 3, -1, 78, - 79, 37, 38, 39, 40, 84, 85, 86, 87, 88, - 89, -1, -1, 19, 20, 21, 22, -1, -1, -1, - 26, -1, -1, -1, -1, 31, 62, 63, 64, 65, - 66, 37, 38, 39, 40, 71, 72, 73, -1, -1, - 76, -1, -1, -1, -1, -1, 52, 53, 54, -1, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, 71, 72, 73, -1, -1, - 76, 77, -1, 79, -1, -1, 82, 83, 19, 20, - 21, 22, -1, -1, -1, 26, -1, -1, -1, -1, - 31, -1, -1, -1, -1, -1, 37, 38, 39, 40, + -1, 41, -1, 43, 44, 45, 46, 47, -1, -1, + -1, -1, 52, 53, 54, 55, 56, 57, -1, 59, + -1, -1, -1, -1, -1, 65, 6, -1, -1, -1, + -1, -1, -1, -1, 14, -1, -1, 77, 78, 79, + -1, -1, -1, -1, 84, 85, -1, -1, 88, -1, + 30, 31, 32, 33, -1, -1, -1, 37, -1, -1, + -1, -1, 42, -1, -1, -1, -1, -1, 48, 49, + 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 62, 63, 64, -1, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, -1, -1, -1, + -1, 81, 82, 83, 42, -1, 86, 87, -1, -1, + 48, 49, 50, 51, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, -1, + -1, -1, -1, 81, 82, 83, 42, -1, 86, -1, + -1, -1, 48, 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 52, 53, 54, -1, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, -1, -1, -1, -1, - 71, 72, 73, -1, -1, 76, 77, 31, -1, -1, - -1, 82, 83, 37, 38, 39, 40, -1, -1, -1, + -1, 67, 68, -1, 70, 71, 72, 73, 74, 75, + 76, -1, -1, -1, -1, 81, 82, 83, 42, -1, + 86, -1, -1, -1, 48, 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, -1, -1, -1, -1, 71, 72, 73, - 31, -1, 76, -1, -1, -1, 37, 38, 39, 40, + -1, -1, -1, -1, 68, -1, 70, 71, 72, 73, + 74, 75, 76, -1, -1, -1, -1, 81, 82, 83, + 42, -1, 86, -1, -1, -1, 48, 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 57, 58, -1, 60, - 61, 62, 63, 64, 65, 66, -1, -1, -1, -1, - 71, 72, 73, 31, -1, 76, -1, -1, -1, 37, - 38, 39, 40, -1, -1, -1, -1, -1, -1, -1, - 31, -1, -1, -1, -1, -1, 37, 38, 39, 40, - 58, -1, 60, 61, 62, 63, 64, 65, 66, -1, - -1, -1, -1, 71, 72, 73, -1, -1, 76, 60, - 61, 62, 63, 64, 65, 66, -1, -1, -1, -1, - 71, 72, 73, -1, -1, 76 + -1, -1, -1, -1, -1, -1, -1, -1, 70, 71, + 72, 73, 74, 75, 76, -1, -1, -1, -1, 81, + 82, 83, -1, -1, 86 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const unsigned char yystos[] = +static const yytype_uint8 yystos[] = { - 0, 91, 95, 0, 99, 14, 15, 17, 18, 47, - 98, 116, 117, 119, 120, 129, 130, 123, 121, 4, - 121, 121, 13, 100, 106, 107, 115, 4, 118, 4, - 124, 82, 131, 124, 1, 3, 4, 5, 6, 7, - 8, 10, 11, 12, 16, 19, 20, 21, 22, 26, - 27, 28, 29, 30, 32, 33, 34, 35, 36, 41, - 42, 43, 44, 45, 46, 48, 50, 55, 67, 68, - 69, 74, 75, 78, 79, 82, 84, 85, 86, 87, - 88, 89, 92, 101, 103, 104, 132, 133, 134, 137, - 138, 139, 140, 141, 142, 143, 148, 149, 150, 151, - 152, 153, 92, 7, 125, 4, 125, 93, 4, 9, - 92, 149, 154, 154, 78, 142, 122, 122, 78, 78, - 78, 78, 46, 78, 149, 78, 78, 92, 142, 78, - 78, 78, 92, 142, 4, 133, 145, 149, 154, 154, - 4, 92, 142, 149, 82, 132, 4, 142, 78, 144, - 149, 150, 151, 142, 154, 133, 142, 142, 142, 142, - 142, 77, 132, 83, 132, 142, 142, 154, 154, 154, - 154, 25, 105, 82, 19, 20, 21, 22, 26, 52, - 53, 54, 56, 3, 78, 79, 31, 37, 38, 39, - 40, 57, 58, 60, 61, 62, 63, 64, 65, 66, - 71, 72, 73, 76, 78, 3, 79, 3, 79, 3, - 49, 126, 4, 126, 99, 145, 78, 133, 92, 125, - 93, 93, 93, 93, 93, 93, 78, 93, 93, 77, - 77, 132, 132, 146, 154, 133, 78, 78, 81, 82, - 145, 77, 132, 49, 127, 79, 77, 83, 92, 132, - 111, 132, 132, 132, 132, 132, 132, 132, 142, 132, - 77, 132, 132, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 142, 142, 142, 3, 5, - 78, 79, 136, 149, 77, 132, 132, 132, 132, 132, - 132, 7, 82, 92, 128, 145, 128, 81, 146, 77, - 135, 126, 110, 132, 111, 112, 132, 111, 114, 147, - 149, 101, 109, 112, 113, 132, 93, 94, 112, 77, - 56, 77, 132, 77, 132, 77, 132, 81, 77, 7, - 132, 79, 82, 77, 83, 59, 132, 77, 132, 132, - 78, 77, 82, 83, 82, 83, 82, 82, 77, 145, - 92, 77, 77, 77, 77, 78, 77, 82, 112, 112, - 77, 77, 77, 77, 83, 132, 81, 142, 82, 77, - 83, 146, 81, 81, 81, 108, 108, 3, 96, 96, - 112, 96, 110, 77, 77, 96, 83, 81, 77, 96, - 96, 97, 23, 24, 102, 102, 77, 105, 82, 96, - 96, 105, 105, 99, 96, 78, 96, 108, 105, 81, - 112, 105, 113, 77, 77, 96, 96, 102 + 0, 91, 95, 0, 99, 25, 26, 28, 29, 58, + 89, 98, 116, 117, 118, 120, 121, 130, 131, 124, + 122, 15, 122, 122, 24, 100, 106, 107, 115, 15, + 119, 15, 125, 14, 132, 125, 1, 3, 5, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 21, 22, 23, 27, 30, 31, 32, 33, + 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, + 52, 53, 54, 55, 56, 57, 59, 65, 77, 78, + 79, 84, 85, 88, 92, 101, 103, 104, 133, 134, + 135, 138, 139, 140, 141, 142, 143, 144, 149, 150, + 151, 152, 153, 154, 92, 18, 126, 15, 126, 93, + 6, 133, 143, 143, 15, 20, 92, 150, 155, 155, + 155, 155, 155, 155, 155, 88, 143, 123, 123, 88, + 88, 88, 88, 57, 88, 150, 88, 88, 92, 143, + 88, 88, 88, 92, 143, 15, 134, 146, 150, 155, + 155, 15, 92, 143, 150, 14, 133, 15, 143, 88, + 145, 150, 151, 152, 143, 134, 143, 143, 143, 143, + 143, 87, 133, 36, 105, 14, 30, 31, 32, 33, + 37, 62, 63, 64, 66, 3, 5, 88, 42, 48, + 49, 50, 51, 67, 68, 70, 71, 72, 73, 74, + 75, 76, 81, 82, 83, 86, 88, 3, 5, 3, + 5, 3, 60, 127, 15, 127, 99, 6, 146, 88, + 134, 92, 126, 93, 93, 93, 93, 93, 93, 88, + 93, 93, 87, 87, 133, 133, 147, 155, 134, 88, + 88, 4, 14, 146, 87, 133, 60, 128, 5, 87, + 92, 133, 111, 133, 133, 133, 133, 133, 133, 133, + 143, 133, 133, 87, 133, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 3, 5, 16, 88, 137, 150, 87, 133, 133, 133, + 133, 133, 133, 18, 14, 92, 129, 146, 129, 4, + 147, 87, 136, 127, 110, 133, 111, 112, 133, 111, + 114, 148, 150, 101, 109, 112, 113, 133, 93, 94, + 112, 87, 66, 87, 133, 87, 133, 87, 133, 4, + 87, 18, 133, 5, 14, 6, 87, 69, 133, 133, + 87, 133, 88, 87, 14, 6, 14, 6, 14, 14, + 87, 146, 92, 87, 87, 87, 87, 88, 87, 14, + 112, 112, 87, 87, 87, 87, 6, 133, 4, 143, + 14, 6, 87, 147, 4, 4, 4, 108, 108, 3, + 96, 96, 112, 96, 110, 87, 87, 96, 6, 4, + 87, 96, 96, 97, 34, 35, 102, 102, 87, 105, + 14, 96, 96, 105, 105, 99, 96, 88, 96, 108, + 105, 4, 112, 105, 113, 87, 87, 96, 96, 102 }; /* which symbols are of type opval */ static const int yy_is_opval[] = { - 0, 0, 0, 0, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -898,16 +904,15 @@ static const int yy_is_opval[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 1, + 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 1, - 1, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 0, - 0, 0, 1, 1, 1, 0, 1, 1, + 1, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 0, 0, + 0, 1, 1, 1, 1, + 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0 + 1, 1, 1, 1, 1, 1, 1, 0 }; diff --git a/perly.y b/perly.y index 77caeb6..f5b4203 100644 --- a/perly.y +++ b/perly.y @@ -1,6 +1,6 @@ /* perly.y * - * Copyright (c) 1991-2002, 2003, 2004 Larry Wall + * Copyright (c) 1991-2002, 2003, 2004, 2005, 2006 Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -10,12 +10,25 @@ /* * 'I see,' laughed Strider. 'I look foul and feel fair. Is that it? * All that is gold does not glitter, not all those who wander are lost.' - */ - -/* This file holds the grammar for the Perl language. If edited, you need + * + * This file holds the grammar for the Perl language. If edited, you need * to run regen_perly.pl, which re-creates the files perly.h, perly.tab * and perly.act which are derived from this. * + * Note that these derived files are included and compiled twice; once + * from perly.c, and once from madly.c. The second time, a number of MAD + * macros are defined, which compile in extra code that allows the parse + * tree to be accurately dumped. In particular: + * + * MAD defined if compiling madly.c + * DO_MAD(A) expands to A under madly.c, to null otherwise + * IF_MAD(a,b) expands to A under madly.c, to B otherwise + * TOKEN_GETMAD() expands to token_getmad() under madly.c, to null otherwise + * TOKEN_FREE() similarly + * OP_GETMAD() similarly + * IVAL(i) expands to (i)->tk_lval.ival or (i) + * PVAL(p) expands to (p)->tk_lval.pval or (p) + * * The main job of of this grammar is to call the various newFOO() * functions in op.c to build a syntax tree of OP structs. * It relies on the lexer in toke.c to do the tokenizing. @@ -25,77 +38,88 @@ %pure_parser +/* FIXME for MAD - is the new mintro on while and until important? */ + %start prog %union { I32 ival; char *pval; -#ifdef PERL_MAD - TOKEN* tkval; -#endif OP *opval; GV *gvval; +#ifdef PERL_IN_MADLY_C + TOKEN* p_tkval; + TOKEN* tkval; +#else + char *p_tkval; + I32 tkval; +#endif } -%token '{' +%token '{' '}' '[' ']' '-' '+' '$' '@' '%' '*' '&' ';' %token WORD METHOD FUNCMETH THING PMFUNC PRIVATEREF %token FUNC0SUB UNIOPSUB LSTOPSUB -%token LABEL -%token FORMAT SUB ANONSUB PACKAGE USE -%token WHILE UNTIL IF UNLESS ELSE ELSIF CONTINUE FOR -%token GIVEN WHEN DEFAULT -%token LOOPEX DOTDOT -%token FUNC0 FUNC1 FUNC UNIOP LSTOP -%token RELOP EQOP MULOP ADDOP -%token DOLSHARP DO HASHBRACK NOAMP -%token LOCAL MY MYSUB REQUIRE -%token COLONATTR - -%type prog decl format startsub startanonsub startformsub mintro -%type progstart remember mremember '&' savescope mydefsv +%token LABEL +%token FORMAT SUB ANONSUB PACKAGE USE +%token WHILE UNTIL IF UNLESS ELSE ELSIF CONTINUE FOR +%token GIVEN WHEN DEFAULT +%token LOOPEX DOTDOT +%token FUNC0 FUNC1 FUNC UNIOP LSTOP +%token RELOP EQOP MULOP ADDOP +%token DOLSHARP DO HASHBRACK NOAMP +%token LOCAL MY MYSUB REQUIRE +%token COLONATTR + +%type prog progstart remember mremember savescope +%type startsub startanonsub startformsub +/* FIXME for MAD - are these two ival? */ +%type mydefsv mintro + +%type decl format subrout mysubrout package use peg + %type block mblock lineseq line loop cond else %type expr term subscripted scalar ary hsh arylen star amper sideff %type argexpr nexpr texpr iexpr mexpr mnexpr miexpr %type listexpr listexprcom indirob listop method %type formname subname proto subbody cont my_scalar -%type subattrlist myattrlist mysubrout myattrterm myterm +%type subattrlist myattrlist myattrterm myterm %type termbinop termunop anonymous termdo %type switch case -%type label +%type label -%nonassoc PREC_LOW +%nonassoc PREC_LOW %nonassoc LOOPEX -%left OROP DOROP -%left ANDOP -%right NOTOP +%left OROP DOROP +%left ANDOP +%right NOTOP %nonassoc LSTOP LSTOPSUB -%left ',' -%right ASSIGNOP -%right '?' ':' +%left ',' +%right ASSIGNOP +%right '?' ':' %nonassoc DOTDOT -%left OROR DORDOR -%left ANDAND -%left BITOROP -%left BITANDOP +%left OROR DORDOR +%left ANDAND +%left BITOROP +%left BITANDOP %nonassoc EQOP %nonassoc RELOP %nonassoc UNIOP UNIOPSUB %nonassoc REQUIRE -%left SHIFTOP +%left SHIFTOP %left ADDOP %left MULOP -%left MATCHOP -%right '!' '~' UMINUS REFGEN -%right POWOP -%nonassoc PREINC PREDEC POSTINC POSTDEC -%left ARROW -%nonassoc ')' -%left '(' +%left MATCHOP +%right '!' '~' UMINUS REFGEN +%right POWOP +%nonassoc PREINC PREDEC POSTINC POSTDEC +%left ARROW +%nonassoc ')' +%left '(' %left '[' '{' -%token PEG +%token PEG %% /* RULES */ @@ -107,9 +131,12 @@ prog : progstart /* An ordinary block */ block : '{' remember lineseq '}' - { if (PL_copline > (line_t)$1) - PL_copline = (line_t)$1; - $$ = block_end($2, $3); } + { if (PL_copline > (line_t)IVAL($1)) + PL_copline = (line_t)IVAL($1); + $$ = block_end($2, $3); + TOKEN_GETMAD($1,$$,'{'); + TOKEN_GETMAD($4,$$,'}'); + } ; remember: /* NULL */ /* start a full lexical scope */ @@ -128,9 +155,12 @@ progstart: mblock : '{' mremember lineseq '}' - { if (PL_copline > (line_t)$1) - PL_copline = (line_t)$1; - $$ = block_end($2, $3); } + { if (PL_copline > (line_t)IVAL($1)) + PL_copline = (line_t)IVAL($1); + $$ = block_end($2, $3); + TOKEN_GETMAD($1,$$,'{'); + TOKEN_GETMAD($4,$$,'}'); + } ; mremember: /* NULL */ /* start a partial lexical scope */ @@ -144,7 +174,12 @@ savescope: /* NULL */ /* remember stack pos in case of error */ lineseq : /* NULL */ { $$ = Nullop; } | lineseq decl - { $$ = $1; } + { + $$ = IF_MAD( + append_list(OP_LINESEQ, + (LISTOP*)$1, (LISTOP*)$2), + $1); + } | lineseq savescope line { LEAVE_SCOPE($2); $$ = append_list(OP_LINESEQ, @@ -155,24 +190,46 @@ lineseq : /* NULL */ /* A "line" in the program */ line : label cond - { $$ = newSTATEOP(0, $1, $2); } + { $$ = newSTATEOP(0, PVAL($1), $2); + TOKEN_GETMAD($1,((LISTOP*)$$)->op_first,'L'); } | loop /* loops add their own labels */ | switch /* ... and so do switches */ { $$ = $1; } | label case - { $$ = newSTATEOP(0, $1, $2); } + { $$ = newSTATEOP(0, PVAL($1), $2); } | label ';' - { if ($1 != Nullch) { - $$ = newSTATEOP(0, $1, newOP(OP_NULL, 0)); - } - else { - $$ = Nullop; - PL_copline = NOLINE; - } - PL_expect = XSTATE; } + { + if (PVAL($1)) { + $$ = newSTATEOP(0, PVAL($1), newOP(OP_NULL, 0)); + TOKEN_GETMAD($1,$$,'L'); + TOKEN_GETMAD($2,((LISTOP*)$$)->op_first,';'); + } + else { + $$ = IF_MAD( + newOP(OP_NULL, 0), + Nullop); + PL_copline = NOLINE; + TOKEN_FREE($1); + TOKEN_GETMAD($2,$$,';'); + } + PL_expect = XSTATE; + } | label sideff ';' - { $$ = newSTATEOP(0, $1, $2); - PL_expect = XSTATE; } + { + $$ = newSTATEOP(0, PVAL($1), $2); + PL_expect = XSTATE; + DO_MAD( + /* sideff might already have a nexstate */ + OP* op = ((LISTOP*)$$)->op_first; + if (op) { + while (op->op_sibling && + op->op_sibling->op_type == OP_NEXTSTATE) + op = op->op_sibling; + token_getmad($1,op,'L'); + token_getmad($3,op,';'); + } + ) + } ; /* An expression which may have a side-effect */ @@ -181,38 +238,62 @@ sideff : error | expr { $$ = $1; } | expr IF expr - { $$ = newLOGOP(OP_AND, 0, $3, $1); } + { $$ = newLOGOP(OP_AND, 0, $3, $1); + TOKEN_GETMAD($2,$$,'i'); + } | expr UNLESS expr - { $$ = newLOGOP(OP_OR, 0, $3, $1); } + { $$ = newLOGOP(OP_OR, 0, $3, $1); + TOKEN_GETMAD($2,$$,'i'); + } | expr WHILE expr - { $$ = newLOOPOP(OPf_PARENS, 1, scalar($3), $1); } + { $$ = newLOOPOP(OPf_PARENS, 1, scalar($3), $1); + TOKEN_GETMAD($2,$$,'w'); + } | expr UNTIL iexpr - { $$ = newLOOPOP(OPf_PARENS, 1, $3, $1);} + { $$ = newLOOPOP(OPf_PARENS, 1, $3, $1); + TOKEN_GETMAD($2,$$,'w'); + } | expr FOR expr - { $$ = newFOROP(0, Nullch, (line_t)$2, - Nullop, $3, $1, Nullop); } + { $$ = newFOROP(0, Nullch, (line_t)IVAL($2), + Nullop, $3, $1, Nullop); + TOKEN_GETMAD($2,((LISTOP*)$$)->op_first->op_sibling,'w'); + } ; /* else and elsif blocks */ else : /* NULL */ { $$ = Nullop; } | ELSE mblock - { ($2)->op_flags |= OPf_PARENS; $$ = scope($2); } + { ($2)->op_flags |= OPf_PARENS; $$ = scope($2); + TOKEN_GETMAD($1,$$,'o'); + } | ELSIF '(' mexpr ')' mblock else - { PL_copline = (line_t)$1; + { PL_copline = (line_t)IVAL($1); $$ = newCONDOP(0, $3, scope($5), $6); - PL_hints |= HINT_BLOCK_SCOPE; } + PL_hints |= HINT_BLOCK_SCOPE; + TOKEN_GETMAD($1,$$,'I'); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($4,$$,')'); + } ; /* Real conditional expressions */ cond : IF '(' remember mexpr ')' mblock else - { PL_copline = (line_t)$1; + { PL_copline = (line_t)IVAL($1); $$ = block_end($3, - newCONDOP(0, $4, scope($6), $7)); } + newCONDOP(0, $4, scope($6), $7)); + TOKEN_GETMAD($1,$$,'I'); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($5,$$,')'); + } | UNLESS '(' remember miexpr ')' mblock else - { PL_copline = (line_t)$1; + { PL_copline = (line_t)IVAL($1); $$ = block_end($3, - newCONDOP(0, $4, scope($6), $7)); } + newCONDOP(0, $4, scope($6), $7)); + TOKEN_GETMAD($1,$$,'I'); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($5,$$,')'); + } ; /* Cases for a switch statement */ @@ -227,41 +308,94 @@ case : WHEN '(' remember mexpr ')' mblock cont : /* NULL */ { $$ = Nullop; } | CONTINUE block - { $$ = scope($2); } + { $$ = scope($2); + TOKEN_GETMAD($1,$$,'o'); + } ; /* Loops: while, until, for, and a bare block */ loop : label WHILE '(' remember texpr ')' mintro mblock cont - { PL_copline = (line_t)$2; + { OP *innerop; + PL_copline = (line_t)$2; $$ = block_end($4, - newSTATEOP(0, $1, - newWHILEOP(0, 1, (LOOP*)Nullop, - $2, $5, $8, $9, $7))); } + newSTATEOP(0, PVAL($1), + innerop = newWHILEOP(0, 1, (LOOP*)Nullop, + IVAL($2), $5, $8, $9, $7))); + TOKEN_GETMAD($1,innerop,'L'); + TOKEN_GETMAD($2,innerop,'W'); + TOKEN_GETMAD($3,innerop,'('); + TOKEN_GETMAD($6,innerop,')'); + } + | label UNTIL '(' remember iexpr ')' mintro mblock cont - { PL_copline = (line_t)$2; + { OP *innerop; + PL_copline = (line_t)$2; $$ = block_end($4, - newSTATEOP(0, $1, - newWHILEOP(0, 1, (LOOP*)Nullop, - $2, $5, $8, $9, $7))); } + newSTATEOP(0, PVAL($1), + innerop = newWHILEOP(0, 1, (LOOP*)Nullop, + IVAL($2), $5, $8, $9, $7))); + TOKEN_GETMAD($1,innerop,'L'); + TOKEN_GETMAD($2,innerop,'W'); + TOKEN_GETMAD($3,innerop,'('); + TOKEN_GETMAD($6,innerop,')'); + } | label FOR MY remember my_scalar '(' mexpr ')' mblock cont - { $$ = block_end($4, - newFOROP(0, $1, (line_t)$2, $5, $7, $9, $10)); } + { OP *innerop; + $$ = block_end($4, + innerop = newFOROP(0, PVAL($1), (line_t)IVAL($2), + $5, $7, $9, $10)); + TOKEN_GETMAD($1,((LISTOP*)innerop)->op_first,'L'); + TOKEN_GETMAD($2,((LISTOP*)innerop)->op_first->op_sibling,'W'); + TOKEN_GETMAD($3,((LISTOP*)innerop)->op_first->op_sibling,'d'); + TOKEN_GETMAD($6,((LISTOP*)innerop)->op_first->op_sibling,'('); + TOKEN_GETMAD($8,((LISTOP*)innerop)->op_first->op_sibling,')'); + } | label FOR scalar '(' remember mexpr ')' mblock cont - { $$ = block_end($5, - newFOROP(0, $1, (line_t)$2, mod($3, OP_ENTERLOOP), - $6, $8, $9)); } + { OP *innerop; + $$ = block_end($5, + innerop = newFOROP(0, PVAL($1), (line_t)IVAL($2), + mod($3, OP_ENTERLOOP), $6, $8, $9)); + TOKEN_GETMAD($1,((LISTOP*)innerop)->op_first,'L'); + TOKEN_GETMAD($2,((LISTOP*)innerop)->op_first->op_sibling,'W'); + TOKEN_GETMAD($4,((LISTOP*)innerop)->op_first->op_sibling,'('); + TOKEN_GETMAD($7,((LISTOP*)innerop)->op_first->op_sibling,')'); + } | label FOR '(' remember mexpr ')' mblock cont - { $$ = block_end($4, - newFOROP(0, $1, (line_t)$2, Nullop, $5, $7, $8)); } + { OP *innerop; + $$ = block_end($4, + innerop = newFOROP(0, PVAL($1), (line_t)IVAL($2), + Nullop, $5, $7, $8)); + TOKEN_GETMAD($1,((LISTOP*)innerop)->op_first,'L'); + TOKEN_GETMAD($2,((LISTOP*)innerop)->op_first->op_sibling,'W'); + TOKEN_GETMAD($3,((LISTOP*)innerop)->op_first->op_sibling,'('); + TOKEN_GETMAD($6,((LISTOP*)innerop)->op_first->op_sibling,')'); + } | label FOR '(' remember mnexpr ';' texpr ';' mintro mnexpr ')' mblock /* basically fake up an initialize-while lineseq */ { OP *forop; - PL_copline = (line_t)$2; - forop = newSTATEOP(0, $1, + PL_copline = (line_t)IVAL($2); + forop = newSTATEOP(0, PVAL($1), newWHILEOP(0, 1, (LOOP*)Nullop, - $2, scalar($7), + IVAL($2), scalar($7), $12, $10, $9)); +#ifdef MAD + if (!$5) + $5 = newOP(OP_NULL, 0); + forop = newUNOP(OP_NULL, 0, append_elem(OP_LINESEQ, + newSTATEOP(0, + (($1)->tk_lval.pval + ?savepv(($1)->tk_lval.pval):Nullch), + $5), + forop)); + + token_getmad($2,forop,'3'); + token_getmad($3,forop,'('); + token_getmad($6,forop,'1'); + token_getmad($8,forop,'2'); + token_getmad($11,forop,')'); + token_getmad($1,forop,'L'); +#else if ($5) { forop = append_elem(OP_LINESEQ, newSTATEOP(0, ($1?savepv($1):Nullch), @@ -269,18 +403,21 @@ loop : label WHILE '(' remember texpr ')' mintro mblock cont forop); } + +#endif $$ = block_end($4, forop); } | label block cont /* a block is a loop that happens once */ - { $$ = newSTATEOP(0, $1, + { $$ = newSTATEOP(0, PVAL($1), newWHILEOP(0, 1, (LOOP*)Nullop, - NOLINE, Nullop, $2, $3, 0)); } + NOLINE, Nullop, $2, $3, 0)); + TOKEN_GETMAD($1,((LISTOP*)$$)->op_first,'L'); } ; /* Switch blocks */ switch : label GIVEN '(' remember mydefsv mexpr ')' mblock { PL_copline = (line_t) $2; $$ = block_end($4, - newSTATEOP(0, $1, + newSTATEOP(0, PVAL($1), newGIVENOP($6, scope($8), (PADOFFSET) $5) )); } ; @@ -299,7 +436,9 @@ nexpr : /* NULL */ /* Boolean expression */ texpr : /* NULL means true */ - { (void)scan_num("1", &yylval); $$ = yylval.opval; } + { YYSTYPE tmplval; + (void)scan_num("1", &tmplval); + $$ = tmplval.opval; } | expr ; @@ -323,26 +462,53 @@ miexpr : iexpr /* Optional "MAIN:"-style loop labels */ label : /* empty */ - { $$ = Nullch; } + { +#ifdef MAD + YYSTYPE tmplval; + tmplval.pval = Nullch; + $$ = newTOKEN(OP_NULL, tmplval, 0); +#else + $$ = Nullch; +#endif + } | LABEL ; -/* Some kind of declaration - does not take part in the parse tree */ +/* Some kind of declaration - just hang on peg in the parse tree */ decl : format - { $$ = 0; } + { $$ = $1; } | subrout - { $$ = 0; } + { $$ = $1; } | mysubrout - { $$ = 0; } + { $$ = $1; } | package - { $$ = 0; } + { $$ = $1; } | use - { $$ = 0; } + { $$ = $1; } + + /* these two are only used by MAD */ + + | peg + { $$ = $1; } + ; + +peg : PEG + { $$ = newOP(OP_NULL,0); + TOKEN_GETMAD($1,$$,'p'); + } ; format : FORMAT startformsub formname block { SvREFCNT_inc(PL_compcv); - newFORM($2, $3, $4); } +#ifdef MAD + $$ = newFORM($2, $3, $4); + prepend_madprops($1->tk_mad, $$, 'F'); + $1->tk_mad = 0; + token_free($1); +#else + newFORM($2, $3, $4); +#endif + } ; formname: WORD { $$ = $1; } @@ -352,18 +518,40 @@ formname: WORD { $$ = $1; } /* Unimplemented "my sub foo { }" */ mysubrout: MYSUB startsub subname proto subattrlist subbody { SvREFCNT_inc(PL_compcv); - newMYSUB($2, $3, $4, $5, $6); } +#ifdef MAD + $$ = newMYSUB($2, $3, $4, $5, $6); + token_getmad($1,$$,'d'); +#else + newMYSUB($2, $3, $4, $5, $6); +#endif + } ; /* Subroutine definition */ subrout : SUB startsub subname proto subattrlist subbody { SvREFCNT_inc(PL_compcv); - newATTRSUB($2, $3, $4, $5, $6); } +#ifdef MAD + OP* o = newSVOP(OP_ANONCODE, 0, + (SV*)newATTRSUB($2, $3, $4, $5, $6)); + $$ = newOP(OP_NULL,0); + op_getmad(o,$$,'&'); + op_getmad($3,$$,'n'); + op_getmad($4,$$,'s'); + op_getmad($5,$$,'a'); + token_getmad($1,$$,'d'); + append_madprops($6->op_madprop, $$, 0); + $6->op_madprop = 0; +#else + newATTRSUB($2, $3, $4, $5, $6); + $$ = Nullop; +#endif + } ; startsub: /* NULL */ /* start a regular subroutine scope */ { $$ = start_subparse(FALSE, 0); SAVEFREESV(PL_compcv); } + ; startanonsub: /* NULL */ /* start an anonymous subroutine scope */ @@ -395,89 +583,169 @@ proto : /* NULL */ subattrlist: /* NULL */ { $$ = Nullop; } | COLONATTR THING - { $$ = $2; } + { $$ = $2; + TOKEN_GETMAD($1,$$,':'); + } | COLONATTR - { $$ = Nullop; } + { $$ = IF_MAD( + newOP(OP_NULL, 0), + Nullop + ); + TOKEN_GETMAD($1,$$,':'); + } ; /* List of attributes for a "my" variable declaration */ myattrlist: COLONATTR THING - { $$ = $2; } + { $$ = $2; + TOKEN_GETMAD($1,$$,':'); + } | COLONATTR - { $$ = Nullop; } + { $$ = IF_MAD( + newOP(OP_NULL, 0), + Nullop + ); + TOKEN_GETMAD($1,$$,':'); + } ; /* Subroutine body - either null or a block */ subbody : block { $$ = $1; } - | ';' { $$ = Nullop; PL_expect = XSTATE; } + | ';' { $$ = IF_MAD( + newOP(OP_NULL,0), + Nullop + ); + PL_expect = XSTATE; + TOKEN_GETMAD($1,$$,';'); + } ; package : PACKAGE WORD ';' - { package($2); } + { +#ifdef MAD + $$ = package($2); + token_getmad($1,$$,'o'); + token_getmad($3,$$,';'); +#else + package($2); +#endif + } ; use : USE startsub { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ } WORD WORD listexpr ';' - { SvREFCNT_inc(PL_compcv); - utilize($1, $2, $4, $5, $6); } + { SvREFCNT_inc(PL_compcv); +#ifdef MAD + $$ = utilize(IVAL($1), $2, $4, $5, $6); + token_getmad($1,$$,'o'); + token_getmad($7,$$,';'); + if (PL_rsfp_filters && AvFILLp(PL_rsfp_filters) >= 0) + append_madprops(newMADPROP('!', MAD_PV, "", 0), $$, 0); +#else + utilize(IVAL($1), $2, $4, $5, $6); +#endif + } ; /* Ordinary expressions; logical combinations */ expr : expr ANDOP expr - { $$ = newLOGOP(OP_AND, 0, $1, $3); } + { $$ = newLOGOP(OP_AND, 0, $1, $3); + TOKEN_GETMAD($2,$$,'o'); + } | expr OROP expr - { $$ = newLOGOP($2, 0, $1, $3); } + { $$ = newLOGOP(IVAL($2), 0, $1, $3); + TOKEN_GETMAD($2,$$,'o'); + } | expr DOROP expr - { $$ = newLOGOP(OP_DOR, 0, $1, $3); } + { $$ = newLOGOP(OP_DOR, 0, $1, $3); + TOKEN_GETMAD($2,$$,'o'); + } | argexpr %prec PREC_LOW ; /* Expressions are a list of terms joined by commas */ argexpr : argexpr ',' - { $$ = $1; } + { +#ifdef MAD + OP* op = newNULLLIST(); + token_getmad($2,op,','); + $$ = append_elem(OP_LIST, $1, op); +#else + $$ = $1; +#endif + } | argexpr ',' term - { $$ = append_elem(OP_LIST, $1, $3); } + { + DO_MAD( + $3 = newUNOP(OP_NULL, 0, $3); + token_getmad($2,$3,','); + ) + $$ = append_elem(OP_LIST, $1, $3); + } | term %prec PREC_LOW ; /* List operators */ listop : LSTOP indirob argexpr /* map {...} @args or print $fh @args */ - { $$ = convert($1, OPf_STACKED, - prepend_elem(OP_LIST, newGVREF($1,$2), $3) ); } + { $$ = convert(IVAL($1), OPf_STACKED, + prepend_elem(OP_LIST, newGVREF(IVAL($1),$2), $3) ); + TOKEN_GETMAD($1,$$,'o'); + } | FUNC '(' indirob expr ')' /* print ($fh @args */ - { $$ = convert($1, OPf_STACKED, - prepend_elem(OP_LIST, newGVREF($1,$3), $4) ); } + { $$ = convert(IVAL($1), OPf_STACKED, + prepend_elem(OP_LIST, newGVREF(IVAL($1),$3), $4) ); + TOKEN_GETMAD($1,$$,'o'); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($5,$$,')'); + } | term ARROW method '(' listexprcom ')' /* $foo->bar(list) */ { $$ = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, scalar($1), $5), - newUNOP(OP_METHOD, 0, $3))); } + newUNOP(OP_METHOD, 0, $3))); + TOKEN_GETMAD($2,$$,'A'); + TOKEN_GETMAD($4,$$,'('); + TOKEN_GETMAD($6,$$,')'); + } | term ARROW method /* $foo->bar */ { $$ = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, scalar($1), - newUNOP(OP_METHOD, 0, $3))); } + newUNOP(OP_METHOD, 0, $3))); + TOKEN_GETMAD($2,$$,'A'); + } | METHOD indirob listexpr /* new Class @args */ { $$ = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, $2, $3), - newUNOP(OP_METHOD, 0, $1))); } + newUNOP(OP_METHOD, 0, $1))); + } | FUNCMETH indirob '(' listexprcom ')' /* method $object (@args) */ { $$ = convert(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, prepend_elem(OP_LIST, $2, $4), - newUNOP(OP_METHOD, 0, $1))); } + newUNOP(OP_METHOD, 0, $1))); + TOKEN_GETMAD($3,$$,'('); + TOKEN_GETMAD($5,$$,')'); + } | LSTOP listexpr /* print @args */ - { $$ = convert($1, 0, $2); } + { $$ = convert(IVAL($1), 0, $2); + TOKEN_GETMAD($1,$$,'o'); + } | FUNC '(' listexprcom ')' /* print (@args) */ - { $$ = convert($1, 0, $3); } + { $$ = convert(IVAL($1), 0, $3); + TOKEN_GETMAD($1,$$,'o'); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($4,$$,')'); + } | LSTOPSUB startanonsub block /* sub f(&@); f { foo } ... */ { SvREFCNT_inc(PL_compcv); $3 = newANONATTRSUB($2, 0, Nullop, $3); } listexpr %prec LSTOP /* ... @bar */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, - prepend_elem(OP_LIST, $3, $5), $1)); } + prepend_elem(OP_LIST, $3, $5), $1)); + } ; /* Names of methods. May use $object->$methodname */ @@ -490,128 +758,259 @@ subscripted: star '{' expr ';' '}' /* *main::{something} */ /* In this and all the hash accessors, ';' is * provided by the tokeniser */ { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3)); - PL_expect = XOPERATOR; } + PL_expect = XOPERATOR; + TOKEN_GETMAD($2,$$,'{'); + TOKEN_GETMAD($4,$$,';'); + TOKEN_GETMAD($5,$$,'}'); + } | scalar '[' expr ']' /* $array[$element] */ - { $$ = newBINOP(OP_AELEM, 0, oopsAV($1), scalar($3)); } + { $$ = newBINOP(OP_AELEM, 0, oopsAV($1), scalar($3)); + TOKEN_GETMAD($2,$$,'['); + TOKEN_GETMAD($4,$$,']'); + } | term ARROW '[' expr ']' /* somearef->[$element] */ { $$ = newBINOP(OP_AELEM, 0, ref(newAVREF($1),OP_RV2AV), - scalar($4));} + scalar($4)); + TOKEN_GETMAD($2,$$,'a'); + TOKEN_GETMAD($3,$$,'['); + TOKEN_GETMAD($5,$$,']'); + } | subscripted '[' expr ']' /* $foo->[$bar]->[$baz] */ { $$ = newBINOP(OP_AELEM, 0, ref(newAVREF($1),OP_RV2AV), - scalar($3));} + scalar($3)); + TOKEN_GETMAD($2,$$,'['); + TOKEN_GETMAD($4,$$,']'); + } | scalar '{' expr ';' '}' /* $foo->{bar();} */ { $$ = newBINOP(OP_HELEM, 0, oopsHV($1), jmaybe($3)); - PL_expect = XOPERATOR; } + PL_expect = XOPERATOR; + TOKEN_GETMAD($2,$$,'{'); + TOKEN_GETMAD($4,$$,';'); + TOKEN_GETMAD($5,$$,'}'); + } | term ARROW '{' expr ';' '}' /* somehref->{bar();} */ { $$ = newBINOP(OP_HELEM, 0, ref(newHVREF($1),OP_RV2HV), jmaybe($4)); - PL_expect = XOPERATOR; } + PL_expect = XOPERATOR; + TOKEN_GETMAD($2,$$,'a'); + TOKEN_GETMAD($3,$$,'{'); + TOKEN_GETMAD($5,$$,';'); + TOKEN_GETMAD($6,$$,'}'); + } | subscripted '{' expr ';' '}' /* $foo->[bar]->{baz;} */ { $$ = newBINOP(OP_HELEM, 0, ref(newHVREF($1),OP_RV2HV), jmaybe($3)); - PL_expect = XOPERATOR; } + PL_expect = XOPERATOR; + TOKEN_GETMAD($2,$$,'{'); + TOKEN_GETMAD($4,$$,';'); + TOKEN_GETMAD($5,$$,'}'); + } | term ARROW '(' ')' /* $subref->() */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar($1))); } + newCVREF(0, scalar($1))); + TOKEN_GETMAD($2,$$,'a'); + TOKEN_GETMAD($3,$$,'('); + TOKEN_GETMAD($4,$$,')'); + } | term ARROW '(' expr ')' /* $subref->(@args) */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, $4, - newCVREF(0, scalar($1)))); } + newCVREF(0, scalar($1)))); + TOKEN_GETMAD($2,$$,'a'); + TOKEN_GETMAD($3,$$,'('); + TOKEN_GETMAD($5,$$,')'); + } | subscripted '(' expr ')' /* $foo->{bar}->(@args) */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, $3, - newCVREF(0, scalar($1)))); } + newCVREF(0, scalar($1)))); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($4,$$,')'); + } | subscripted '(' ')' /* $foo->{bar}->() */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - newCVREF(0, scalar($1))); } + newCVREF(0, scalar($1))); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($3,$$,')'); + } | '(' expr ')' '[' expr ']' /* list slice */ - { $$ = newSLICEOP(0, $5, $2); } + { $$ = newSLICEOP(0, $5, $2); + TOKEN_GETMAD($1,$$,'('); + TOKEN_GETMAD($3,$$,')'); + TOKEN_GETMAD($4,$$,'['); + TOKEN_GETMAD($6,$$,']'); + } | '(' ')' '[' expr ']' /* empty list slice! */ - { $$ = newSLICEOP(0, $4, Nullop); } + { $$ = newSLICEOP(0, $4, Nullop); + TOKEN_GETMAD($1,$$,'('); + TOKEN_GETMAD($2,$$,')'); + TOKEN_GETMAD($3,$$,'['); + TOKEN_GETMAD($5,$$,']'); + } ; /* Binary operators between terms */ -termbinop : term ASSIGNOP term /* $x = $y */ - { $$ = newASSIGNOP(OPf_STACKED, $1, $2, $3); } +termbinop: term ASSIGNOP term /* $x = $y */ + { $$ = newASSIGNOP(OPf_STACKED, $1, IVAL($2), $3); + TOKEN_GETMAD($2,$$,'o'); + } | term POWOP term /* $x ** $y */ - { $$ = newBINOP($2, 0, scalar($1), scalar($3)); } + { $$ = newBINOP(IVAL($2), 0, scalar($1), scalar($3)); + TOKEN_GETMAD($2,$$,'o'); + } | term MULOP term /* $x * $y, $x x $y */ - { if ($2 != OP_REPEAT) + { if (IVAL($2) != OP_REPEAT) scalar($1); - $$ = newBINOP($2, 0, $1, scalar($3)); } + $$ = newBINOP(IVAL($2), 0, $1, scalar($3)); + TOKEN_GETMAD($2,$$,'o'); + } | term ADDOP term /* $x + $y */ - { $$ = newBINOP($2, 0, scalar($1), scalar($3)); } + { $$ = newBINOP(IVAL($2), 0, scalar($1), scalar($3)); + TOKEN_GETMAD($2,$$,'o'); + } | term SHIFTOP term /* $x >> $y, $x << $y */ - { $$ = newBINOP($2, 0, scalar($1), scalar($3)); } + { $$ = newBINOP(IVAL($2), 0, scalar($1), scalar($3)); + TOKEN_GETMAD($2,$$,'o'); + } | term RELOP term /* $x > $y, etc. */ - { $$ = newBINOP($2, 0, scalar($1), scalar($3)); } + { $$ = newBINOP(IVAL($2), 0, scalar($1), scalar($3)); + TOKEN_GETMAD($2,$$,'o'); + } | term EQOP term /* $x == $y, $x eq $y */ - { $$ = newBINOP($2, 0, scalar($1), scalar($3)); } + { $$ = newBINOP(IVAL($2), 0, scalar($1), scalar($3)); + TOKEN_GETMAD($2,$$,'o'); + } | term BITANDOP term /* $x & $y */ - { $$ = newBINOP($2, 0, scalar($1), scalar($3)); } + { $$ = newBINOP(IVAL($2), 0, scalar($1), scalar($3)); + TOKEN_GETMAD($2,$$,'o'); + } | term BITOROP term /* $x | $y */ - { $$ = newBINOP($2, 0, scalar($1), scalar($3)); } + { $$ = newBINOP(IVAL($2), 0, scalar($1), scalar($3)); + TOKEN_GETMAD($2,$$,'o'); + } | term DOTDOT term /* $x..$y, $x...$y */ - { $$ = newRANGE($2, scalar($1), scalar($3));} + { + $$ = newRANGE(IVAL($2), scalar($1), scalar($3)); + DO_MAD( + UNOP *op; + op = (UNOP*)$$; + 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($2,(OP*)op,'o'); + ) + } | term ANDAND term /* $x && $y */ - { $$ = newLOGOP(OP_AND, 0, $1, $3); } + { $$ = newLOGOP(OP_AND, 0, $1, $3); + TOKEN_GETMAD($2,$$,'o'); + } | term OROR term /* $x || $y */ - { $$ = newLOGOP(OP_OR, 0, $1, $3); } + { $$ = newLOGOP(OP_OR, 0, $1, $3); + TOKEN_GETMAD($2,$$,'o'); + } | term DORDOR term /* $x // $y */ - { $$ = newLOGOP(OP_DOR, 0, $1, $3); } + { $$ = newLOGOP(OP_DOR, 0, $1, $3); + TOKEN_GETMAD($2,$$,'o'); + } | term MATCHOP term /* $x =~ /$y/ */ - { $$ = bind_match($2, $1, $3); } + { $$ = bind_match(IVAL($2), $1, $3); + TOKEN_GETMAD($2, + ($$->op_type == OP_NOT + ? ((UNOP*)$$)->op_first : $$), + '~'); + } ; /* Unary operators and terms */ termunop : '-' term %prec UMINUS /* -$x */ - { $$ = newUNOP(OP_NEGATE, 0, scalar($2)); } + { $$ = newUNOP(OP_NEGATE, 0, scalar($2)); + TOKEN_GETMAD($1,$$,'o'); + } | '+' term %prec UMINUS /* +$x */ - { $$ = $2; } + { $$ = IF_MAD( + newUNOP(OP_NULL, 0, $2), + $2 + ); + TOKEN_GETMAD($1,$$,'+'); + } | '!' term /* !$x */ - { $$ = newUNOP(OP_NOT, 0, scalar($2)); } + { $$ = newUNOP(OP_NOT, 0, scalar($2)); + TOKEN_GETMAD($1,$$,'o'); + } | '~' term /* ~$x */ - { $$ = newUNOP(OP_COMPLEMENT, 0, scalar($2));} + { $$ = newUNOP(OP_COMPLEMENT, 0, scalar($2)); + TOKEN_GETMAD($1,$$,'o'); + } | term POSTINC /* $x++ */ { $$ = newUNOP(OP_POSTINC, 0, - mod(scalar($1), OP_POSTINC)); } + mod(scalar($1), OP_POSTINC)); + TOKEN_GETMAD($2,$$,'o'); + } | term POSTDEC /* $x-- */ { $$ = newUNOP(OP_POSTDEC, 0, - mod(scalar($1), OP_POSTDEC)); } + mod(scalar($1), OP_POSTDEC)); + TOKEN_GETMAD($2,$$,'o'); + } | PREINC term /* ++$x */ { $$ = newUNOP(OP_PREINC, 0, - mod(scalar($2), OP_PREINC)); } + mod(scalar($2), OP_PREINC)); + TOKEN_GETMAD($1,$$,'o'); + } | PREDEC term /* --$x */ { $$ = newUNOP(OP_PREDEC, 0, - mod(scalar($2), OP_PREDEC)); } + mod(scalar($2), OP_PREDEC)); + TOKEN_GETMAD($1,$$,'o'); + } ; /* Constructors for anonymous data */ anonymous: '[' expr ']' - { $$ = newANONLIST($2); } + { $$ = newANONLIST($2); + TOKEN_GETMAD($1,$$,'['); + TOKEN_GETMAD($3,$$,']'); + } | '[' ']' - { $$ = newANONLIST(Nullop); } + { $$ = newANONLIST(Nullop); + TOKEN_GETMAD($1,$$,'['); + TOKEN_GETMAD($2,$$,']'); + } | HASHBRACK expr ';' '}' %prec '(' /* { foo => "Bar" } */ - { $$ = newANONHASH($2); } + { $$ = newANONHASH($2); + TOKEN_GETMAD($1,$$,'{'); + TOKEN_GETMAD($3,$$,';'); + TOKEN_GETMAD($4,$$,'}'); + } | HASHBRACK ';' '}' %prec '(' /* { } (';' by tokener) */ - { $$ = newANONHASH(Nullop); } + { $$ = newANONHASH(Nullop); + TOKEN_GETMAD($1,$$,'{'); + TOKEN_GETMAD($2,$$,';'); + TOKEN_GETMAD($3,$$,'}'); + } | ANONSUB startanonsub proto subattrlist block %prec '(' { SvREFCNT_inc(PL_compcv); - $$ = newANONATTRSUB($2, $3, $4, $5); } + $$ = newANONATTRSUB($2, $3, $4, $5); + TOKEN_GETMAD($1,$$,'o'); + OP_GETMAD($3,$$,'s'); + OP_GETMAD($4,$$,'a'); + } ; /* Things called with "do" */ termdo : DO term %prec UNIOP /* do $filename */ - { $$ = dofile($2, $1); } + { $$ = dofile($2, $1); + TOKEN_GETMAD($1,$$,'o'); + } | DO block %prec '(' /* do { code */ - { $$ = newUNOP(OP_NULL, OPf_SPECIAL, scope($2)); } + { $$ = newUNOP(OP_NULL, OPf_SPECIAL, scope($2)); + TOKEN_GETMAD($1,$$,'D'); + } | DO WORD '(' ')' /* do somesub() */ { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, @@ -619,7 +1018,11 @@ termdo : DO term %prec UNIOP /* do $filename */ scalar(newCVREF( (OPpENTERSUB_AMPER<<8), scalar($2) - )),Nullop)); dep();} + )),Nullop)); dep(); + TOKEN_GETMAD($1,$$,'o'); + TOKEN_GETMAD($3,$$,'('); + TOKEN_GETMAD($4,$$,')'); + } | DO WORD '(' expr ')' /* do somesub(@args) */ { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, @@ -628,16 +1031,28 @@ termdo : DO term %prec UNIOP /* do $filename */ scalar(newCVREF( (OPpENTERSUB_AMPER<<8), scalar($2) - )))); dep();} + )))); dep(); + TOKEN_GETMAD($1,$$,'o'); + TOKEN_GETMAD($3,$$,'('); + TOKEN_GETMAD($5,$$,')'); + } | DO scalar '(' ')' /* do $subref () */ { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, - scalar(newCVREF(0,scalar($2))), Nullop)); dep();} + scalar(newCVREF(0,scalar($2))), Nullop)); dep(); + TOKEN_GETMAD($1,$$,'o'); + TOKEN_GETMAD($3,$$,'('); + TOKEN_GETMAD($4,$$,')'); + } | DO scalar '(' expr ')' /* do $subref (@args) */ { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, prepend_elem(OP_LIST, $4, - scalar(newCVREF(0,scalar($2))))); dep();} + scalar(newCVREF(0,scalar($2))))); dep(); + TOKEN_GETMAD($1,$$,'o'); + TOKEN_GETMAD($3,$$,'('); + TOKEN_GETMAD($5,$$,')'); + } ; @@ -646,17 +1061,30 @@ term : termbinop | anonymous | termdo | term '?' term ':' term - { $$ = newCONDOP(0, $1, $3, $5); } + { $$ = newCONDOP(0, $1, $3, $5); + TOKEN_GETMAD($2,$$,'?'); + TOKEN_GETMAD($4,$$,':'); + } | REFGEN term /* \$x, \@y, \%z */ - { $$ = newUNOP(OP_REFGEN, 0, mod($2,OP_REFGEN)); } + { $$ = newUNOP(OP_REFGEN, 0, mod($2,OP_REFGEN)); + TOKEN_GETMAD($1,$$,'o'); + } | myattrterm %prec UNIOP { $$ = $1; } | LOCAL term %prec UNIOP - { $$ = localize($2,$1); } + { $$ = localize($2,IVAL($1)); + TOKEN_GETMAD($1,$$,'d'); + } | '(' expr ')' - { $$ = sawparens($2); } + { $$ = sawparens(IF_MAD(newUNOP(OP_NULL,0,$2), $2)); + TOKEN_GETMAD($1,$$,'('); + TOKEN_GETMAD($3,$$,')'); + } | '(' ')' - { $$ = sawparens(newNULLLIST()); } + { $$ = sawparens(newNULLLIST()); + TOKEN_GETMAD($1,$$,'('); + TOKEN_GETMAD($2,$$,')'); + } | scalar %prec '(' { $$ = $1; } | star %prec '(' @@ -674,42 +1102,76 @@ term : termbinop newOP(OP_PUSHMARK, 0), newLISTOP(OP_ASLICE, 0, list($3), - ref($1, OP_ASLICE))); } + ref($1, OP_ASLICE))); + TOKEN_GETMAD($2,$$,'['); + TOKEN_GETMAD($4,$$,']'); + } | ary '{' expr ';' '}' /* @hash{@keys} */ { $$ = prepend_elem(OP_HSLICE, newOP(OP_PUSHMARK, 0), newLISTOP(OP_HSLICE, 0, list($3), ref(oopsHV($1), OP_HSLICE))); - PL_expect = XOPERATOR; } + PL_expect = XOPERATOR; + TOKEN_GETMAD($2,$$,'{'); + TOKEN_GETMAD($4,$$,';'); + TOKEN_GETMAD($5,$$,'}'); + } | THING %prec '(' { $$ = $1; } | amper /* &foo; */ { $$ = newUNOP(OP_ENTERSUB, 0, scalar($1)); } | amper '(' ')' /* &foo() */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); } + { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($3,$$,')'); + } | amper '(' expr ')' /* &foo(@args) */ - { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, $3, scalar($1))); } + { + $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, $3, scalar($1))); + DO_MAD( + OP* op = $$; + if (op->op_type == OP_CONST) { /* defeat const fold */ + op = (OP*)op->op_madprop->mad_val; + } + token_getmad($2,op,'('); + token_getmad($4,op,')'); + ) + } | NOAMP WORD listexpr /* foo(@args) */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, $3, scalar($2))); } + append_elem(OP_LIST, $3, scalar($2))); + TOKEN_GETMAD($1,$$,'o'); + } | LOOPEX /* loop exiting command (goto, last, dump, etc) */ - { $$ = newOP($1, OPf_SPECIAL); - PL_hints |= HINT_BLOCK_SCOPE; } + { $$ = newOP(IVAL($1), OPf_SPECIAL); + PL_hints |= HINT_BLOCK_SCOPE; + TOKEN_GETMAD($1,$$,'o'); + } | LOOPEX term - { $$ = newLOOPEX($1,$2); } + { $$ = newLOOPEX(IVAL($1),$2); + TOKEN_GETMAD($1,$$,'o'); + } | NOTOP argexpr /* not $foo */ - { $$ = newUNOP(OP_NOT, 0, scalar($2)); } + { $$ = newUNOP(OP_NOT, 0, scalar($2)); + TOKEN_GETMAD($1,$$,'o'); + } | UNIOP /* Unary op, $_ implied */ - { $$ = newOP($1, 0); } - | UNIOP block /* eval { foo } */ - { $$ = newUNOP($1, 0, $2); } + { $$ = newOP(IVAL($1), 0); + TOKEN_GETMAD($1,$$,'o'); + } + | UNIOP block /* eval { foo }* */ + { $$ = newUNOP(IVAL($1), 0, $2); + TOKEN_GETMAD($1,$$,'o'); + } | UNIOP term /* Unary op */ - { $$ = newUNOP($1, 0, $2); } - | REQUIRE /* require, $_ implied */ + { $$ = newUNOP(IVAL($1), 0, $2); + TOKEN_GETMAD($1,$$,'o'); + } + | REQUIRE /* require, $_ implied *//* FIMXE for MAD needed? */ { $$ = newOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0); } - | REQUIRE term /* require Foo */ + | REQUIRE term /* require Foo *//* FIMXE for MAD needed? */ { $$ = newUNOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0, $2); } | UNIOPSUB { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); } @@ -717,35 +1179,68 @@ term : termbinop { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, $2, scalar($1))); } | FUNC0 /* Nullary operator */ - { $$ = newOP($1, 0); } + { $$ = newOP(IVAL($1), 0); + TOKEN_GETMAD($1,$$,'o'); + } | FUNC0 '(' ')' - { $$ = newOP($1, 0); } + { $$ = newOP(IVAL($1), 0); + TOKEN_GETMAD($1,$$,'o'); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($3,$$,')'); + } | FUNC0SUB /* Sub treated as nullop */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); } | FUNC1 '(' ')' /* not () */ - { $$ = $1 == OP_NOT ? newUNOP($1, 0, newSVOP(OP_CONST, 0, newSViv(0))) - : newOP($1, OPf_SPECIAL); } + { $$ = (IVAL($1) == OP_NOT) + ? newUNOP(IVAL($1), 0, newSVOP(OP_CONST, 0, newSViv(0))) + : newOP(IVAL($1), OPf_SPECIAL); + + TOKEN_GETMAD($1,$$,'o'); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($3,$$,')'); + } | FUNC1 '(' expr ')' /* not($foo) */ - { $$ = newUNOP($1, 0, $3); } - | PMFUNC '(' argexpr ')' /* m//, s///, tr/// */ - { $$ = pmruntime($1, $3, 1); } + { $$ = newUNOP(IVAL($1), 0, $3); + TOKEN_GETMAD($1,$$,'o'); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($4,$$,')'); + } + | PMFUNC '(' argexpr ')' /* m//, s///, tr/// */ + { $$ = pmruntime($1, $3, 1); + TOKEN_GETMAD($2,$$,'('); + TOKEN_GETMAD($4,$$,')'); + } | WORD | listop ; /* "my" declarations, with optional attributes */ myattrterm: MY myterm myattrlist - { $$ = my_attrs($2,$3); } + { $$ = my_attrs($2,$3); + DO_MAD( + token_getmad($1,$$,'d'); + append_madprops($3->op_madprop, $$, 'a'); + $3->op_madprop = 0; + ) + } | MY myterm - { $$ = localize($2,$1); } + { $$ = localize($2,IVAL($1)); + TOKEN_GETMAD($1,$$,'d'); + } ; /* Things that can be "my"'d */ myterm : '(' expr ')' - { $$ = sawparens($2); } + { $$ = sawparens($2); + TOKEN_GETMAD($1,$$,'('); + TOKEN_GETMAD($3,$$,')'); + } | '(' ')' - { $$ = sawparens(newNULLLIST()); } + { $$ = sawparens(newNULLLIST()); + TOKEN_GETMAD($1,$$,'('); + TOKEN_GETMAD($2,$$,')'); + } | scalar %prec '(' { $$ = $1; } | hsh %prec '(' @@ -766,7 +1261,16 @@ listexprcom: /* NULL */ | expr { $$ = $1; } | expr ',' - { $$ = $1; } + { +#ifdef MAD + OP* op = newNULLLIST(); + token_getmad($2,op,','); + $$ = append_elem(OP_LIST, $1, op); +#else + $$ = $1; +#endif + + } ; /* A little bit of trickery to make "for my $foo (@bar)" actually be @@ -776,34 +1280,46 @@ my_scalar: scalar ; amper : '&' indirob - { $$ = newCVREF($1,$2); } + { $$ = newCVREF(IVAL($1),$2); + TOKEN_GETMAD($1,$$,'&'); + } ; scalar : '$' indirob - { $$ = newSVREF($2); } + { $$ = newSVREF($2); + TOKEN_GETMAD($1,$$,'$'); + } ; ary : '@' indirob - { $$ = newAVREF($2); } + { $$ = newAVREF($2); + TOKEN_GETMAD($1,$$,'@'); + } ; hsh : '%' indirob - { $$ = newHVREF($2); } + { $$ = newHVREF($2); + TOKEN_GETMAD($1,$$,'%'); + } ; arylen : DOLSHARP indirob - { $$ = newAVREF($2); } + { $$ = newAVREF($2); + TOKEN_GETMAD($1,$$,'l'); + } ; star : '*' indirob - { $$ = newGVREF(0,$2); } + { $$ = newGVREF(0,$2); + TOKEN_GETMAD($1,$$,'*'); + } ; /* Indirect objects */ indirob : WORD { $$ = scalar($1); } | scalar %prec PREC_LOW - { $$ = scalar($1); } + { $$ = scalar($1); } | block { $$ = scope($1); }