This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5337delta: note that stadtx was removed
[perl5.git] / perly.act
... / ...
CommitLineData
1/* -*- buffer-read-only: t -*-
2 !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
3 This file is built by regen_perly.pl from perly.y.
4 Any changes made here will be lost!
5 */
6
7case 2:
8#line 138 "perly.y"
9 {
10 parser->expect = XSTATE;
11 (yyval.ival) = 0;
12 }
13
14 break;
15
16 case 3:
17#line 143 "perly.y"
18 {
19 newPROG(block_end((ps[-1].val.ival),(ps[0].val.opval)));
20 PL_compiling.cop_seq = 0;
21 (yyval.ival) = 0;
22 }
23
24 break;
25
26 case 4:
27#line 149 "perly.y"
28 {
29 parser->expect = XTERM;
30 (yyval.ival) = 0;
31 }
32
33 break;
34
35 case 5:
36#line 154 "perly.y"
37 {
38 PL_eval_root = (ps[0].val.opval);
39 (yyval.ival) = 0;
40 }
41
42 break;
43
44 case 6:
45#line 159 "perly.y"
46 {
47 parser->expect = XBLOCK;
48 (yyval.ival) = 0;
49 }
50
51 break;
52
53 case 7:
54#line 164 "perly.y"
55 {
56 PL_pad_reset_pending = TRUE;
57 PL_eval_root = (ps[0].val.opval);
58 (yyval.ival) = 0;
59 yyunlex();
60 parser->yychar = yytoken = YYEOF;
61 }
62
63 break;
64
65 case 8:
66#line 172 "perly.y"
67 {
68 parser->expect = XSTATE;
69 (yyval.ival) = 0;
70 }
71
72 break;
73
74 case 9:
75#line 177 "perly.y"
76 {
77 PL_pad_reset_pending = TRUE;
78 PL_eval_root = (ps[0].val.opval);
79 (yyval.ival) = 0;
80 yyunlex();
81 parser->yychar = yytoken = YYEOF;
82 }
83
84 break;
85
86 case 10:
87#line 185 "perly.y"
88 {
89 parser->expect = XSTATE;
90 (yyval.ival) = 0;
91 }
92
93 break;
94
95 case 11:
96#line 190 "perly.y"
97 {
98 PL_pad_reset_pending = TRUE;
99 PL_eval_root = (ps[0].val.opval);
100 (yyval.ival) = 0;
101 yyunlex();
102 parser->yychar = yytoken = YYEOF;
103 }
104
105 break;
106
107 case 12:
108#line 198 "perly.y"
109 {
110 parser->expect = XSTATE;
111 (yyval.ival) = 0;
112 }
113
114 break;
115
116 case 13:
117#line 203 "perly.y"
118 {
119 PL_eval_root = (ps[0].val.opval);
120 (yyval.ival) = 0;
121 }
122
123 break;
124
125 case 14:
126#line 208 "perly.y"
127 {
128 parser->expect = XSTATE;
129 (yyval.ival) = 0;
130 }
131
132 break;
133
134 case 15:
135#line 213 "perly.y"
136 {
137 PL_eval_root = (ps[0].val.opval);
138 (yyval.ival) = 0;
139 }
140
141 break;
142
143 case 16:
144#line 221 "perly.y"
145 { if (parser->copline > (line_t)(ps[-3].val.ival))
146 parser->copline = (line_t)(ps[-3].val.ival);
147 (yyval.opval) = block_end((ps[-2].val.ival), (ps[-1].val.opval));
148 }
149
150 break;
151
152 case 17:
153#line 229 "perly.y"
154 { if (parser->copline > (line_t)(ps[-6].val.ival))
155 parser->copline = (line_t)(ps[-6].val.ival);
156 (yyval.opval) = block_end((ps[-5].val.ival), (ps[-2].val.opval));
157 }
158
159 break;
160
161 case 18:
162#line 236 "perly.y"
163 { (yyval.ival) = block_start(TRUE);
164 parser->parsed_sub = 0; }
165
166 break;
167
168 case 19:
169#line 241 "perly.y"
170 { if (parser->copline > (line_t)(ps[-3].val.ival))
171 parser->copline = (line_t)(ps[-3].val.ival);
172 (yyval.opval) = block_end((ps[-2].val.ival), (ps[-1].val.opval));
173 }
174
175 break;
176
177 case 20:
178#line 248 "perly.y"
179 { (yyval.ival) = block_start(FALSE);
180 parser->parsed_sub = 0; }
181
182 break;
183
184 case 21:
185#line 254 "perly.y"
186 { (yyval.opval) = NULL; }
187
188 break;
189
190 case 22:
191#line 256 "perly.y"
192 { (yyval.opval) = op_append_list(OP_LINESEQ, (ps[-1].val.opval), (ps[0].val.opval));
193 PL_pad_reset_pending = TRUE;
194 if ((ps[-1].val.opval) && (ps[0].val.opval))
195 PL_hints |= HINT_BLOCK_SCOPE;
196 }
197
198 break;
199
200 case 23:
201#line 265 "perly.y"
202 { (yyval.opval) = NULL; }
203
204 break;
205
206 case 24:
207#line 267 "perly.y"
208 { (yyval.opval) = op_append_list(OP_LINESEQ, (ps[-1].val.opval), (ps[0].val.opval));
209 PL_pad_reset_pending = TRUE;
210 if ((ps[-1].val.opval) && (ps[0].val.opval))
211 PL_hints |= HINT_BLOCK_SCOPE;
212 }
213
214 break;
215
216 case 25:
217#line 276 "perly.y"
218 {
219 (yyval.opval) = (ps[0].val.opval) ? newSTATEOP(0, NULL, (ps[0].val.opval)) : NULL;
220 }
221
222 break;
223
224 case 26:
225#line 280 "perly.y"
226 { (yyval.opval) = (ps[0].val.opval); }
227
228 break;
229
230 case 27:
231#line 284 "perly.y"
232 {
233 SV *label = cSVOPx_sv((ps[-1].val.opval));
234 (yyval.opval) = newSTATEOP(SvFLAGS(label) & SVf_UTF8,
235 savepv(SvPVX_const(label)), (ps[0].val.opval));
236 op_free((ps[-1].val.opval));
237 }
238
239 break;
240
241 case 28:
242#line 291 "perly.y"
243 {
244 SV *label = cSVOPx_sv((ps[-1].val.opval));
245 (yyval.opval) = newSTATEOP(SvFLAGS(label) & SVf_UTF8,
246 savepv(SvPVX_const(label)), (ps[0].val.opval));
247 op_free((ps[-1].val.opval));
248 }
249
250 break;
251
252 case 29:
253#line 301 "perly.y"
254 { (yyval.opval) = (ps[0].val.opval); }
255
256 break;
257
258 case 30:
259#line 303 "perly.y"
260 {
261 CV *fmtcv = PL_compcv;
262 newFORM((ps[-2].val.ival), (ps[-1].val.opval), (ps[0].val.opval));
263 (yyval.opval) = NULL;
264 if (CvOUTSIDE(fmtcv) && !CvEVAL(CvOUTSIDE(fmtcv))) {
265 pad_add_weakref(fmtcv);
266 }
267 parser->parsed_sub = 1;
268 }
269
270 break;
271
272 case 31:
273#line 315 "perly.y"
274 {
275 init_named_cv(PL_compcv, (ps[-1].val.opval));
276 parser->in_my = 0;
277 parser->in_my_stash = NULL;
278 }
279
280 break;
281
282 case 32:
283#line 321 "perly.y"
284 {
285 SvREFCNT_inc_simple_void(PL_compcv);
286 (ps[-5].val.opval)->op_type == OP_CONST
287 ? newATTRSUB((ps[-4].val.ival), (ps[-5].val.opval), (ps[-2].val.opval), (ps[-1].val.opval), (ps[0].val.opval))
288 : newMYSUB((ps[-4].val.ival), (ps[-5].val.opval), (ps[-2].val.opval), (ps[-1].val.opval), (ps[0].val.opval))
289 ;
290 (yyval.opval) = NULL;
291 intro_my();
292 parser->parsed_sub = 1;
293 }
294
295 break;
296
297 case 33:
298#line 336 "perly.y"
299 {
300 init_named_cv(PL_compcv, (ps[-1].val.opval));
301 parser->in_my = 0;
302 parser->in_my_stash = NULL;
303 }
304
305 break;
306
307 case 34:
308#line 342 "perly.y"
309 {
310 SvREFCNT_inc_simple_void(PL_compcv);
311 (ps[-4].val.opval)->op_type == OP_CONST
312 ? newATTRSUB((ps[-3].val.ival), (ps[-4].val.opval), NULL, (ps[-1].val.opval), (ps[0].val.opval))
313 : newMYSUB( (ps[-3].val.ival), (ps[-4].val.opval), NULL, (ps[-1].val.opval), (ps[0].val.opval))
314 ;
315 (yyval.opval) = NULL;
316 intro_my();
317 parser->parsed_sub = 1;
318 }
319
320 break;
321
322 case 35:
323#line 353 "perly.y"
324 {
325 package((ps[-1].val.opval));
326 if ((ps[-2].val.opval))
327 package_version((ps[-2].val.opval));
328 (yyval.opval) = NULL;
329 }
330
331 break;
332
333 case 36:
334#line 360 "perly.y"
335 { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ }
336
337 break;
338
339 case 37:
340#line 362 "perly.y"
341 {
342 SvREFCNT_inc_simple_void(PL_compcv);
343 utilize((ps[-6].val.ival), (ps[-5].val.ival), (ps[-3].val.opval), (ps[-2].val.opval), (ps[-1].val.opval));
344 parser->parsed_sub = 1;
345 (yyval.opval) = NULL;
346 }
347
348 break;
349
350 case 38:
351#line 369 "perly.y"
352 {
353 (yyval.opval) = block_end((ps[-4].val.ival),
354 newCONDOP(0, (ps[-3].val.opval), op_scope((ps[-1].val.opval)), (ps[0].val.opval)));
355 parser->copline = (line_t)(ps[-6].val.ival);
356 }
357
358 break;
359
360 case 39:
361#line 375 "perly.y"
362 {
363 (yyval.opval) = block_end((ps[-4].val.ival),
364 newCONDOP(0, (ps[-3].val.opval), (ps[0].val.opval), op_scope((ps[-1].val.opval))));
365 parser->copline = (line_t)(ps[-6].val.ival);
366 }
367
368 break;
369
370 case 40:
371#line 381 "perly.y"
372 {
373 (yyval.opval) = block_end((ps[-3].val.ival), newGIVENOP((ps[-2].val.opval), op_scope((ps[0].val.opval)), 0));
374 parser->copline = (line_t)(ps[-5].val.ival);
375 }
376
377 break;
378
379 case 41:
380#line 386 "perly.y"
381 { (yyval.opval) = block_end((ps[-3].val.ival), newWHENOP((ps[-2].val.opval), op_scope((ps[0].val.opval)))); }
382
383 break;
384
385 case 42:
386#line 388 "perly.y"
387 { (yyval.opval) = newWHENOP(0, op_scope((ps[0].val.opval))); }
388
389 break;
390
391 case 43:
392#line 390 "perly.y"
393 {
394 (yyval.opval) = block_end((ps[-5].val.ival),
395 newWHILEOP(0, 1, NULL,
396 (ps[-4].val.opval), (ps[-1].val.opval), (ps[0].val.opval), (ps[-2].val.ival)));
397 parser->copline = (line_t)(ps[-7].val.ival);
398 }
399
400 break;
401
402 case 44:
403#line 397 "perly.y"
404 {
405 (yyval.opval) = block_end((ps[-5].val.ival),
406 newWHILEOP(0, 1, NULL,
407 (ps[-4].val.opval), (ps[-1].val.opval), (ps[0].val.opval), (ps[-2].val.ival)));
408 parser->copline = (line_t)(ps[-7].val.ival);
409 }
410
411 break;
412
413 case 45:
414#line 404 "perly.y"
415 { parser->expect = XTERM; }
416
417 break;
418
419 case 46:
420#line 406 "perly.y"
421 { parser->expect = XTERM; }
422
423 break;
424
425 case 47:
426#line 409 "perly.y"
427 {
428 OP *initop = (ps[-9].val.opval);
429 OP *forop = newWHILEOP(0, 1, NULL,
430 scalar((ps[-6].val.opval)), (ps[0].val.opval), (ps[-2].val.opval), (ps[-3].val.ival));
431 if (initop) {
432 forop = op_prepend_elem(OP_LINESEQ, initop,
433 op_append_elem(OP_LINESEQ,
434 newOP(OP_UNSTACK, OPf_SPECIAL),
435 forop));
436 }
437 PL_hints |= HINT_BLOCK_SCOPE;
438 (yyval.opval) = block_end((ps[-10].val.ival), forop);
439 parser->copline = (line_t)(ps[-12].val.ival);
440 }
441
442 break;
443
444 case 48:
445#line 424 "perly.y"
446 {
447 (yyval.opval) = block_end((ps[-6].val.ival), newFOROP(0, (ps[-5].val.opval), (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval)));
448 parser->copline = (line_t)(ps[-8].val.ival);
449 }
450
451 break;
452
453 case 49:
454#line 429 "perly.y"
455 {
456 (yyval.opval) = block_end((ps[-4].val.ival), newFOROP(0,
457 op_lvalue((ps[-6].val.opval), OP_ENTERLOOP), (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval)));
458 parser->copline = (line_t)(ps[-7].val.ival);
459 }
460
461 break;
462
463 case 50:
464#line 435 "perly.y"
465 { parser->in_my = 0; (yyval.opval) = my((ps[0].val.opval)); }
466
467 break;
468
469 case 51:
470#line 437 "perly.y"
471 {
472 (yyval.opval) = block_end(
473 (ps[-7].val.ival),
474 newFOROP(0,
475 op_lvalue(
476 newUNOP(OP_REFGEN, 0,
477 (ps[-5].val.opval)),
478 OP_ENTERLOOP),
479 (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval))
480 );
481 parser->copline = (line_t)(ps[-9].val.ival);
482 }
483
484 break;
485
486 case 52:
487#line 450 "perly.y"
488 {
489 (yyval.opval) = block_end((ps[-4].val.ival), newFOROP(
490 0, op_lvalue(newUNOP(OP_REFGEN, 0,
491 (ps[-6].val.opval)),
492 OP_ENTERLOOP), (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval)));
493 parser->copline = (line_t)(ps[-8].val.ival);
494 }
495
496 break;
497
498 case 53:
499#line 458 "perly.y"
500 {
501 (yyval.opval) = block_end((ps[-4].val.ival),
502 newFOROP(0, NULL, (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval)));
503 parser->copline = (line_t)(ps[-6].val.ival);
504 }
505
506 break;
507
508 case 54:
509#line 464 "perly.y"
510 { parser->in_my = 1; }
511
512 break;
513
514 case 55:
515#line 466 "perly.y"
516 { parser->in_my = 0; intro_my(); }
517
518 break;
519
520 case 56:
521#line 468 "perly.y"
522 {
523 (yyval.opval) = newTRYCATCHOP(0,
524 (ps[-8].val.opval), (ps[-3].val.opval), block_end((ps[-4].val.ival), op_scope((ps[0].val.opval))));
525 }
526
527 break;
528
529 case 57:
530#line 473 "perly.y"
531 {
532 /* a block is a loop that happens once */
533 (yyval.opval) = newWHILEOP(0, 1, NULL,
534 NULL, (ps[-1].val.opval), (ps[0].val.opval), 0);
535 }
536
537 break;
538
539 case 58:
540#line 479 "perly.y"
541 {
542 package((ps[-2].val.opval));
543 if ((ps[-3].val.opval)) {
544 package_version((ps[-3].val.opval));
545 }
546 }
547
548 break;
549
550 case 59:
551#line 486 "perly.y"
552 {
553 /* a block is a loop that happens once */
554 (yyval.opval) = newWHILEOP(0, 1, NULL,
555 NULL, block_end((ps[-3].val.ival), (ps[-1].val.opval)), NULL, 0);
556 if (parser->copline > (line_t)(ps[-4].val.ival))
557 parser->copline = (line_t)(ps[-4].val.ival);
558 }
559
560 break;
561
562 case 60:
563#line 494 "perly.y"
564 {
565 (yyval.opval) = (ps[-1].val.opval);
566 }
567
568 break;
569
570 case 61:
571#line 498 "perly.y"
572 {
573 (yyval.opval) = newLISTOP(OP_DIE, 0, newOP(OP_PUSHMARK, 0),
574 newSVOP(OP_CONST, 0, newSVpvs("Unimplemented")));
575 }
576
577 break;
578
579 case 62:
580#line 503 "perly.y"
581 {
582 (yyval.opval) = NULL;
583 parser->copline = NOLINE;
584 }
585
586 break;
587
588 case 63:
589#line 511 "perly.y"
590 { OP *list;
591 if ((ps[0].val.opval)) {
592 OP *term = (ps[0].val.opval);
593 list = op_append_elem(OP_LIST, (ps[-1].val.opval), term);
594 }
595 else {
596 list = (ps[-1].val.opval);
597 }
598 if (parser->copline == NOLINE)
599 parser->copline = CopLINE(PL_curcop)-1;
600 else parser->copline--;
601 (yyval.opval) = newSTATEOP(0, NULL,
602 op_convert_list(OP_FORMLINE, 0, list));
603 }
604
605 break;
606
607 case 64:
608#line 528 "perly.y"
609 { (yyval.opval) = NULL; }
610
611 break;
612
613 case 65:
614#line 530 "perly.y"
615 { (yyval.opval) = op_unscope((ps[-1].val.opval)); }
616
617 break;
618
619 case 67:
620#line 538 "perly.y"
621 { (yyval.opval) = NULL; }
622
623 break;
624
625 case 68:
626#line 540 "perly.y"
627 { (yyval.opval) = (ps[0].val.opval); }
628
629 break;
630
631 case 69:
632#line 542 "perly.y"
633 { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[0].val.opval), (ps[-2].val.opval)); }
634
635 break;
636
637 case 70:
638#line 544 "perly.y"
639 { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[0].val.opval), (ps[-2].val.opval)); }
640
641 break;
642
643 case 71:
644#line 546 "perly.y"
645 { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((ps[0].val.opval)), (ps[-2].val.opval)); }
646
647 break;
648
649 case 72:
650#line 548 "perly.y"
651 { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (ps[0].val.opval), (ps[-2].val.opval)); }
652
653 break;
654
655 case 73:
656#line 550 "perly.y"
657 { (yyval.opval) = newFOROP(0, NULL, (ps[0].val.opval), (ps[-2].val.opval), NULL);
658 parser->copline = (line_t)(ps[-1].val.ival); }
659
660 break;
661
662 case 74:
663#line 553 "perly.y"
664 { (yyval.opval) = newWHENOP((ps[0].val.opval), op_scope((ps[-2].val.opval))); }
665
666 break;
667
668 case 75:
669#line 558 "perly.y"
670 { (yyval.opval) = NULL; }
671
672 break;
673
674 case 76:
675#line 560 "perly.y"
676 {
677 ((ps[0].val.opval))->op_flags |= OPf_PARENS;
678 (yyval.opval) = op_scope((ps[0].val.opval));
679 }
680
681 break;
682
683 case 77:
684#line 565 "perly.y"
685 { parser->copline = (line_t)(ps[-5].val.ival);
686 (yyval.opval) = newCONDOP(0,
687 newSTATEOP(OPf_SPECIAL,NULL,(ps[-3].val.opval)),
688 op_scope((ps[-1].val.opval)), (ps[0].val.opval));
689 PL_hints |= HINT_BLOCK_SCOPE;
690 }
691
692 break;
693
694 case 78:
695#line 575 "perly.y"
696 { (yyval.opval) = NULL; }
697
698 break;
699
700 case 79:
701#line 577 "perly.y"
702 { (yyval.opval) = op_scope((ps[0].val.opval)); }
703
704 break;
705
706 case 80:
707#line 582 "perly.y"
708 { (yyval.ival) = (PL_min_intro_pending &&
709 PL_max_intro_pending >= PL_min_intro_pending);
710 intro_my(); }
711
712 break;
713
714 case 81:
715#line 588 "perly.y"
716 { (yyval.opval) = NULL; }
717
718 break;
719
720 case 83:
721#line 594 "perly.y"
722 { YYSTYPE tmplval;
723 (void)scan_num("1", &tmplval);
724 (yyval.opval) = tmplval.opval; }
725
726 break;
727
728 case 85:
729#line 602 "perly.y"
730 { (yyval.opval) = invert(scalar((ps[0].val.opval))); }
731
732 break;
733
734 case 86:
735#line 607 "perly.y"
736 { (yyval.opval) = (ps[0].val.opval); intro_my(); }
737
738 break;
739
740 case 87:
741#line 611 "perly.y"
742 { (yyval.opval) = (ps[0].val.opval); intro_my(); }
743
744 break;
745
746 case 88:
747#line 614 "perly.y"
748 { (yyval.opval) = (ps[0].val.opval); }
749
750 break;
751
752 case 89:
753#line 615 "perly.y"
754 { (yyval.opval) = NULL; }
755
756 break;
757
758 case 90:
759#line 619 "perly.y"
760 { (yyval.ival) = start_subparse(FALSE, 0);
761 SAVEFREESV(PL_compcv); }
762
763 break;
764
765 case 91:
766#line 625 "perly.y"
767 { (yyval.ival) = start_subparse(FALSE, CVf_ANON);
768 SAVEFREESV(PL_compcv); }
769
770 break;
771
772 case 92:
773#line 630 "perly.y"
774 { (yyval.ival) = start_subparse(TRUE, 0);
775 SAVEFREESV(PL_compcv); }
776
777 break;
778
779 case 95:
780#line 641 "perly.y"
781 { (yyval.opval) = NULL; }
782
783 break;
784
785 case 97:
786#line 647 "perly.y"
787 { (yyval.opval) = NULL; }
788
789 break;
790
791 case 98:
792#line 649 "perly.y"
793 { (yyval.opval) = (ps[0].val.opval); }
794
795 break;
796
797 case 99:
798#line 651 "perly.y"
799 { (yyval.opval) = NULL; }
800
801 break;
802
803 case 100:
804#line 656 "perly.y"
805 { (yyval.opval) = (ps[0].val.opval); }
806
807 break;
808
809 case 101:
810#line 658 "perly.y"
811 { (yyval.opval) = NULL; }
812
813 break;
814
815 case 102:
816#line 669 "perly.y"
817 { parser->in_my = 0; (yyval.opval) = NULL; }
818
819 break;
820
821 case 103:
822#line 671 "perly.y"
823 { parser->in_my = 0; (yyval.opval) = (ps[0].val.opval); }
824
825 break;
826
827 case 104:
828#line 676 "perly.y"
829 { (yyval.ival) = '@'; }
830
831 break;
832
833 case 105:
834#line 678 "perly.y"
835 { (yyval.ival) = '%'; }
836
837 break;
838
839 case 106:
840#line 682 "perly.y"
841 {
842 I32 sigil = (ps[-2].val.ival);
843 OP *var = (ps[-1].val.opval);
844 OP *defexpr = (ps[0].val.opval);
845
846 if (parser->sig_slurpy)
847 yyerror("Multiple slurpy parameters not allowed");
848 parser->sig_slurpy = (char)sigil;
849
850 if (defexpr)
851 yyerror("A slurpy parameter may not have "
852 "a default value");
853
854 (yyval.opval) = var ? newSTATEOP(0, NULL, var) : NULL;
855 }
856
857 break;
858
859 case 107:
860#line 701 "perly.y"
861 { (yyval.opval) = NULL; }
862
863 break;
864
865 case 108:
866#line 703 "perly.y"
867 { (yyval.opval) = newOP(OP_NULL, 0); }
868
869 break;
870
871 case 109:
872#line 705 "perly.y"
873 { (yyval.opval) = (ps[0].val.opval); }
874
875 break;
876
877 case 110:
878#line 711 "perly.y"
879 {
880 OP *var = (ps[-1].val.opval);
881 OP *defexpr = (ps[0].val.opval);
882
883 if (parser->sig_slurpy)
884 yyerror("Slurpy parameter not last");
885
886 parser->sig_elems++;
887
888 if (defexpr) {
889 parser->sig_optelems++;
890
891 if ( defexpr->op_type == OP_NULL
892 && !(defexpr->op_flags & OPf_KIDS))
893 {
894 /* handle '$=' special case */
895 if (var)
896 yyerror("Optional parameter "
897 "lacks default expression");
898 op_free(defexpr);
899 }
900 else {
901 /* a normal '=default' expression */
902 OP *defop = (OP*)alloc_LOGOP(OP_ARGDEFELEM,
903 defexpr,
904 LINKLIST(defexpr));
905 /* re-purpose op_targ to hold @_ index */
906 defop->op_targ =
907 (PADOFFSET)(parser->sig_elems - 1);
908
909 if (var) {
910 var->op_flags |= OPf_STACKED;
911 (void)op_sibling_splice(var,
912 NULL, 0, defop);
913 scalar(defop);
914 }
915 else
916 var = newUNOP(OP_NULL, 0, defop);
917
918 LINKLIST(var);
919 /* NB: normally the first child of a
920 * logop is executed before the logop,
921 * and it pushes a boolean result
922 * ready for the logop. For ARGDEFELEM,
923 * the op itself does the boolean
924 * calculation, so set the first op to
925 * it instead.
926 */
927 var->op_next = defop;
928 defexpr->op_next = var;
929 }
930 }
931 else {
932 if (parser->sig_optelems)
933 yyerror("Mandatory parameter "
934 "follows optional parameter");
935 }
936
937 (yyval.opval) = var ? newSTATEOP(0, NULL, var) : NULL;
938 }
939
940 break;
941
942 case 111:
943#line 776 "perly.y"
944 { parser->in_my = KEY_sigvar; (yyval.opval) = (ps[0].val.opval); }
945
946 break;
947
948 case 112:
949#line 778 "perly.y"
950 { parser->in_my = KEY_sigvar; (yyval.opval) = (ps[0].val.opval); }
951
952 break;
953
954 case 113:
955#line 784 "perly.y"
956 { (yyval.opval) = (ps[-1].val.opval); }
957
958 break;
959
960 case 114:
961#line 786 "perly.y"
962 {
963 (yyval.opval) = op_append_list(OP_LINESEQ, (ps[-2].val.opval), (ps[0].val.opval));
964 }
965
966 break;
967
968 case 115:
969#line 790 "perly.y"
970 { (yyval.opval) = (ps[0].val.opval); }
971
972 break;
973
974 case 116:
975#line 795 "perly.y"
976 { (yyval.opval) = NULL; }
977
978 break;
979
980 case 117:
981#line 797 "perly.y"
982 { (yyval.opval) = (ps[0].val.opval); }
983
984 break;
985
986 case 118:
987#line 801 "perly.y"
988 { (yyval.opval) = NULL; }
989
990 break;
991
992 case 119:
993#line 803 "perly.y"
994 { (yyval.opval) = (ps[0].val.opval); }
995
996 break;
997
998 case 120:
999#line 807 "perly.y"
1000 { (yyval.opval) = (ps[-1].val.opval); }
1001
1002 break;
1003
1004 case 121:
1005#line 810 "perly.y"
1006 {
1007 ENTER;
1008 SAVEIV(parser->sig_elems);
1009 SAVEIV(parser->sig_optelems);
1010 SAVEI8(parser->sig_slurpy);
1011 parser->sig_elems = 0;
1012 parser->sig_optelems = 0;
1013 parser->sig_slurpy = 0;
1014 parser->in_my = KEY_sigvar;
1015 }
1016
1017 break;
1018
1019 case 122:
1020#line 821 "perly.y"
1021 {
1022 OP *sigops = (ps[0].val.opval);
1023 struct op_argcheck_aux *aux;
1024 OP *check;
1025
1026 if (!FEATURE_SIGNATURES_IS_ENABLED)
1027 Perl_croak(aTHX_ "Experimental "
1028 "subroutine signatures not enabled");
1029
1030 /* We shouldn't get here otherwise */
1031 Perl_ck_warner_d(aTHX_
1032 packWARN(WARN_EXPERIMENTAL__SIGNATURES),
1033 "The signatures feature is experimental");
1034
1035 aux = (struct op_argcheck_aux*)
1036 PerlMemShared_malloc(
1037 sizeof(struct op_argcheck_aux));
1038 aux->params = parser->sig_elems;
1039 aux->opt_params = parser->sig_optelems;
1040 aux->slurpy = parser->sig_slurpy;
1041 check = newUNOP_AUX(OP_ARGCHECK, 0, NULL,
1042 (UNOP_AUX_item *)aux);
1043 sigops = op_prepend_elem(OP_LINESEQ, check, sigops);
1044 sigops = op_prepend_elem(OP_LINESEQ,
1045 newSTATEOP(0, NULL, NULL),
1046 sigops);
1047 /* a nextstate at the end handles context
1048 * correctly for an empty sub body */
1049 sigops = op_append_elem(OP_LINESEQ,
1050 sigops,
1051 newSTATEOP(0, NULL, NULL));
1052 /* wrap the list of arg ops in a NULL aux op.
1053 This serves two purposes. First, it makes
1054 the arg list a separate subtree from the
1055 body of the sub, and secondly the null op
1056 may in future be upgraded to an OP_SIGNATURE
1057 when implemented. For now leave it as
1058 ex-argcheck */
1059 (yyval.opval) = newUNOP_AUX(OP_ARGCHECK, 0, sigops, NULL);
1060 op_null((yyval.opval));
1061
1062 parser->in_my = 0;
1063 /* tell the toker that attrributes can follow
1064 * this sig, but only so that the toker
1065 * can skip through any (illegal) trailing
1066 * attribute text then give a useful error
1067 * message about "attributes before sig",
1068 * rather than falling over ina mess at
1069 * unrecognised syntax.
1070 */
1071 parser->expect = XATTRBLOCK;
1072 parser->sig_seen = TRUE;
1073 LEAVE;
1074 }
1075
1076 break;
1077
1078 case 123:
1079#line 878 "perly.y"
1080 { (yyval.opval) = (ps[0].val.opval); }
1081
1082 break;
1083
1084 case 124:
1085#line 879 "perly.y"
1086 { (yyval.opval) = NULL; }
1087
1088 break;
1089
1090 case 125:
1091#line 885 "perly.y"
1092 {
1093 if (parser->copline > (line_t)(ps[-2].val.ival))
1094 parser->copline = (line_t)(ps[-2].val.ival);
1095 (yyval.opval) = block_end((ps[-3].val.ival), (ps[-1].val.opval));
1096 }
1097
1098 break;
1099
1100 case 126:
1101#line 895 "perly.y"
1102 { (yyval.opval) = (ps[0].val.opval); }
1103
1104 break;
1105
1106 case 127:
1107#line 896 "perly.y"
1108 { (yyval.opval) = NULL; }
1109
1110 break;
1111
1112 case 128:
1113#line 900 "perly.y"
1114 {
1115 if (parser->copline > (line_t)(ps[-2].val.ival))
1116 parser->copline = (line_t)(ps[-2].val.ival);
1117 (yyval.opval) = block_end((ps[-4].val.ival),
1118 op_append_list(OP_LINESEQ, (ps[-3].val.opval), (ps[-1].val.opval)));
1119 }
1120
1121 break;
1122
1123 case 129:
1124#line 911 "perly.y"
1125 { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
1126
1127 break;
1128
1129 case 130:
1130#line 913 "perly.y"
1131 { (yyval.opval) = newLOGOP((ps[-1].val.ival), 0, (ps[-2].val.opval), (ps[0].val.opval)); }
1132
1133 break;
1134
1135 case 132:
1136#line 919 "perly.y"
1137 { (yyval.opval) = (ps[-1].val.opval); }
1138
1139 break;
1140
1141 case 133:
1142#line 921 "perly.y"
1143 {
1144 OP* term = (ps[0].val.opval);
1145 (yyval.opval) = op_append_elem(OP_LIST, (ps[-2].val.opval), term);
1146 }
1147
1148 break;
1149
1150 case 135:
1151#line 930 "perly.y"
1152 { (yyval.opval) = op_convert_list((ps[-2].val.ival), OPf_STACKED,
1153 op_prepend_elem(OP_LIST, newGVREF((ps[-2].val.ival),(ps[-1].val.opval)), (ps[0].val.opval)) );
1154 }
1155
1156 break;
1157
1158 case 136:
1159#line 934 "perly.y"
1160 { (yyval.opval) = op_convert_list((ps[-4].val.ival), OPf_STACKED,
1161 op_prepend_elem(OP_LIST, newGVREF((ps[-4].val.ival),(ps[-2].val.opval)), (ps[-1].val.opval)) );
1162 }
1163
1164 break;
1165
1166 case 137:
1167#line 938 "perly.y"
1168 { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED,
1169 op_append_elem(OP_LIST,
1170 op_prepend_elem(OP_LIST, scalar((ps[-5].val.opval)), (ps[-1].val.opval)),
1171 newMETHOP(OP_METHOD, 0, (ps[-3].val.opval))));
1172 }
1173
1174 break;
1175
1176 case 138:
1177#line 944 "perly.y"
1178 { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED,
1179 op_append_elem(OP_LIST, scalar((ps[-2].val.opval)),
1180 newMETHOP(OP_METHOD, 0, (ps[0].val.opval))));
1181 }
1182
1183 break;
1184
1185 case 139:
1186#line 949 "perly.y"
1187 { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED,
1188 op_append_elem(OP_LIST,
1189 op_prepend_elem(OP_LIST, (ps[-1].val.opval), (ps[0].val.opval)),
1190 newMETHOP(OP_METHOD, 0, (ps[-2].val.opval))));
1191 }
1192
1193 break;
1194
1195 case 140:
1196#line 955 "perly.y"
1197 { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED,
1198 op_append_elem(OP_LIST,
1199 op_prepend_elem(OP_LIST, (ps[-3].val.opval), (ps[-1].val.opval)),
1200 newMETHOP(OP_METHOD, 0, (ps[-4].val.opval))));
1201 }
1202
1203 break;
1204
1205 case 141:
1206#line 961 "perly.y"
1207 { (yyval.opval) = op_convert_list((ps[-1].val.ival), 0, (ps[0].val.opval)); }
1208
1209 break;
1210
1211 case 142:
1212#line 963 "perly.y"
1213 { (yyval.opval) = op_convert_list((ps[-3].val.ival), 0, (ps[-1].val.opval)); }
1214
1215 break;
1216
1217 case 143:
1218#line 965 "perly.y"
1219 { (yyval.opval) = op_convert_list((ps[-3].val.ival), 0, (ps[-1].val.opval)); }
1220
1221 break;
1222
1223 case 144:
1224#line 967 "perly.y"
1225 { SvREFCNT_inc_simple_void(PL_compcv);
1226 (yyval.opval) = newANONATTRSUB((ps[-1].val.ival), 0, NULL, (ps[0].val.opval)); }
1227
1228 break;
1229
1230 case 145:
1231#line 970 "perly.y"
1232 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
1233 op_append_elem(OP_LIST,
1234 op_prepend_elem(OP_LIST, (ps[-1].val.opval), (ps[0].val.opval)), (ps[-4].val.opval)));
1235 }
1236
1237 break;
1238
1239 case 148:
1240#line 985 "perly.y"
1241 { (yyval.opval) = newBINOP(OP_GELEM, 0, (ps[-4].val.opval), scalar((ps[-2].val.opval))); }
1242
1243 break;
1244
1245 case 149:
1246#line 987 "perly.y"
1247 { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((ps[-3].val.opval)), scalar((ps[-1].val.opval)));
1248 }
1249
1250 break;
1251
1252 case 150:
1253#line 990 "perly.y"
1254 { (yyval.opval) = newBINOP(OP_AELEM, 0,
1255 ref(newAVREF((ps[-4].val.opval)),OP_RV2AV),
1256 scalar((ps[-1].val.opval)));
1257 }
1258
1259 break;
1260
1261 case 151:
1262#line 995 "perly.y"
1263 { (yyval.opval) = newBINOP(OP_AELEM, 0,
1264 ref(newAVREF((ps[-3].val.opval)),OP_RV2AV),
1265 scalar((ps[-1].val.opval)));
1266 }
1267
1268 break;
1269
1270 case 152:
1271#line 1000 "perly.y"
1272 { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((ps[-4].val.opval)), jmaybe((ps[-2].val.opval)));
1273 }
1274
1275 break;
1276
1277 case 153:
1278#line 1003 "perly.y"
1279 { (yyval.opval) = newBINOP(OP_HELEM, 0,
1280 ref(newHVREF((ps[-5].val.opval)),OP_RV2HV),
1281 jmaybe((ps[-2].val.opval))); }
1282
1283 break;
1284
1285 case 154:
1286#line 1007 "perly.y"
1287 { (yyval.opval) = newBINOP(OP_HELEM, 0,
1288 ref(newHVREF((ps[-4].val.opval)),OP_RV2HV),
1289 jmaybe((ps[-2].val.opval))); }
1290
1291 break;
1292
1293 case 155:
1294#line 1011 "perly.y"
1295 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
1296 newCVREF(0, scalar((ps[-3].val.opval))));
1297 if (parser->expect == XBLOCK)
1298 parser->expect = XOPERATOR;
1299 }
1300
1301 break;
1302
1303 case 156:
1304#line 1017 "perly.y"
1305 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
1306 op_append_elem(OP_LIST, (ps[-1].val.opval),
1307 newCVREF(0, scalar((ps[-4].val.opval)))));
1308 if (parser->expect == XBLOCK)
1309 parser->expect = XOPERATOR;
1310 }
1311
1312 break;
1313
1314 case 157:
1315#line 1025 "perly.y"
1316 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
1317 op_append_elem(OP_LIST, (ps[-1].val.opval),
1318 newCVREF(0, scalar((ps[-3].val.opval)))));
1319 if (parser->expect == XBLOCK)
1320 parser->expect = XOPERATOR;
1321 }
1322
1323 break;
1324
1325 case 158:
1326#line 1032 "perly.y"
1327 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
1328 newCVREF(0, scalar((ps[-2].val.opval))));
1329 if (parser->expect == XBLOCK)
1330 parser->expect = XOPERATOR;
1331 }
1332
1333 break;
1334
1335 case 159:
1336#line 1038 "perly.y"
1337 { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-4].val.opval)); }
1338
1339 break;
1340
1341 case 160:
1342#line 1040 "perly.y"
1343 { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-3].val.opval)); }
1344
1345 break;
1346
1347 case 161:
1348#line 1042 "perly.y"
1349 { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), NULL); }
1350
1351 break;
1352
1353 case 162:
1354#line 1047 "perly.y"
1355 { (yyval.opval) = newASSIGNOP(OPf_STACKED, (ps[-2].val.opval), (ps[-1].val.ival), (ps[0].val.opval)); }
1356
1357 break;
1358
1359 case 163:
1360#line 1049 "perly.y"
1361 { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
1362
1363 break;
1364
1365 case 164:
1366#line 1051 "perly.y"
1367 { if ((ps[-1].val.ival) != OP_REPEAT)
1368 scalar((ps[-2].val.opval));
1369 (yyval.opval) = newBINOP((ps[-1].val.ival), 0, (ps[-2].val.opval), scalar((ps[0].val.opval)));
1370 }
1371
1372 break;
1373
1374 case 165:
1375#line 1056 "perly.y"
1376 { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
1377
1378 break;
1379
1380 case 166:
1381#line 1058 "perly.y"
1382 { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
1383
1384 break;
1385
1386 case 167:
1387#line 1060 "perly.y"
1388 { (yyval.opval) = (ps[0].val.opval); }
1389
1390 break;
1391
1392 case 168:
1393#line 1062 "perly.y"
1394 { (yyval.opval) = (ps[0].val.opval); }
1395
1396 break;
1397
1398 case 169:
1399#line 1064 "perly.y"
1400 { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
1401
1402 break;
1403
1404 case 170:
1405#line 1066 "perly.y"
1406 { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
1407
1408 break;
1409
1410 case 171:
1411#line 1068 "perly.y"
1412 { (yyval.opval) = newRANGE((ps[-1].val.ival), scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
1413
1414 break;
1415
1416 case 172:
1417#line 1070 "perly.y"
1418 { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
1419
1420 break;
1421
1422 case 173:
1423#line 1072 "perly.y"
1424 { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
1425
1426 break;
1427
1428 case 174:
1429#line 1074 "perly.y"
1430 { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
1431
1432 break;
1433
1434 case 175:
1435#line 1076 "perly.y"
1436 { (yyval.opval) = bind_match((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); }
1437
1438 break;
1439
1440 case 176:
1441#line 1080 "perly.y"
1442 { (yyval.opval) = cmpchain_finish((ps[0].val.opval)); }
1443
1444 break;
1445
1446 case 177:
1447#line 1082 "perly.y"
1448 { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
1449
1450 break;
1451
1452 case 178:
1453#line 1084 "perly.y"
1454 { yyerror("syntax error"); YYERROR; }
1455
1456 break;
1457
1458 case 179:
1459#line 1086 "perly.y"
1460 { yyerror("syntax error"); YYERROR; }
1461
1462 break;
1463
1464 case 180:
1465#line 1090 "perly.y"
1466 { (yyval.opval) = cmpchain_start((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); }
1467
1468 break;
1469
1470 case 181:
1471#line 1092 "perly.y"
1472 { (yyval.opval) = cmpchain_extend((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); }
1473
1474 break;
1475
1476 case 182:
1477#line 1096 "perly.y"
1478 { (yyval.opval) = cmpchain_finish((ps[0].val.opval)); }
1479
1480 break;
1481
1482 case 183:
1483#line 1098 "perly.y"
1484 { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
1485
1486 break;
1487
1488 case 184:
1489#line 1100 "perly.y"
1490 { yyerror("syntax error"); YYERROR; }
1491
1492 break;
1493
1494 case 185:
1495#line 1102 "perly.y"
1496 { yyerror("syntax error"); YYERROR; }
1497
1498 break;
1499
1500 case 186:
1501#line 1106 "perly.y"
1502 { (yyval.opval) = cmpchain_start((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); }
1503
1504 break;
1505
1506 case 187:
1507#line 1108 "perly.y"
1508 { (yyval.opval) = cmpchain_extend((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); }
1509
1510 break;
1511
1512 case 188:
1513#line 1113 "perly.y"
1514 { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((ps[0].val.opval))); }
1515
1516 break;
1517
1518 case 189:
1519#line 1115 "perly.y"
1520 { (yyval.opval) = (ps[0].val.opval); }
1521
1522 break;
1523
1524 case 190:
1525#line 1118 "perly.y"
1526 { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[0].val.opval))); }
1527
1528 break;
1529
1530 case 191:
1531#line 1120 "perly.y"
1532 { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, scalar((ps[0].val.opval))); }
1533
1534 break;
1535
1536 case 192:
1537#line 1122 "perly.y"
1538 { (yyval.opval) = newUNOP(OP_POSTINC, 0,
1539 op_lvalue(scalar((ps[-1].val.opval)), OP_POSTINC)); }
1540
1541 break;
1542
1543 case 193:
1544#line 1125 "perly.y"
1545 { (yyval.opval) = newUNOP(OP_POSTDEC, 0,
1546 op_lvalue(scalar((ps[-1].val.opval)), OP_POSTDEC));}
1547
1548 break;
1549
1550 case 194:
1551#line 1128 "perly.y"
1552 { (yyval.opval) = op_convert_list(OP_JOIN, 0,
1553 op_append_elem(
1554 OP_LIST,
1555 newSVREF(scalar(
1556 newSVOP(OP_CONST,0,
1557 newSVpvs("\""))
1558 )),
1559 (ps[-1].val.opval)
1560 ));
1561 }
1562
1563 break;
1564
1565 case 195:
1566#line 1139 "perly.y"
1567 { (yyval.opval) = newUNOP(OP_PREINC, 0,
1568 op_lvalue(scalar((ps[0].val.opval)), OP_PREINC)); }
1569
1570 break;
1571
1572 case 196:
1573#line 1142 "perly.y"
1574 { (yyval.opval) = newUNOP(OP_PREDEC, 0,
1575 op_lvalue(scalar((ps[0].val.opval)), OP_PREDEC)); }
1576
1577 break;
1578
1579 case 197:
1580#line 1149 "perly.y"
1581 { (yyval.opval) = newANONLIST((ps[-1].val.opval)); }
1582
1583 break;
1584
1585 case 198:
1586#line 1151 "perly.y"
1587 { (yyval.opval) = newANONLIST(NULL);}
1588
1589 break;
1590
1591 case 199:
1592#line 1153 "perly.y"
1593 { (yyval.opval) = newANONHASH((ps[-2].val.opval)); }
1594
1595 break;
1596
1597 case 200:
1598#line 1155 "perly.y"
1599 { (yyval.opval) = newANONHASH(NULL); }
1600
1601 break;
1602
1603 case 201:
1604#line 1157 "perly.y"
1605 { SvREFCNT_inc_simple_void(PL_compcv);
1606 (yyval.opval) = newANONATTRSUB((ps[-3].val.ival), (ps[-2].val.opval), (ps[-1].val.opval), (ps[0].val.opval)); }
1607
1608 break;
1609
1610 case 202:
1611#line 1160 "perly.y"
1612 { SvREFCNT_inc_simple_void(PL_compcv);
1613 (yyval.opval) = newANONATTRSUB((ps[-2].val.ival), NULL, (ps[-1].val.opval), (ps[0].val.opval)); }
1614
1615 break;
1616
1617 case 203:
1618#line 1166 "perly.y"
1619 { (yyval.opval) = dofile((ps[0].val.opval), (ps[-1].val.ival));}
1620
1621 break;
1622
1623 case 204:
1624#line 1168 "perly.y"
1625 { (yyval.opval) = newUNOP(OP_NULL, OPf_SPECIAL, op_scope((ps[0].val.opval)));}
1626
1627 break;
1628
1629 case 209:
1630#line 1176 "perly.y"
1631 { (yyval.opval) = newCONDOP(0, (ps[-4].val.opval), (ps[-2].val.opval), (ps[0].val.opval)); }
1632
1633 break;
1634
1635 case 210:
1636#line 1178 "perly.y"
1637 { (yyval.opval) = newUNOP(OP_REFGEN, 0, (ps[0].val.opval)); }
1638
1639 break;
1640
1641 case 211:
1642#line 1180 "perly.y"
1643 { (yyval.opval) = newUNOP(OP_REFGEN, 0, localize((ps[0].val.opval),1)); }
1644
1645 break;
1646
1647 case 212:
1648#line 1182 "perly.y"
1649 { (yyval.opval) = (ps[0].val.opval); }
1650
1651 break;
1652
1653 case 213:
1654#line 1184 "perly.y"
1655 { (yyval.opval) = localize((ps[0].val.opval),0); }
1656
1657 break;
1658
1659 case 214:
1660#line 1186 "perly.y"
1661 { (yyval.opval) = sawparens((ps[-1].val.opval)); }
1662
1663 break;
1664
1665 case 215:
1666#line 1188 "perly.y"
1667 { (yyval.opval) = (ps[0].val.opval); }
1668
1669 break;
1670
1671 case 216:
1672#line 1190 "perly.y"
1673 { (yyval.opval) = sawparens(newNULLLIST()); }
1674
1675 break;
1676
1677 case 217:
1678#line 1192 "perly.y"
1679 { (yyval.opval) = (ps[0].val.opval); }
1680
1681 break;
1682
1683 case 218:
1684#line 1194 "perly.y"
1685 { (yyval.opval) = (ps[0].val.opval); }
1686
1687 break;
1688
1689 case 219:
1690#line 1196 "perly.y"
1691 { (yyval.opval) = (ps[0].val.opval); }
1692
1693 break;
1694
1695 case 220:
1696#line 1198 "perly.y"
1697 { (yyval.opval) = (ps[0].val.opval); }
1698
1699 break;
1700
1701 case 221:
1702#line 1200 "perly.y"
1703 { (yyval.opval) = newUNOP(OP_AV2ARYLEN, 0, ref((ps[0].val.opval), OP_AV2ARYLEN));}
1704
1705 break;
1706
1707 case 222:
1708#line 1202 "perly.y"
1709 { (yyval.opval) = (ps[0].val.opval); }
1710
1711 break;
1712
1713 case 223:
1714#line 1204 "perly.y"
1715 { (yyval.opval) = op_prepend_elem(OP_ASLICE,
1716 newOP(OP_PUSHMARK, 0),
1717 newLISTOP(OP_ASLICE, 0,
1718 list((ps[-1].val.opval)),
1719 ref((ps[-3].val.opval), OP_ASLICE)));
1720 if ((yyval.opval) && (ps[-3].val.opval))
1721 (yyval.opval)->op_private |=
1722 (ps[-3].val.opval)->op_private & OPpSLICEWARNING;
1723 }
1724
1725 break;
1726
1727 case 224:
1728#line 1214 "perly.y"
1729 { (yyval.opval) = op_prepend_elem(OP_KVASLICE,
1730 newOP(OP_PUSHMARK, 0),
1731 newLISTOP(OP_KVASLICE, 0,
1732 list((ps[-1].val.opval)),
1733 ref(oopsAV((ps[-3].val.opval)), OP_KVASLICE)));
1734 if ((yyval.opval) && (ps[-3].val.opval))
1735 (yyval.opval)->op_private |=
1736 (ps[-3].val.opval)->op_private & OPpSLICEWARNING;
1737 }
1738
1739 break;
1740
1741 case 225:
1742#line 1224 "perly.y"
1743 { (yyval.opval) = op_prepend_elem(OP_HSLICE,
1744 newOP(OP_PUSHMARK, 0),
1745 newLISTOP(OP_HSLICE, 0,
1746 list((ps[-2].val.opval)),
1747 ref(oopsHV((ps[-4].val.opval)), OP_HSLICE)));
1748 if ((yyval.opval) && (ps[-4].val.opval))
1749 (yyval.opval)->op_private |=
1750 (ps[-4].val.opval)->op_private & OPpSLICEWARNING;
1751 }
1752
1753 break;
1754
1755 case 226:
1756#line 1234 "perly.y"
1757 { (yyval.opval) = op_prepend_elem(OP_KVHSLICE,
1758 newOP(OP_PUSHMARK, 0),
1759 newLISTOP(OP_KVHSLICE, 0,
1760 list((ps[-2].val.opval)),
1761 ref((ps[-4].val.opval), OP_KVHSLICE)));
1762 if ((yyval.opval) && (ps[-4].val.opval))
1763 (yyval.opval)->op_private |=
1764 (ps[-4].val.opval)->op_private & OPpSLICEWARNING;
1765 }
1766
1767 break;
1768
1769 case 227:
1770#line 1244 "perly.y"
1771 { (yyval.opval) = (ps[0].val.opval); }
1772
1773 break;
1774
1775 case 228:
1776#line 1246 "perly.y"
1777 { (yyval.opval) = newUNOP(OP_ENTERSUB, 0, scalar((ps[0].val.opval))); }
1778
1779 break;
1780
1781 case 229:
1782#line 1248 "perly.y"
1783 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[-2].val.opval)));
1784 }
1785
1786 break;
1787
1788 case 230:
1789#line 1251 "perly.y"
1790 {
1791 (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
1792 op_append_elem(OP_LIST, (ps[-1].val.opval), scalar((ps[-3].val.opval))));
1793 }
1794
1795 break;
1796
1797 case 231:
1798#line 1256 "perly.y"
1799 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
1800 op_append_elem(OP_LIST, (ps[0].val.opval), scalar((ps[-1].val.opval))));
1801 }
1802
1803 break;
1804
1805 case 232:
1806#line 1260 "perly.y"
1807 { (yyval.opval) = newSVREF((ps[-3].val.opval)); }
1808
1809 break;
1810
1811 case 233:
1812#line 1262 "perly.y"
1813 { (yyval.opval) = newAVREF((ps[-3].val.opval)); }
1814
1815 break;
1816
1817 case 234:
1818#line 1264 "perly.y"
1819 { (yyval.opval) = newHVREF((ps[-3].val.opval)); }
1820
1821 break;
1822
1823 case 235:
1824#line 1266 "perly.y"
1825 { (yyval.opval) = newUNOP(OP_ENTERSUB, 0,
1826 scalar(newCVREF((ps[-1].val.ival),(ps[-3].val.opval)))); }
1827
1828 break;
1829
1830 case 236:
1831#line 1269 "perly.y"
1832 { (yyval.opval) = newGVREF(0,(ps[-3].val.opval)); }
1833
1834 break;
1835
1836 case 237:
1837#line 1271 "perly.y"
1838 { (yyval.opval) = newOP((ps[0].val.ival), OPf_SPECIAL);
1839 PL_hints |= HINT_BLOCK_SCOPE; }
1840
1841 break;
1842
1843 case 238:
1844#line 1274 "perly.y"
1845 { (yyval.opval) = newLOOPEX((ps[-1].val.ival),(ps[0].val.opval)); }
1846
1847 break;
1848
1849 case 239:
1850#line 1276 "perly.y"
1851 { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[0].val.opval))); }
1852
1853 break;
1854
1855 case 240:
1856#line 1278 "perly.y"
1857 { (yyval.opval) = newOP((ps[0].val.ival), 0); }
1858
1859 break;
1860
1861 case 241:
1862#line 1280 "perly.y"
1863 { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, (ps[0].val.opval)); }
1864
1865 break;
1866
1867 case 242:
1868#line 1282 "perly.y"
1869 { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, (ps[0].val.opval)); }
1870
1871 break;
1872
1873 case 243:
1874#line 1284 "perly.y"
1875 { (yyval.opval) = newOP(OP_REQUIRE, (ps[0].val.ival) ? OPf_SPECIAL : 0); }
1876
1877 break;
1878
1879 case 244:
1880#line 1286 "perly.y"
1881 { (yyval.opval) = newUNOP(OP_REQUIRE, (ps[-1].val.ival) ? OPf_SPECIAL : 0, (ps[0].val.opval)); }
1882
1883 break;
1884
1885 case 245:
1886#line 1288 "perly.y"
1887 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[0].val.opval))); }
1888
1889 break;
1890
1891 case 246:
1892#line 1290 "perly.y"
1893 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
1894 op_append_elem(OP_LIST, (ps[0].val.opval), scalar((ps[-1].val.opval)))); }
1895
1896 break;
1897
1898 case 247:
1899#line 1293 "perly.y"
1900 { (yyval.opval) = newOP((ps[0].val.ival), 0); }
1901
1902 break;
1903
1904 case 248:
1905#line 1295 "perly.y"
1906 { (yyval.opval) = newOP((ps[-2].val.ival), 0);}
1907
1908 break;
1909
1910 case 249:
1911#line 1297 "perly.y"
1912 { (yyval.opval) = (ps[0].val.opval); }
1913
1914 break;
1915
1916 case 250:
1917#line 1299 "perly.y"
1918 { (yyval.opval) = (ps[-2].val.opval); }
1919
1920 break;
1921
1922 case 251:
1923#line 1301 "perly.y"
1924 { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar((ps[0].val.opval))); }
1925
1926 break;
1927
1928 case 252:
1929#line 1303 "perly.y"
1930 { (yyval.opval) = ((ps[-2].val.ival) == OP_NOT)
1931 ? newUNOP((ps[-2].val.ival), 0, newSVOP(OP_CONST, 0, newSViv(0)))
1932 : newOP((ps[-2].val.ival), OPf_SPECIAL); }
1933
1934 break;
1935
1936 case 253:
1937#line 1307 "perly.y"
1938 { (yyval.opval) = newUNOP((ps[-3].val.ival), 0, (ps[-1].val.opval)); }
1939
1940 break;
1941
1942 case 254:
1943#line 1309 "perly.y"
1944 {
1945 if ( (ps[0].val.opval)->op_type != OP_TRANS
1946 && (ps[0].val.opval)->op_type != OP_TRANSR
1947 && (((PMOP*)(ps[0].val.opval))->op_pmflags & PMf_HAS_CV))
1948 {
1949 (yyval.ival) = start_subparse(FALSE, CVf_ANON);
1950 SAVEFREESV(PL_compcv);
1951 } else
1952 (yyval.ival) = 0;
1953 }
1954
1955 break;
1956
1957 case 255:
1958#line 1320 "perly.y"
1959 { (yyval.opval) = pmruntime((ps[-5].val.opval), (ps[-2].val.opval), (ps[-1].val.opval), 1, (ps[-4].val.ival)); }
1960
1961 break;
1962
1963 case 259:
1964#line 1328 "perly.y"
1965 { (yyval.opval) = my_attrs((ps[-1].val.opval),(ps[0].val.opval)); }
1966
1967 break;
1968
1969 case 260:
1970#line 1330 "perly.y"
1971 { (yyval.opval) = localize((ps[0].val.opval),1); }
1972
1973 break;
1974
1975 case 261:
1976#line 1332 "perly.y"
1977 { (yyval.opval) = newUNOP(OP_REFGEN, 0, my_attrs((ps[-1].val.opval),(ps[0].val.opval))); }
1978
1979 break;
1980
1981 case 262:
1982#line 1337 "perly.y"
1983 { (yyval.opval) = sawparens((ps[-1].val.opval)); }
1984
1985 break;
1986
1987 case 263:
1988#line 1339 "perly.y"
1989 { (yyval.opval) = sawparens(newNULLLIST()); }
1990
1991 break;
1992
1993 case 264:
1994#line 1342 "perly.y"
1995 { (yyval.opval) = (ps[0].val.opval); }
1996
1997 break;
1998
1999 case 265:
2000#line 1344 "perly.y"
2001 { (yyval.opval) = (ps[0].val.opval); }
2002
2003 break;
2004
2005 case 266:
2006#line 1346 "perly.y"
2007 { (yyval.opval) = (ps[0].val.opval); }
2008
2009 break;
2010
2011 case 267:
2012#line 1351 "perly.y"
2013 { (yyval.opval) = NULL; }
2014
2015 break;
2016
2017 case 268:
2018#line 1353 "perly.y"
2019 { (yyval.opval) = (ps[0].val.opval); }
2020
2021 break;
2022
2023 case 269:
2024#line 1357 "perly.y"
2025 { (yyval.opval) = NULL; }
2026
2027 break;
2028
2029 case 270:
2030#line 1359 "perly.y"
2031 { (yyval.opval) = (ps[0].val.opval); }
2032
2033 break;
2034
2035 case 271:
2036#line 1363 "perly.y"
2037 { (yyval.opval) = NULL; }
2038
2039 break;
2040
2041 case 272:
2042#line 1365 "perly.y"
2043 { (yyval.opval) = (ps[0].val.opval); }
2044
2045 break;
2046
2047 case 273:
2048#line 1371 "perly.y"
2049 { parser->in_my = 0; (yyval.opval) = my((ps[0].val.opval)); }
2050
2051 break;
2052
2053 case 281:
2054#line 1388 "perly.y"
2055 { (yyval.opval) = newCVREF((ps[-1].val.ival),(ps[0].val.opval)); }
2056
2057 break;
2058
2059 case 282:
2060#line 1392 "perly.y"
2061 { (yyval.opval) = newSVREF((ps[0].val.opval)); }
2062
2063 break;
2064
2065 case 283:
2066#line 1396 "perly.y"
2067 { (yyval.opval) = newAVREF((ps[0].val.opval));
2068 if ((yyval.opval)) (yyval.opval)->op_private |= (ps[-1].val.ival);
2069 }
2070
2071 break;
2072
2073 case 284:
2074#line 1402 "perly.y"
2075 { (yyval.opval) = newHVREF((ps[0].val.opval));
2076 if ((yyval.opval)) (yyval.opval)->op_private |= (ps[-1].val.ival);
2077 }
2078
2079 break;
2080
2081 case 285:
2082#line 1408 "perly.y"
2083 { (yyval.opval) = newAVREF((ps[0].val.opval)); }
2084
2085 break;
2086
2087 case 286:
2088#line 1410 "perly.y"
2089 { (yyval.opval) = newAVREF((ps[-3].val.opval)); }
2090
2091 break;
2092
2093 case 287:
2094#line 1414 "perly.y"
2095 { (yyval.opval) = newGVREF(0,(ps[0].val.opval)); }
2096
2097 break;
2098
2099 case 289:
2100#line 1419 "perly.y"
2101 { (yyval.opval) = newAVREF((ps[-2].val.opval)); }
2102
2103 break;
2104
2105 case 291:
2106#line 1424 "perly.y"
2107 { (yyval.opval) = newHVREF((ps[-2].val.opval)); }
2108
2109 break;
2110
2111 case 293:
2112#line 1429 "perly.y"
2113 { (yyval.opval) = newGVREF(0,(ps[-2].val.opval)); }
2114
2115 break;
2116
2117 case 294:
2118#line 1434 "perly.y"
2119 { (yyval.opval) = scalar((ps[0].val.opval)); }
2120
2121 break;
2122
2123 case 295:
2124#line 1436 "perly.y"
2125 { (yyval.opval) = scalar((ps[0].val.opval)); }
2126
2127 break;
2128
2129 case 296:
2130#line 1438 "perly.y"
2131 { (yyval.opval) = op_scope((ps[0].val.opval)); }
2132
2133 break;
2134
2135 case 297:
2136#line 1441 "perly.y"
2137 { (yyval.opval) = (ps[0].val.opval); }
2138
2139 break;
2140
2141
2142
2143 default: break;
2144
2145
2146/* Generated from:
2147 * 427b422b0ce1154d834dc461973a3254729575694f98ab600032f67ccab7b9e5 perly.y
2148 * acf1cbfd2545faeaaa58b1cf0cf9d7f98b5be0752eb7a54528ef904a9e2e1ca7 regen_perly.pl
2149 * ex: set ro: */