File Coverage

blib/lib/Data/Pipeline/Parser.pm
Criterion Covered Total %
statement 18 166 10.8
branch 0 72 0.0
condition 0 12 0.0
subroutine 6 24 25.0
pod n/a
total 24 274 8.7


line stmt bran cond sub pod time code
1             ####################################################################
2             #
3             # This file was generated using Parse::Yapp version 1.05.
4             #
5             # Don't edit this file, use source file instead.
6             #
7             # ANY CHANGE MADE HERE WILL BE LOST !
8             #
9             ####################################################################
10             package Data::Pipeline::Parser;
11 1     1   22378 use vars qw ( @ISA );
  1         3  
  1         58  
12 1     1   6 use strict;
  1         1  
  1         68  
13              
14             @ISA= qw ( Parse::Yapp::Driver );
15             #Included Parse/Yapp/Driver.pm file----------------------------------------
16             {
17             #
18             # Module Parse::Yapp::Driver
19             #
20             # This module is part of the Parse::Yapp package available on your
21             # nearest CPAN
22             #
23             # Any use of this module in a standalone parser make the included
24             # text under the same copyright as the Parse::Yapp module itself.
25             #
26             # This notice should remain unchanged.
27             #
28             # (c) Copyright 1998-2001 Francois Desarmenien, all rights reserved.
29             # (see the pod text in Parse::Yapp module for use and distribution rights)
30             #
31              
32             package Parse::Yapp::Driver;
33              
34             require 5.004;
35              
36 1     1   4 use strict;
  1         2  
  1         25  
37              
38 1     1   5 use vars qw ( $VERSION $COMPATIBLE $FILENAME );
  1         1  
  1         70  
39              
40             $VERSION = '1.05';
41             $COMPATIBLE = '0.07';
42             $FILENAME=__FILE__;
43              
44 1     1   4 use Carp;
  1         2  
  1         1008  
45              
46             #Known parameters, all starting with YY (leading YY will be discarded)
47             my(%params)=(YYLEX => 'CODE', 'YYERROR' => 'CODE', YYVERSION => '',
48             YYRULES => 'ARRAY', YYSTATES => 'ARRAY', YYDEBUG => '');
49             #Mandatory parameters
50             my(@params)=('LEX','RULES','STATES');
51              
52             sub new {
53 0     0     my($class)=shift;
54 0           my($errst,$nberr,$token,$value,$check,$dotpos);
55 0           my($self)={ ERROR => \&_Error,
56             ERRST => \$errst,
57             NBERR => \$nberr,
58             TOKEN => \$token,
59             VALUE => \$value,
60             DOTPOS => \$dotpos,
61             STACK => [],
62             DEBUG => 0,
63             CHECK => \$check };
64              
65 0           _CheckParams( [], \%params, \@_, $self );
66              
67 0 0 0       exists($$self{VERSION})
68             and $$self{VERSION} < $COMPATIBLE
69             and croak "Yapp driver version $VERSION ".
70             "incompatible with version $$self{VERSION}:\n".
71             "Please recompile parser module.";
72              
73 0 0         ref($class)
74             and $class=ref($class);
75              
76 0           bless($self,$class);
77             }
78              
79             sub YYParse {
80 0     0     my($self)=shift;
81 0           my($retval);
82              
83 0           _CheckParams( \@params, \%params, \@_, $self );
84              
85 0 0         if($$self{DEBUG}) {
86 0           _DBLoad();
87 0           $retval = eval '$self->_DBParse()';#Do not create stab entry on compile
88 0 0         $@ and die $@;
89             }
90             else {
91 0           $retval = $self->_Parse();
92             }
93 0           $retval
94             }
95              
96             sub YYData {
97 0     0     my($self)=shift;
98              
99 0 0         exists($$self{USER})
100             or $$self{USER}={};
101              
102 0           $$self{USER};
103            
104             }
105              
106             sub YYErrok {
107 0     0     my($self)=shift;
108              
109 0           ${$$self{ERRST}}=0;
  0            
110 0           undef;
111             }
112              
113             sub YYNberr {
114 0     0     my($self)=shift;
115              
116 0           ${$$self{NBERR}};
  0            
117             }
118              
119             sub YYRecovering {
120 0     0     my($self)=shift;
121              
122 0           ${$$self{ERRST}} != 0;
  0            
123             }
124              
125             sub YYAbort {
126 0     0     my($self)=shift;
127              
128 0           ${$$self{CHECK}}='ABORT';
  0            
129 0           undef;
130             }
131              
132             sub YYAccept {
133 0     0     my($self)=shift;
134              
135 0           ${$$self{CHECK}}='ACCEPT';
  0            
136 0           undef;
137             }
138              
139             sub YYError {
140 0     0     my($self)=shift;
141              
142 0           ${$$self{CHECK}}='ERROR';
  0            
143 0           undef;
144             }
145              
146             sub YYSemval {
147 0     0     my($self)=shift;
148 0           my($index)= $_[0] - ${$$self{DOTPOS}} - 1;
  0            
149              
150 0           $index < 0
151 0 0 0       and -$index <= @{$$self{STACK}}
152             and return $$self{STACK}[$index][1];
153              
154 0           undef; #Invalid index
155             }
156              
157             sub YYCurtok {
158 0     0     my($self)=shift;
159              
160             @_
161 0 0         and ${$$self{TOKEN}}=$_[0];
  0            
162 0           ${$$self{TOKEN}};
  0            
163             }
164              
165             sub YYCurval {
166 0     0     my($self)=shift;
167              
168             @_
169 0 0         and ${$$self{VALUE}}=$_[0];
  0            
170 0           ${$$self{VALUE}};
  0            
171             }
172              
173             sub YYExpect {
174 0     0     my($self)=shift;
175              
176 0           keys %{$self->{STATES}[$self->{STACK}[-1][0]]{ACTIONS}}
  0            
177             }
178              
179             sub YYLexer {
180 0     0     my($self)=shift;
181              
182 0           $$self{LEX};
183             }
184              
185              
186             #################
187             # Private stuff #
188             #################
189              
190              
191             sub _CheckParams {
192 0     0     my($mandatory,$checklist,$inarray,$outhash)=@_;
193 0           my($prm,$value);
194 0           my($prmlst)={};
195              
196 0           while(($prm,$value)=splice(@$inarray,0,2)) {
197 0           $prm=uc($prm);
198 0 0         exists($$checklist{$prm})
199             or croak("Unknow parameter '$prm'");
200 0 0         ref($value) eq $$checklist{$prm}
201             or croak("Invalid value for parameter '$prm'");
202 0           $prm=unpack('@2A*',$prm);
203 0           $$outhash{$prm}=$value;
204             }
205 0           for (@$mandatory) {
206 0 0         exists($$outhash{$_})
207             or croak("Missing mandatory parameter '".lc($_)."'");
208             }
209             }
210              
211             sub _Error {
212 0     0     print "Parse error.\n";
213             }
214              
215             sub _DBLoad {
216             {
217 1     1   6 no strict 'refs';
  1     0   1  
  1         17157  
  0            
218              
219 0 0         exists(${__PACKAGE__.'::'}{_DBParse})#Already loaded ?
  0            
220             and return;
221             }
222 0           my($fname)=__FILE__;
223 0           my(@drv);
224 0 0         open(DRV,"<$fname") or die "Report this as a BUG: Cannot open $fname";
225 0           while(<DRV>) {
226             /^\s*sub\s+_Parse\s*{\s*$/ .. /^\s*}\s*#\s*_Parse\s*$/
227 0 0         and do {
228 0           s/^#DBG>//;
229 0           push(@drv,$_);
230             }
231             }
232 0           close(DRV);
233              
234 0           $drv[0]=~s/_P/_DBP/;
235 0           eval join('',@drv);
236             }
237              
238             #Note that for loading debugging version of the driver,
239             #this file will be parsed from 'sub _Parse' up to '}#_Parse' inclusive.
240             #So, DO NOT remove comment at end of sub !!!
241             sub _Parse {
242 0     0     my($self)=shift;
243              
244 0           my($rules,$states,$lex,$error)
245             = @$self{ 'RULES', 'STATES', 'LEX', 'ERROR' };
246 0           my($errstatus,$nberror,$token,$value,$stack,$check,$dotpos)
247             = @$self{ 'ERRST', 'NBERR', 'TOKEN', 'VALUE', 'STACK', 'CHECK', 'DOTPOS' };
248              
249             #DBG> my($debug)=$$self{DEBUG};
250             #DBG> my($dbgerror)=0;
251              
252             #DBG> my($ShowCurToken) = sub {
253             #DBG> my($tok)='>';
254             #DBG> for (split('',$$token)) {
255             #DBG> $tok.= (ord($_) < 32 or ord($_) > 126)
256             #DBG> ? sprintf('<%02X>',ord($_))
257             #DBG> : $_;
258             #DBG> }
259             #DBG> $tok.='<';
260             #DBG> };
261              
262 0           $$errstatus=0;
263 0           $$nberror=0;
264 0           ($$token,$$value)=(undef,undef);
265 0           @$stack=( [ 0, undef ] );
266 0           $$check='';
267              
268 0           while(1) {
269 0           my($actions,$act,$stateno);
270              
271 0           $stateno=$$stack[-1][0];
272 0           $actions=$$states[$stateno];
273              
274             #DBG> print STDERR ('-' x 40),"\n";
275             #DBG> $debug & 0x2
276             #DBG> and print STDERR "In state $stateno:\n";
277             #DBG> $debug & 0x08
278             #DBG> and print STDERR "Stack:[".
279             #DBG> join(',',map { $$_[0] } @$stack).
280             #DBG> "]\n";
281              
282              
283 0 0         if (exists($$actions{ACTIONS})) {
284              
285             defined($$token)
286 0 0         or do {
287 0           ($$token,$$value)=&$lex($self);
288             #DBG> $debug & 0x01
289             #DBG> and print STDERR "Need token. Got ".&$ShowCurToken."\n";
290             };
291              
292 0 0         $act= exists($$actions{ACTIONS}{$$token})
    0          
293             ? $$actions{ACTIONS}{$$token}
294             : exists($$actions{DEFAULT})
295             ? $$actions{DEFAULT}
296             : undef;
297             }
298             else {
299 0           $act=$$actions{DEFAULT};
300             #DBG> $debug & 0x01
301             #DBG> and print STDERR "Don't need token.\n";
302             }
303              
304             defined($act)
305 0 0         and do {
306              
307             $act > 0
308 0 0         and do { #shift
309              
310             #DBG> $debug & 0x04
311             #DBG> and print STDERR "Shift and go to state $act.\n";
312              
313             $$errstatus
314 0 0         and do {
315 0           --$$errstatus;
316              
317             #DBG> $debug & 0x10
318             #DBG> and $dbgerror
319             #DBG> and $$errstatus == 0
320             #DBG> and do {
321             #DBG> print STDERR "**End of Error recovery.\n";
322             #DBG> $dbgerror=0;
323             #DBG> };
324             };
325              
326              
327 0           push(@$stack,[ $act, $$value ]);
328              
329 0 0         $$token ne '' #Don't eat the eof
330             and $$token=$$value=undef;
331 0           next;
332             };
333              
334             #reduce
335 0           my($lhs,$len,$code,@sempar,$semval);
336 0           ($lhs,$len,$code)=@{$$rules[-$act]};
  0            
337              
338             #DBG> $debug & 0x04
339             #DBG> and $act
340             #DBG> and print STDERR "Reduce using rule ".-$act." ($lhs,$len): ";
341              
342 0 0         $act
343             or $self->YYAccept();
344              
345 0           $$dotpos=$len;
346              
347             unpack('A1',$lhs) eq '@' #In line rule
348 0 0         and do {
349 0 0         $lhs =~ /^\@[0-9]+\-([0-9]+)$/
350             or die "In line rule name '$lhs' ill formed: ".
351             "report it as a BUG.\n";
352 0           $$dotpos = $1;
353             };
354              
355 0           @sempar = $$dotpos
356 0 0         ? map { $$_[1] } @$stack[ -$$dotpos .. -1 ]
357             : ();
358              
359 0 0         $semval = $code ? &$code( $self, @sempar )
    0          
360             : @sempar ? $sempar[0] : undef;
361              
362 0           splice(@$stack,-$len,$len);
363              
364             $$check eq 'ACCEPT'
365 0 0         and do {
366              
367             #DBG> $debug & 0x04
368             #DBG> and print STDERR "Accept.\n";
369              
370 0           return($semval);
371             };
372              
373             $$check eq 'ABORT'
374 0 0         and do {
375              
376             #DBG> $debug & 0x04
377             #DBG> and print STDERR "Abort.\n";
378              
379 0           return(undef);
380              
381             };
382              
383             #DBG> $debug & 0x04
384             #DBG> and print STDERR "Back to state $$stack[-1][0], then ";
385              
386             $$check eq 'ERROR'
387 0 0         or do {
388             #DBG> $debug & 0x04
389             #DBG> and print STDERR
390             #DBG> "go to state $$states[$$stack[-1][0]]{GOTOS}{$lhs}.\n";
391              
392             #DBG> $debug & 0x10
393             #DBG> and $dbgerror
394             #DBG> and $$errstatus == 0
395             #DBG> and do {
396             #DBG> print STDERR "**End of Error recovery.\n";
397             #DBG> $dbgerror=0;
398             #DBG> };
399              
400 0           push(@$stack,
401             [ $$states[$$stack[-1][0]]{GOTOS}{$lhs}, $semval ]);
402 0           $$check='';
403 0           next;
404             };
405              
406             #DBG> $debug & 0x04
407             #DBG> and print STDERR "Forced Error recovery.\n";
408              
409 0           $$check='';
410              
411             };
412              
413             #Error
414             $$errstatus
415 0 0         or do {
416              
417 0           $$errstatus = 1;
418 0           &$error($self);
419 0 0         $$errstatus # if 0, then YYErrok has been called
420             or next; # so continue parsing
421              
422             #DBG> $debug & 0x10
423             #DBG> and do {
424             #DBG> print STDERR "**Entering Error recovery.\n";
425             #DBG> ++$dbgerror;
426             #DBG> };
427              
428 0           ++$$nberror;
429              
430             };
431              
432             $$errstatus == 3 #The next token is not valid: discard it
433 0 0         and do {
434             $$token eq '' # End of input: no hope
435 0 0         and do {
436             #DBG> $debug & 0x10
437             #DBG> and print STDERR "**At eof: aborting.\n";
438 0           return(undef);
439             };
440              
441             #DBG> $debug & 0x10
442             #DBG> and print STDERR "**Dicard invalid token ".&$ShowCurToken.".\n";
443              
444 0           $$token=$$value=undef;
445             };
446              
447 0           $$errstatus=3;
448              
449 0   0       while( @$stack
      0        
450             and ( not exists($$states[$$stack[-1][0]]{ACTIONS})
451             or not exists($$states[$$stack[-1][0]]{ACTIONS}{error})
452             or $$states[$$stack[-1][0]]{ACTIONS}{error} <= 0)) {
453              
454             #DBG> $debug & 0x10
455             #DBG> and print STDERR "**Pop state $$stack[-1][0].\n";
456              
457 0           pop(@$stack);
458             }
459              
460             @$stack
461 0 0         or do {
462              
463             #DBG> $debug & 0x10
464             #DBG> and print STDERR "**No state left on stack: aborting.\n";
465              
466 0           return(undef);
467             };
468              
469             #shift the error token
470              
471             #DBG> $debug & 0x10
472             #DBG> and print STDERR "**Shift \$error token and go to state ".
473             #DBG> $$states[$$stack[-1][0]]{ACTIONS}{error}.
474             #DBG> ".\n";
475              
476 0           push(@$stack, [ $$states[$$stack[-1][0]]{ACTIONS}{error}, undef ]);
477              
478             }
479              
480             #never reached
481 0           croak("Error in driver logic. Please, report it as a BUG");
482              
483             }#_Parse
484             #DO NOT remove comment
485              
486             1;
487              
488             }
489             #End of include--------------------------------------------------
490              
491              
492             #line 2 "unkown"
493              
494             =head1
495              
496             Data::Pipeline::Parser - DSL for pipelines
497              
498             =head1 DESCRIPTION
499              
500             =cut
501              
502              
503             sub new {
504             my($class)=shift;
505             ref($class)
506             and $class=ref($class);
507              
508             my($self)=$class->SUPER::new( yyversion => '1.05',
509             yystates =>
510             [
511             {#State 0
512             ACTIONS => {
513             'MACHINE' => 2
514             },
515             DEFAULT => -8,
516             GOTOS => {
517             'body' => 1,
518             'program_segment' => 4,
519             'machine' => 3,
520             'program' => 5
521             }
522             },
523             {#State 1
524             ACTIONS => {
525             'PIPELINE' => 15,
526             'LET' => 6,
527             'MAPPING' => 19,
528             'OUT' => 18,
529             'IN' => 20,
530             'IMPORT' => 8,
531             'FROM' => 23,
532             'USE' => 22,
533             'REDUCTION' => 11,
534             'TO' => 13
535             },
536             DEFAULT => -3,
537             GOTOS => {
538             'pipeline_def' => 16,
539             'use_stmt' => 17,
540             'let_stmt' => 7,
541             'decl_stmt' => 9,
542             'io_stmt' => 10,
543             'import_stmt' => 21,
544             'filter_type' => 12,
545             'filter_def' => 14
546             }
547             },
548             {#State 2
549             ACTIONS => {
550             'QNAME' => 25
551             },
552             GOTOS => {
553             'machine_name' => 24
554             }
555             },
556             {#State 3
557             DEFAULT => -4
558             },
559             {#State 4
560             DEFAULT => -1
561             },
562             {#State 5
563             ACTIONS => {
564             '' => 26,
565             'MACHINE' => 2
566             },
567             DEFAULT => -8,
568             GOTOS => {
569             'body' => 1,
570             'program_segment' => 27,
571             'machine' => 3
572             }
573             },
574             {#State 6
575             ACTIONS => {
576             'QNAME' => 28
577             }
578             },
579             {#State 7
580             DEFAULT => -11
581             },
582             {#State 8
583             ACTIONS => {
584             'COLON' => 29
585             }
586             },
587             {#State 9
588             DEFAULT => -9
589             },
590             {#State 10
591             DEFAULT => -14
592             },
593             {#State 11
594             DEFAULT => -64
595             },
596             {#State 12
597             ACTIONS => {
598             'QNAME' => 30
599             }
600             },
601             {#State 13
602             ACTIONS => {
603             'COLON' => 31,
604             'DOES' => 33
605             },
606             GOTOS => {
607             'does_in_order' => 32
608             }
609             },
610             {#State 14
611             DEFAULT => -15
612             },
613             {#State 15
614             ACTIONS => {
615             'qname' => 35
616             },
617             DEFAULT => -18,
618             GOTOS => {
619             'opt_qname' => 34
620             }
621             },
622             {#State 16
623             DEFAULT => -10
624             },
625             {#State 17
626             DEFAULT => -12
627             },
628             {#State 18
629             ACTIONS => {
630             'COLON' => 36
631             }
632             },
633             {#State 19
634             DEFAULT => -63
635             },
636             {#State 20
637             ACTIONS => {
638             'COLON' => 37
639             }
640             },
641             {#State 21
642             DEFAULT => -13
643             },
644             {#State 22
645             ACTIONS => {
646             'COLON' => 38
647             }
648             },
649             {#State 23
650             ACTIONS => {
651             'COLON' => 39,
652             'DOES' => 41
653             },
654             GOTOS => {
655             'does_in_order' => 40
656             }
657             },
658             {#State 24
659             ACTIONS => {
660             'COLON_COLON' => 42,
661             'DOES' => 43
662             }
663             },
664             {#State 25
665             DEFAULT => -6
666             },
667             {#State 26
668             DEFAULT => 0
669             },
670             {#State 27
671             DEFAULT => -2
672             },
673             {#State 28
674             ACTIONS => {
675             'COLON' => 44
676             }
677             },
678             {#State 29
679             ACTIONS => {
680             'QNAME' => 46
681             },
682             GOTOS => {
683             'perl_class' => 45,
684             'perl_class_list' => 47
685             }
686             },
687             {#State 30
688             ACTIONS => {
689             'USING' => 48
690             }
691             },
692             {#State 31
693             ACTIONS => {
694             'FILE' => 49,
695             'STDOUT' => 51,
696             'QNAME' => 53
697             },
698             GOTOS => {
699             'out_file' => 52,
700             'action_arg' => 50
701             }
702             },
703             {#State 32
704             ACTIONS => {
705             'COLON' => 54
706             }
707             },
708             {#State 33
709             ACTIONS => {
710             'COLON' => 55,
711             'IN' => 56
712             }
713             },
714             {#State 34
715             ACTIONS => {
716             'DOES' => 58
717             },
718             GOTOS => {
719             'does_in_order' => 57
720             }
721             },
722             {#State 35
723             DEFAULT => -19
724             },
725             {#State 36
726             ACTIONS => {
727             'QNAME' => 60
728             },
729             GOTOS => {
730             'qname_list' => 59
731             }
732             },
733             {#State 37
734             ACTIONS => {
735             'QNAME' => 60
736             },
737             GOTOS => {
738             'qname_list' => 61
739             }
740             },
741             {#State 38
742             ACTIONS => {
743             'QNAME' => 60
744             },
745             GOTOS => {
746             'qname_list' => 62
747             }
748             },
749             {#State 39
750             ACTIONS => {
751             'FILE' => 63,
752             'QNAME' => 66,
753             'STDIN' => 67
754             },
755             GOTOS => {
756             'in_file' => 65,
757             'in_action_arg' => 64
758             }
759             },
760             {#State 40
761             ACTIONS => {
762             'COLON' => 68
763             }
764             },
765             {#State 41
766             ACTIONS => {
767             'COLON' => 69,
768             'IN' => 56
769             }
770             },
771             {#State 42
772             ACTIONS => {
773             'QNAME' => 70
774             }
775             },
776             {#State 43
777             ACTIONS => {
778             'COLON' => 71
779             }
780             },
781             {#State 44
782             ACTIONS => {
783             'S' => 72,
784             'TRUE' => 73,
785             'LITERAL' => 75,
786             'FALSE' => 80,
787             'NEG_INTEGER' => 81,
788             'TR' => 82,
789             'NUMBER' => 83,
790             'DOLLAR_QNAME' => 85,
791             'LP' => 86,
792             'POS_INTEGER' => 87,
793             'QNAME' => 46,
794             'QR' => 88
795             },
796             DEFAULT => -50,
797             GOTOS => {
798             'literal' => 78,
799             'perl_class' => 77,
800             'integer' => 79,
801             'string' => 74,
802             'perl_method' => 76,
803             'string_literal' => 84
804             }
805             },
806             {#State 45
807             ACTIONS => {
808             'COLON_COLON' => 89
809             },
810             DEFAULT => -69
811             },
812             {#State 46
813             ACTIONS => {
814             'COLON_COLON' => 90
815             }
816             },
817             {#State 47
818             ACTIONS => {
819             'QNAME' => 46
820             },
821             DEFAULT => -54,
822             GOTOS => {
823             'perl_class' => 91
824             }
825             },
826             {#State 48
827             ACTIONS => {
828             'QNAME' => 92
829             }
830             },
831             {#State 49
832             ACTIONS => {
833             'DOLLAR_QNAME' => 94,
834             'LITERAL' => 75
835             },
836             GOTOS => {
837             'string' => 93,
838             'string_literal' => 84
839             }
840             },
841             {#State 50
842             DEFAULT => -55
843             },
844             {#State 51
845             DEFAULT => -40
846             },
847             {#State 52
848             DEFAULT => -56
849             },
850             {#State 53
851             ACTIONS => {
852             'COLON' => 95,
853             'DOES' => 97
854             },
855             GOTOS => {
856             'does_in_order' => 96
857             }
858             },
859             {#State 54
860             ACTIONS => {
861             'QNAME' => 53
862             },
863             GOTOS => {
864             'ordered_action_args' => 98,
865             'action_arg' => 99
866             }
867             },
868             {#State 55
869             ACTIONS => {
870             'QNAME' => 53
871             },
872             GOTOS => {
873             'action_args' => 100,
874             'action_arg' => 101
875             }
876             },
877             {#State 56
878             ACTIONS => {
879             'ORDER' => 102
880             }
881             },
882             {#State 57
883             ACTIONS => {
884             'COLON' => 103
885             }
886             },
887             {#State 58
888             ACTIONS => {
889             'COLON' => 104,
890             'IN' => 56
891             }
892             },
893             {#State 59
894             ACTIONS => {
895             'QNAME' => 105
896             },
897             DEFAULT => -53
898             },
899             {#State 60
900             DEFAULT => -16
901             },
902             {#State 61
903             ACTIONS => {
904             'QNAME' => 105
905             },
906             DEFAULT => -52
907             },
908             {#State 62
909             ACTIONS => {
910             'QNAME' => 105
911             },
912             DEFAULT => -51
913             },
914             {#State 63
915             ACTIONS => {
916             'DOLLAR_QNAME' => 107,
917             'LITERAL' => 75
918             },
919             GOTOS => {
920             'string' => 106,
921             'string_literal' => 84
922             }
923             },
924             {#State 64
925             DEFAULT => -59
926             },
927             {#State 65
928             DEFAULT => -60
929             },
930             {#State 66
931             ACTIONS => {
932             'COLON' => 108,
933             'DOES' => 110
934             },
935             GOTOS => {
936             'does_in_order' => 109
937             }
938             },
939             {#State 67
940             DEFAULT => -37
941             },
942             {#State 68
943             ACTIONS => {
944             'FILE' => 63,
945             'QNAME' => 66,
946             'STDIN' => 67
947             },
948             GOTOS => {
949             'ordered_in_action_args' => 112,
950             'in_file' => 113,
951             'in_action_arg' => 111
952             }
953             },
954             {#State 69
955             ACTIONS => {
956             'FILE' => 63,
957             'QNAME' => 66,
958             'STDIN' => 67
959             },
960             GOTOS => {
961             'in_action_args' => 115,
962             'in_file' => 113,
963             'in_action_arg' => 114
964             }
965             },
966             {#State 70
967             DEFAULT => -7
968             },
969             {#State 71
970             DEFAULT => -8,
971             GOTOS => {
972             'body' => 116
973             }
974             },
975             {#State 72
976             ACTIONS => {
977             'REGEX' => 117
978             }
979             },
980             {#State 73
981             DEFAULT => -33
982             },
983             {#State 74
984             ACTIONS => {
985             'TILDE' => 118
986             },
987             DEFAULT => -27
988             },
989             {#State 75
990             DEFAULT => -22
991             },
992             {#State 76
993             DEFAULT => -35
994             },
995             {#State 77
996             ACTIONS => {
997             'COLON_COLON' => 89,
998             'DOES' => 120
999             },
1000             DEFAULT => -43,
1001             GOTOS => {
1002             'does_in_order' => 119
1003             }
1004             },
1005             {#State 78
1006             DEFAULT => -49
1007             },
1008             {#State 79
1009             DEFAULT => -29
1010             },
1011             {#State 80
1012             DEFAULT => -34
1013             },
1014             {#State 81
1015             DEFAULT => -21
1016             },
1017             {#State 82
1018             ACTIONS => {
1019             'REGEX' => 121
1020             }
1021             },
1022             {#State 83
1023             DEFAULT => -28
1024             },
1025             {#State 84
1026             DEFAULT => -25
1027             },
1028             {#State 85
1029             ACTIONS => {
1030             'SLASH_SLASH' => 122
1031             },
1032             DEFAULT => -23
1033             },
1034             {#State 86
1035             ACTIONS => {
1036             'S' => 72,
1037             'TRUE' => 73,
1038             'DOLLAR_QNAME' => 85,
1039             'LITERAL' => 75,
1040             'LP' => 86,
1041             'POS_INTEGER' => 87,
1042             'QNAME' => 46,
1043             'FALSE' => 80,
1044             'NEG_INTEGER' => 81,
1045             'TR' => 82,
1046             'QR' => 88,
1047             'NUMBER' => 83
1048             },
1049             GOTOS => {
1050             'literal' => 123,
1051             'perl_class' => 77,
1052             'integer' => 79,
1053             'string' => 74,
1054             'perl_method' => 76,
1055             'string_literal' => 84
1056             }
1057             },
1058             {#State 87
1059             DEFAULT => -20
1060             },
1061             {#State 88
1062             ACTIONS => {
1063             'REGEX' => 124
1064             }
1065             },
1066             {#State 89
1067             ACTIONS => {
1068             'QNAME' => 125
1069             }
1070             },
1071             {#State 90
1072             ACTIONS => {
1073             'QNAME' => 126
1074             }
1075             },
1076             {#State 91
1077             ACTIONS => {
1078             'COLON_COLON' => 89
1079             },
1080             DEFAULT => -70
1081             },
1082             {#State 92
1083             ACTIONS => {
1084             'DOES' => 127
1085             }
1086             },
1087             {#State 93
1088             ACTIONS => {
1089             'TILDE' => 118
1090             },
1091             DEFAULT => -41
1092             },
1093             {#State 94
1094             ACTIONS => {
1095             'SLASH_SLASH' => 128
1096             },
1097             DEFAULT => -23
1098             },
1099             {#State 95
1100             ACTIONS => {
1101             'S' => 72,
1102             'TRUE' => 73,
1103             'LITERAL' => 75,
1104             'LB' => 132,
1105             'FALSE' => 80,
1106             'NEG_INTEGER' => 81,
1107             'TR' => 82,
1108             'NUMBER' => 83,
1109             'PIPELINE' => 136,
1110             'DOLLAR_QNAME' => 137,
1111             'LP' => 86,
1112             'POS_INTEGER' => 138,
1113             'QNAME' => 139,
1114             'QR' => 88,
1115             'DOES' => 141
1116             },
1117             DEFAULT => -113,
1118             GOTOS => {
1119             'string' => 74,
1120             'perl_method' => 76,
1121             'const_action_expr' => 130,
1122             'does_in_order' => 129,
1123             'literal' => 131,
1124             'perl_class' => 77,
1125             'named_expr' => 133,
1126             'integer' => 79,
1127             'action_arg' => 134,
1128             'const_array_expr' => 135,
1129             'action' => 140,
1130             'action_expr' => 142,
1131             'string_literal' => 84
1132             }
1133             },
1134             {#State 96
1135             ACTIONS => {
1136             'COLON' => 143
1137             }
1138             },
1139             {#State 97
1140             ACTIONS => {
1141             'COLON' => 144,
1142             'IN' => 56
1143             }
1144             },
1145             {#State 98
1146             ACTIONS => {
1147             'QNAME' => 53,
1148             'DONE' => 146
1149             },
1150             GOTOS => {
1151             'action_arg' => 145
1152             }
1153             },
1154             {#State 99
1155             DEFAULT => -100
1156             },
1157             {#State 100
1158             ACTIONS => {
1159             'QNAME' => 53,
1160             'DONE' => 148
1161             },
1162             GOTOS => {
1163             'action_arg' => 147
1164             }
1165             },
1166             {#State 101
1167             DEFAULT => -91
1168             },
1169             {#State 102
1170             DEFAULT => -71
1171             },
1172             {#State 103
1173             ACTIONS => {
1174             'PIPELINE' => 150,
1175             'QNAME' => 151
1176             },
1177             GOTOS => {
1178             'actions' => 149,
1179             'action' => 152
1180             }
1181             },
1182             {#State 104
1183             ACTIONS => {
1184             'PIPELINE' => 154,
1185             'QNAME' => 151
1186             },
1187             GOTOS => {
1188             'action' => 155,
1189             'action_list' => 153
1190             }
1191             },
1192             {#State 105
1193             DEFAULT => -17
1194             },
1195             {#State 106
1196             ACTIONS => {
1197             'TILDE' => 118
1198             },
1199             DEFAULT => -38
1200             },
1201             {#State 107
1202             ACTIONS => {
1203             'SLASH_SLASH' => 156
1204             },
1205             DEFAULT => -23
1206             },
1207             {#State 108
1208             ACTIONS => {
1209             'S' => 72,
1210             'FILE' => 63,
1211             'TRUE' => 73,
1212             'LITERAL' => 75,
1213             'LB' => 132,
1214             'FALSE' => 80,
1215             'NEG_INTEGER' => 81,
1216             'TR' => 82,
1217             'NUMBER' => 83,
1218             'PIPELINE' => 136,
1219             'DOLLAR_QNAME' => 137,
1220             'LP' => 86,
1221             'POS_INTEGER' => 138,
1222             'QNAME' => 158,
1223             'STDIN' => 67,
1224             'QR' => 88,
1225             'DOES' => 141
1226             },
1227             DEFAULT => -113,
1228             GOTOS => {
1229             'in_file' => 113,
1230             'string' => 74,
1231             'in_action_arg' => 157,
1232             'perl_method' => 76,
1233             'const_action_expr' => 130,
1234             'does_in_order' => 129,
1235             'literal' => 131,
1236             'perl_class' => 77,
1237             'named_expr' => 133,
1238             'integer' => 79,
1239             'const_array_expr' => 135,
1240             'action' => 140,
1241             'action_expr' => 159,
1242             'string_literal' => 84
1243             }
1244             },
1245             {#State 109
1246             ACTIONS => {
1247             'COLON' => 160
1248             }
1249             },
1250             {#State 110
1251             ACTIONS => {
1252             'COLON' => 161,
1253             'IN' => 56
1254             }
1255             },
1256             {#State 111
1257             DEFAULT => -102
1258             },
1259             {#State 112
1260             ACTIONS => {
1261             'FILE' => 63,
1262             'QNAME' => 66,
1263             'STDIN' => 67,
1264             'DONE' => 163
1265             },
1266             GOTOS => {
1267             'in_file' => 113,
1268             'in_action_arg' => 162
1269             }
1270             },
1271             {#State 113
1272             DEFAULT => -97
1273             },
1274             {#State 114
1275             DEFAULT => -98
1276             },
1277             {#State 115
1278             ACTIONS => {
1279             'FILE' => 63,
1280             'QNAME' => 66,
1281             'STDIN' => 67,
1282             'DONE' => 165
1283             },
1284             GOTOS => {
1285             'in_file' => 113,
1286             'in_action_arg' => 164
1287             }
1288             },
1289             {#State 116
1290             ACTIONS => {
1291             'PIPELINE' => 15,
1292             'DONE' => 166,
1293             'LET' => 6,
1294             'OUT' => 18,
1295             'MAPPING' => 19,
1296             'IN' => 20,
1297             'IMPORT' => 8,
1298             'USE' => 22,
1299             'FROM' => 23,
1300             'REDUCTION' => 11,
1301             'TO' => 13
1302             },
1303             GOTOS => {
1304             'pipeline_def' => 16,
1305             'use_stmt' => 17,
1306             'let_stmt' => 7,
1307             'io_stmt' => 10,
1308             'decl_stmt' => 9,
1309             'import_stmt' => 21,
1310             'filter_type' => 12,
1311             'filter_def' => 14
1312             }
1313             },
1314             {#State 117
1315             DEFAULT => -31
1316             },
1317             {#State 118
1318             ACTIONS => {
1319             'DOLLAR_QNAME' => 85,
1320             'LITERAL' => 75
1321             },
1322             GOTOS => {
1323             'string_literal' => 167
1324             }
1325             },
1326             {#State 119
1327             ACTIONS => {
1328             'COLON' => 168
1329             }
1330             },
1331             {#State 120
1332             ACTIONS => {
1333             'QNAME' => 170,
1334             'COLON' => 169,
1335             'IN' => 56
1336             }
1337             },
1338             {#State 121
1339             DEFAULT => -32
1340             },
1341             {#State 122
1342             ACTIONS => {
1343             'S' => 72,
1344             'FALSE' => 80,
1345             'DOLLAR_QNAME' => 137,
1346             'LP' => 86,
1347             'POS_INTEGER' => 87,
1348             'QR' => 88,
1349             'TRUE' => 73,
1350             'LITERAL' => 75,
1351             'LB' => 132,
1352             'NEG_INTEGER' => 81,
1353             'TR' => 82,
1354             'NUMBER' => 83,
1355             'QNAME' => 172
1356             },
1357             DEFAULT => -113,
1358             GOTOS => {
1359             'perl_class' => 77,
1360             'literal' => 131,
1361             'named_expr' => 133,
1362             'integer' => 79,
1363             'const_array_expr' => 135,
1364             'string' => 74,
1365             'const_action_expr' => 171,
1366             'perl_method' => 76,
1367             'string_literal' => 84
1368             }
1369             },
1370             {#State 123
1371             ACTIONS => {
1372             'RP' => 173
1373             }
1374             },
1375             {#State 124
1376             DEFAULT => -30
1377             },
1378             {#State 125
1379             DEFAULT => -68
1380             },
1381             {#State 126
1382             DEFAULT => -67
1383             },
1384             {#State 127
1385             ACTIONS => {
1386             'COLON' => 174
1387             }
1388             },
1389             {#State 128
1390             ACTIONS => {
1391             'S' => 72,
1392             'TRUE' => 73,
1393             'LITERAL' => 75,
1394             'LB' => 132,
1395             'FALSE' => 80,
1396             'NEG_INTEGER' => 81,
1397             'TR' => 82,
1398             'NUMBER' => 83,
1399             'STDOUT' => 175,
1400             'DOLLAR_QNAME' => 137,
1401             'LP' => 86,
1402             'POS_INTEGER' => 87,
1403             'QNAME' => 172,
1404             'QR' => 88
1405             },
1406             DEFAULT => -113,
1407             GOTOS => {
1408             'perl_class' => 77,
1409             'literal' => 131,
1410             'named_expr' => 133,
1411             'integer' => 79,
1412             'const_array_expr' => 135,
1413             'string' => 74,
1414             'const_action_expr' => 171,
1415             'perl_method' => 76,
1416             'string_literal' => 84
1417             }
1418             },
1419             {#State 129
1420             ACTIONS => {
1421             'COLON' => 176
1422             }
1423             },
1424             {#State 130
1425             DEFAULT => -104
1426             },
1427             {#State 131
1428             DEFAULT => -114
1429             },
1430             {#State 132
1431             ACTIONS => {
1432             'S' => 72,
1433             'TRUE' => 73,
1434             'DOLLAR_QNAME' => 180,
1435             'LITERAL' => 75,
1436             'LP' => 86,
1437             'POS_INTEGER' => 87,
1438             'LB' => 132,
1439             'QNAME' => 46,
1440             'FALSE' => 80,
1441             'NEG_INTEGER' => 81,
1442             'QW' => 182,
1443             'TR' => 82,
1444             'QR' => 88,
1445             'NUMBER' => 83
1446             },
1447             DEFAULT => -120,
1448             GOTOS => {
1449             'const_expr' => 181,
1450             'const_expr_list' => 177,
1451             'string' => 74,
1452             'perl_method' => 76,
1453             'literal' => 178,
1454             'perl_class' => 77,
1455             'integer' => 79,
1456             'const_array_expr' => 179,
1457             'string_literal' => 84
1458             }
1459             },
1460             {#State 133
1461             DEFAULT => -118
1462             },
1463             {#State 134
1464             DEFAULT => -88
1465             },
1466             {#State 135
1467             DEFAULT => -117
1468             },
1469             {#State 136
1470             ACTIONS => {
1471             'QNAME' => 183,
1472             'DOES' => 184
1473             }
1474             },
1475             {#State 137
1476             ACTIONS => {
1477             'SLASH_SLASH' => 185
1478             },
1479             DEFAULT => -23
1480             },
1481             {#State 138
1482             ACTIONS => {
1483             'SLASH_SLASH' => 186
1484             },
1485             DEFAULT => -20
1486             },
1487             {#State 139
1488             ACTIONS => {
1489             'SLASH_SLASH' => 187,
1490             'COLON' => 188,
1491             'COLON_COLON' => 90,
1492             'DOES' => 190
1493             },
1494             DEFAULT => -82,
1495             GOTOS => {
1496             'does_in_order' => 189
1497             }
1498             },
1499             {#State 140
1500             DEFAULT => -105
1501             },
1502             {#State 141
1503             ACTIONS => {
1504             'COLON' => 191,
1505             'IN' => 56
1506             }
1507             },
1508             {#State 142
1509             DEFAULT => -87
1510             },
1511             {#State 143
1512             ACTIONS => {
1513             'QNAME' => 53
1514             },
1515             GOTOS => {
1516             'ordered_action_args' => 192,
1517             'action_arg' => 99
1518             }
1519             },
1520             {#State 144
1521             ACTIONS => {
1522             'QNAME' => 53
1523             },
1524             GOTOS => {
1525             'action_args' => 193,
1526             'action_arg' => 101
1527             }
1528             },
1529             {#State 145
1530             DEFAULT => -101
1531             },
1532             {#State 146
1533             DEFAULT => -58
1534             },
1535             {#State 147
1536             DEFAULT => -92
1537             },
1538             {#State 148
1539             DEFAULT => -57
1540             },
1541             {#State 149
1542             ACTIONS => {
1543             'ARROW' => 194,
1544             'DONE' => 195
1545             }
1546             },
1547             {#State 150
1548             ACTIONS => {
1549             'DOES' => 197
1550             },
1551             GOTOS => {
1552             'does_in_order' => 196
1553             }
1554             },
1555             {#State 151
1556             ACTIONS => {
1557             'COLON' => 198,
1558             'DOES' => 200
1559             },
1560             DEFAULT => -82,
1561             GOTOS => {
1562             'does_in_order' => 199
1563             }
1564             },
1565             {#State 152
1566             DEFAULT => -74
1567             },
1568             {#State 153
1569             ACTIONS => {
1570             'PIPELINE' => 201,
1571             'QNAME' => 151,
1572             'DONE' => 202
1573             },
1574             GOTOS => {
1575             'action' => 203
1576             }
1577             },
1578             {#State 154
1579             ACTIONS => {
1580             'DOES' => 197
1581             },
1582             GOTOS => {
1583             'does_in_order' => 204
1584             }
1585             },
1586             {#State 155
1587             DEFAULT => -78
1588             },
1589             {#State 156
1590             ACTIONS => {
1591             'S' => 72,
1592             'TRUE' => 73,
1593             'LITERAL' => 75,
1594             'LB' => 132,
1595             'FALSE' => 80,
1596             'NEG_INTEGER' => 81,
1597             'TR' => 82,
1598             'NUMBER' => 83,
1599             'DOLLAR_QNAME' => 137,
1600             'LP' => 86,
1601             'POS_INTEGER' => 87,
1602             'QNAME' => 172,
1603             'STDIN' => 205,
1604             'QR' => 88
1605             },
1606             DEFAULT => -113,
1607             GOTOS => {
1608             'perl_class' => 77,
1609             'literal' => 131,
1610             'named_expr' => 133,
1611             'integer' => 79,
1612             'const_array_expr' => 135,
1613             'string' => 74,
1614             'const_action_expr' => 171,
1615             'perl_method' => 76,
1616             'string_literal' => 84
1617             }
1618             },
1619             {#State 157
1620             DEFAULT => -94
1621             },
1622             {#State 158
1623             ACTIONS => {
1624             'SLASH_SLASH' => 187,
1625             'COLON' => 206,
1626             'COLON_COLON' => 90,
1627             'DOES' => 208
1628             },
1629             DEFAULT => -82,
1630             GOTOS => {
1631             'does_in_order' => 207
1632             }
1633             },
1634             {#State 159
1635             DEFAULT => -93
1636             },
1637             {#State 160
1638             ACTIONS => {
1639             'FILE' => 63,
1640             'QNAME' => 66,
1641             'STDIN' => 67
1642             },
1643             GOTOS => {
1644             'ordered_in_action_args' => 209,
1645             'in_file' => 113,
1646             'in_action_arg' => 111
1647             }
1648             },
1649             {#State 161
1650             ACTIONS => {
1651             'FILE' => 63,
1652             'QNAME' => 66,
1653             'STDIN' => 67
1654             },
1655             GOTOS => {
1656             'in_action_args' => 210,
1657             'in_file' => 113,
1658             'in_action_arg' => 114
1659             }
1660             },
1661             {#State 162
1662             DEFAULT => -103
1663             },
1664             {#State 163
1665             DEFAULT => -62
1666             },
1667             {#State 164
1668             DEFAULT => -99
1669             },
1670             {#State 165
1671             DEFAULT => -61
1672             },
1673             {#State 166
1674             DEFAULT => -5
1675             },
1676             {#State 167
1677             DEFAULT => -26
1678             },
1679             {#State 168
1680             ACTIONS => {
1681             'QNAME' => 53
1682             },
1683             GOTOS => {
1684             'ordered_action_args' => 211,
1685             'action_arg' => 99
1686             }
1687             },
1688             {#State 169
1689             ACTIONS => {
1690             'QNAME' => 53
1691             },
1692             GOTOS => {
1693             'action_args' => 212,
1694             'action_arg' => 101
1695             }
1696             },
1697             {#State 170
1698             ACTIONS => {
1699             'COLON' => 213,
1700             'IN' => 214
1701             },
1702             DEFAULT => -46
1703             },
1704             {#State 171
1705             DEFAULT => -24
1706             },
1707             {#State 172
1708             ACTIONS => {
1709             'COLON_COLON' => 90,
1710             'COLON' => 215
1711             }
1712             },
1713             {#State 173
1714             DEFAULT => -36
1715             },
1716             {#State 174
1717             DEFAULT => -65,
1718             GOTOS => {
1719             '@1-6' => 216
1720             }
1721             },
1722             {#State 175
1723             DEFAULT => -42
1724             },
1725             {#State 176
1726             ACTIONS => {
1727             'QNAME' => 53
1728             },
1729             GOTOS => {
1730             'ordered_action_args' => 217,
1731             'action_arg' => 99
1732             }
1733             },
1734             {#State 177
1735             ACTIONS => {
1736             'S' => 72,
1737             'TRUE' => 73,
1738             'RB' => 218,
1739             'DOLLAR_QNAME' => 180,
1740             'LITERAL' => 75,
1741             'LP' => 86,
1742             'POS_INTEGER' => 87,
1743             'LB' => 132,
1744             'QNAME' => 46,
1745             'FALSE' => 80,
1746             'NEG_INTEGER' => 81,
1747             'QW' => 220,
1748             'TR' => 82,
1749             'QR' => 88,
1750             'NUMBER' => 83
1751             },
1752             GOTOS => {
1753             'const_expr' => 219,
1754             'string' => 74,
1755             'perl_method' => 76,
1756             'literal' => 178,
1757             'perl_class' => 77,
1758             'integer' => 79,
1759             'const_array_expr' => 179,
1760             'string_literal' => 84
1761             }
1762             },
1763             {#State 178
1764             DEFAULT => -125
1765             },
1766             {#State 179
1767             DEFAULT => -126
1768             },
1769             {#State 180
1770             ACTIONS => {
1771             'SLASH_SLASH' => 122
1772             },
1773             DEFAULT => -23
1774             },
1775             {#State 181
1776             DEFAULT => -121
1777             },
1778             {#State 182
1779             ACTIONS => {
1780             'REGEX' => 221
1781             }
1782             },
1783             {#State 183
1784             ACTIONS => {
1785             'DOES' => 222
1786             },
1787             DEFAULT => -110
1788             },
1789             {#State 184
1790             ACTIONS => {
1791             'COLON' => 223
1792             }
1793             },
1794             {#State 185
1795             ACTIONS => {
1796             'S' => 72,
1797             'FALSE' => 80,
1798             'DOLLAR_QNAME' => 137,
1799             'LP' => 86,
1800             'POS_INTEGER' => 87,
1801             'QR' => 88,
1802             'TRUE' => 73,
1803             'LITERAL' => 75,
1804             'LB' => 132,
1805             'NEG_INTEGER' => 81,
1806             'TR' => 82,
1807             'NUMBER' => 83,
1808             'QNAME' => 172
1809             },
1810             DEFAULT => -113,
1811             GOTOS => {
1812             'perl_class' => 77,
1813             'literal' => 131,
1814             'named_expr' => 133,
1815             'integer' => 79,
1816             'const_array_expr' => 135,
1817             'string' => 74,
1818             'const_action_expr' => 224,
1819             'perl_method' => 76,
1820             'string_literal' => 84
1821             }
1822             },
1823             {#State 186
1824             ACTIONS => {
1825             'S' => 72,
1826             'TRUE' => 73,
1827             'LITERAL' => 75,
1828             'LB' => 132,
1829             'FALSE' => 80,
1830             'NEG_INTEGER' => 81,
1831             'TR' => 82,
1832             'NUMBER' => 83,
1833             'DOLLAR_QNAME' => 137,
1834             'LP' => 86,
1835             'POS_INTEGER' => 87,
1836             'QNAME' => 172,
1837             'QR' => 88
1838             },
1839             DEFAULT => -113,
1840             GOTOS => {
1841             'perl_class' => 77,
1842             'literal' => 131,
1843             'named_expr' => 133,
1844             'integer' => 79,
1845             'const_array_expr' => 135,
1846             'string' => 74,
1847             'const_action_expr' => 225,
1848             'perl_method' => 76,
1849             'string_literal' => 84
1850             }
1851             },
1852             {#State 187
1853             ACTIONS => {
1854             'S' => 72,
1855             'TRUE' => 73,
1856             'LITERAL' => 75,
1857             'LB' => 132,
1858             'FALSE' => 80,
1859             'NEG_INTEGER' => 81,
1860             'TR' => 82,
1861             'NUMBER' => 83,
1862             'DOLLAR_QNAME' => 137,
1863             'LP' => 86,
1864             'POS_INTEGER' => 87,
1865             'QNAME' => 172,
1866             'QR' => 88
1867             },
1868             DEFAULT => -113,
1869             GOTOS => {
1870             'perl_class' => 77,
1871             'literal' => 131,
1872             'named_expr' => 133,
1873             'integer' => 79,
1874             'const_array_expr' => 135,
1875             'string' => 74,
1876             'const_action_expr' => 226,
1877             'perl_method' => 76,
1878             'string_literal' => 84
1879             }
1880             },
1881             {#State 188
1882             ACTIONS => {
1883             'S' => 72,
1884             'TRUE' => 73,
1885             'LITERAL' => 75,
1886             'LB' => 228,
1887             'FALSE' => 80,
1888             'NEG_INTEGER' => 81,
1889             'TR' => 82,
1890             'NUMBER' => 83,
1891             'PIPELINE' => 136,
1892             'LC' => 233,
1893             'DOLLAR_QNAME' => 137,
1894             'LP' => 86,
1895             'POS_INTEGER' => 138,
1896             'QNAME' => 139,
1897             'QR' => 88,
1898             'DOES' => 141
1899             },
1900             DEFAULT => -113,
1901             GOTOS => {
1902             'string' => 74,
1903             'perl_method' => 76,
1904             'const_action_expr' => 130,
1905             'does_in_order' => 129,
1906             'literal' => 227,
1907             'perl_class' => 77,
1908             'named_expr' => 133,
1909             'action_arg' => 230,
1910             'integer' => 79,
1911             'expr' => 229,
1912             'const_array_expr' => 135,
1913             'hash_expr' => 231,
1914             'string_literal' => 84,
1915             'array_expr' => 232,
1916             'action' => 140,
1917             'action_expr' => 142
1918             }
1919             },
1920             {#State 189
1921             ACTIONS => {
1922             'COLON' => 234
1923             }
1924             },
1925             {#State 190
1926             ACTIONS => {
1927             'COLON' => 235,
1928             'IN' => 56
1929             }
1930             },
1931             {#State 191
1932             ACTIONS => {
1933             'QNAME' => 53
1934             },
1935             GOTOS => {
1936             'action_args' => 236,
1937             'action_arg' => 101
1938             }
1939             },
1940             {#State 192
1941             ACTIONS => {
1942             'QNAME' => 53,
1943             'DONE' => 237
1944             },
1945             GOTOS => {
1946             'action_arg' => 145
1947             }
1948             },
1949             {#State 193
1950             ACTIONS => {
1951             'QNAME' => 53,
1952             'DONE' => 238
1953             },
1954             GOTOS => {
1955             'action_arg' => 147
1956             }
1957             },
1958             {#State 194
1959             ACTIONS => {
1960             'PIPELINE' => 239,
1961             'QNAME' => 151
1962             },
1963             GOTOS => {
1964             'action' => 240
1965             }
1966             },
1967             {#State 195
1968             DEFAULT => -72
1969             },
1970             {#State 196
1971             ACTIONS => {
1972             'COLON' => 241
1973             }
1974             },
1975             {#State 197
1976             ACTIONS => {
1977             'COLON' => 242,
1978             'IN' => 56
1979             }
1980             },
1981             {#State 198
1982             ACTIONS => {
1983             'QNAME' => 53
1984             },
1985             GOTOS => {
1986             'action_arg' => 243
1987             }
1988             },
1989             {#State 199
1990             ACTIONS => {
1991             'COLON' => 244
1992             }
1993             },
1994             {#State 200
1995             ACTIONS => {
1996             'COLON' => 245,
1997             'IN' => 56
1998             }
1999             },
2000             {#State 201
2001             ACTIONS => {
2002             'DOES' => 197
2003             },
2004             GOTOS => {
2005             'does_in_order' => 246
2006             }
2007             },
2008             {#State 202
2009             DEFAULT => -73
2010             },
2011             {#State 203
2012             DEFAULT => -80
2013             },
2014             {#State 204
2015             ACTIONS => {
2016             'COLON' => 247
2017             }
2018             },
2019             {#State 205
2020             DEFAULT => -39
2021             },
2022             {#State 206
2023             ACTIONS => {
2024             'S' => 72,
2025             'FILE' => 63,
2026             'TRUE' => 73,
2027             'LITERAL' => 75,
2028             'LB' => 228,
2029             'FALSE' => 80,
2030             'NEG_INTEGER' => 81,
2031             'TR' => 82,
2032             'NUMBER' => 83,
2033             'PIPELINE' => 136,
2034             'LC' => 233,
2035             'DOLLAR_QNAME' => 137,
2036             'LP' => 86,
2037             'POS_INTEGER' => 138,
2038             'QNAME' => 248,
2039             'STDIN' => 67,
2040             'QR' => 88,
2041             'DOES' => 141
2042             },
2043             DEFAULT => -113,
2044             GOTOS => {
2045             'string' => 74,
2046             'perl_method' => 76,
2047             'in_action_arg' => 157,
2048             'const_action_expr' => 130,
2049             'does_in_order' => 129,
2050             'perl_class' => 77,
2051             'literal' => 227,
2052             'named_expr' => 133,
2053             'expr' => 229,
2054             'action_arg' => 243,
2055             'integer' => 79,
2056             'const_array_expr' => 135,
2057             'hash_expr' => 231,
2058             'string_literal' => 84,
2059             'array_expr' => 232,
2060             'in_file' => 113,
2061             'action' => 140,
2062             'action_expr' => 159
2063             }
2064             },
2065             {#State 207
2066             ACTIONS => {
2067             'COLON' => 249
2068             }
2069             },
2070             {#State 208
2071             ACTIONS => {
2072             'COLON' => 250,
2073             'IN' => 56
2074             }
2075             },
2076             {#State 209
2077             ACTIONS => {
2078             'FILE' => 63,
2079             'QNAME' => 66,
2080             'STDIN' => 67,
2081             'DONE' => 251
2082             },
2083             GOTOS => {
2084             'in_file' => 113,
2085             'in_action_arg' => 162
2086             }
2087             },
2088             {#State 210
2089             ACTIONS => {
2090             'FILE' => 63,
2091             'QNAME' => 66,
2092             'STDIN' => 67,
2093             'DONE' => 252
2094             },
2095             GOTOS => {
2096             'in_file' => 113,
2097             'in_action_arg' => 164
2098             }
2099             },
2100             {#State 211
2101             ACTIONS => {
2102             'QNAME' => 53,
2103             'DONE' => 253
2104             },
2105             GOTOS => {
2106             'action_arg' => 145
2107             }
2108             },
2109             {#State 212
2110             ACTIONS => {
2111             'QNAME' => 53,
2112             'DONE' => 254
2113             },
2114             GOTOS => {
2115             'action_arg' => 147
2116             }
2117             },
2118             {#State 213
2119             ACTIONS => {
2120             'QNAME' => 53
2121             },
2122             GOTOS => {
2123             'action_args' => 255,
2124             'action_arg' => 101
2125             }
2126             },
2127             {#State 214
2128             ACTIONS => {
2129             'ORDER' => 256
2130             }
2131             },
2132             {#State 215
2133             ACTIONS => {
2134             'S' => 72,
2135             'TRUE' => 73,
2136             'LC' => 233,
2137             'DOLLAR_QNAME' => 85,
2138             'LITERAL' => 75,
2139             'LP' => 86,
2140             'POS_INTEGER' => 87,
2141             'LB' => 258,
2142             'QNAME' => 46,
2143             'FALSE' => 80,
2144             'NEG_INTEGER' => 81,
2145             'TR' => 82,
2146             'NUMBER' => 83,
2147             'QR' => 88
2148             },
2149             GOTOS => {
2150             'array_expr' => 232,
2151             'string' => 74,
2152             'perl_method' => 76,
2153             'literal' => 257,
2154             'perl_class' => 77,
2155             'expr' => 229,
2156             'integer' => 79,
2157             'hash_expr' => 231,
2158             'string_literal' => 84
2159             }
2160             },
2161             {#State 216
2162             ACTIONS => {
2163             'TO_DONE' => 259
2164             }
2165             },
2166             {#State 217
2167             ACTIONS => {
2168             'QNAME' => 53,
2169             'DONE' => 260
2170             },
2171             GOTOS => {
2172             'action_arg' => 145
2173             }
2174             },
2175             {#State 218
2176             DEFAULT => -119
2177             },
2178             {#State 219
2179             DEFAULT => -124
2180             },
2181             {#State 220
2182             ACTIONS => {
2183             'REGEX' => 261
2184             }
2185             },
2186             {#State 221
2187             DEFAULT => -122
2188             },
2189             {#State 222
2190             ACTIONS => {
2191             'COLON' => 262
2192             }
2193             },
2194             {#State 223
2195             ACTIONS => {
2196             'PIPELINE' => 154,
2197             'QNAME' => 151
2198             },
2199             GOTOS => {
2200             'action' => 155,
2201             'action_list' => 263
2202             }
2203             },
2204             {#State 224
2205             DEFAULT => -24
2206             },
2207             {#State 225
2208             DEFAULT => -109
2209             },
2210             {#State 226
2211             DEFAULT => -108
2212             },
2213             {#State 227
2214             ACTIONS => {
2215             'LITERAL' => -129
2216             },
2217             DEFAULT => -114
2218             },
2219             {#State 228
2220             ACTIONS => {
2221             'S' => 72,
2222             'TRUE' => 73,
2223             'LITERAL' => 75,
2224             'LB' => 228,
2225             'FALSE' => 80,
2226             'NEG_INTEGER' => 81,
2227             'TR' => 82,
2228             'NUMBER' => 83,
2229             'LC' => 233,
2230             'DOLLAR_QNAME' => 180,
2231             'LP' => 86,
2232             'POS_INTEGER' => 87,
2233             'QNAME' => 46,
2234             'QW' => 265,
2235             'QR' => 88
2236             },
2237             DEFAULT => -120,
2238             GOTOS => {
2239             'array_expr' => 232,
2240             'const_expr_list' => 177,
2241             'const_expr' => 181,
2242             'string' => 74,
2243             'perl_method' => 76,
2244             'perl_class' => 77,
2245             'literal' => 264,
2246             'expr' => 266,
2247             'integer' => 79,
2248             'const_array_expr' => 179,
2249             'hash_expr' => 231,
2250             'expr_list' => 267,
2251             'string_literal' => 84
2252             }
2253             },
2254             {#State 229
2255             DEFAULT => -137,
2256             GOTOS => {
2257             '@2-3' => 268
2258             }
2259             },
2260             {#State 230
2261             DEFAULT => -83
2262             },
2263             {#State 231
2264             DEFAULT => -131
2265             },
2266             {#State 232
2267             DEFAULT => -130
2268             },
2269             {#State 233
2270             ACTIONS => {
2271             'QNAME' => 271
2272             },
2273             DEFAULT => -139,
2274             GOTOS => {
2275             'named_expr' => 270,
2276             'named_expr_list' => 269
2277             }
2278             },
2279             {#State 234
2280             ACTIONS => {
2281             'QNAME' => 53
2282             },
2283             GOTOS => {
2284             'ordered_action_args' => 272,
2285             'action_arg' => 99
2286             }
2287             },
2288             {#State 235
2289             ACTIONS => {
2290             'QNAME' => 53
2291             },
2292             GOTOS => {
2293             'action_args' => 273,
2294             'action_arg' => 101
2295             }
2296             },
2297             {#State 236
2298             ACTIONS => {
2299             'QNAME' => 53,
2300             'DONE' => 274
2301             },
2302             GOTOS => {
2303             'action_arg' => 147
2304             }
2305             },
2306             {#State 237
2307             DEFAULT => -90
2308             },
2309             {#State 238
2310             DEFAULT => -89
2311             },
2312             {#State 239
2313             ACTIONS => {
2314             'DOES' => 197
2315             },
2316             GOTOS => {
2317             'does_in_order' => 275
2318             }
2319             },
2320             {#State 240
2321             DEFAULT => -77
2322             },
2323             {#State 241
2324             ACTIONS => {
2325             'PIPELINE' => 154,
2326             'QNAME' => 151
2327             },
2328             GOTOS => {
2329             'action' => 155,
2330             'action_list' => 276
2331             }
2332             },
2333             {#State 242
2334             ACTIONS => {
2335             'PIPELINE' => 154,
2336             'QNAME' => 151
2337             },
2338             GOTOS => {
2339             'action' => 155,
2340             'action_list' => 277
2341             }
2342             },
2343             {#State 243
2344             DEFAULT => -83
2345             },
2346             {#State 244
2347             ACTIONS => {
2348             'QNAME' => 53
2349             },
2350             GOTOS => {
2351             'ordered_action_args' => 278,
2352             'action_arg' => 99
2353             }
2354             },
2355             {#State 245
2356             ACTIONS => {
2357             'QNAME' => 53
2358             },
2359             GOTOS => {
2360             'action_args' => 279,
2361             'action_arg' => 101
2362             }
2363             },
2364             {#State 246
2365             ACTIONS => {
2366             'COLON' => 280
2367             }
2368             },
2369             {#State 247
2370             ACTIONS => {
2371             'PIPELINE' => 154,
2372             'QNAME' => 151
2373             },
2374             GOTOS => {
2375             'action' => 155,
2376             'action_list' => 281
2377             }
2378             },
2379             {#State 248
2380             ACTIONS => {
2381             'SLASH_SLASH' => 187,
2382             'COLON' => 283,
2383             'COLON_COLON' => 90,
2384             'DOES' => 284
2385             },
2386             DEFAULT => -82,
2387             GOTOS => {
2388             'does_in_order' => 282
2389             }
2390             },
2391             {#State 249
2392             ACTIONS => {
2393             'FILE' => 63,
2394             'QNAME' => 285,
2395             'STDIN' => 67
2396             },
2397             GOTOS => {
2398             'ordered_action_args' => 278,
2399             'ordered_in_action_args' => 209,
2400             'in_file' => 113,
2401             'action_arg' => 99,
2402             'in_action_arg' => 111
2403             }
2404             },
2405             {#State 250
2406             ACTIONS => {
2407             'FILE' => 63,
2408             'QNAME' => 285,
2409             'STDIN' => 67
2410             },
2411             GOTOS => {
2412             'in_action_args' => 210,
2413             'action_args' => 279,
2414             'in_file' => 113,
2415             'action_arg' => 101,
2416             'in_action_arg' => 114
2417             }
2418             },
2419             {#State 251
2420             DEFAULT => -96
2421             },
2422             {#State 252
2423             DEFAULT => -95
2424             },
2425             {#State 253
2426             DEFAULT => -45
2427             },
2428             {#State 254
2429             DEFAULT => -44
2430             },
2431             {#State 255
2432             ACTIONS => {
2433             'QNAME' => 53,
2434             'DONE' => 286
2435             },
2436             GOTOS => {
2437             'action_arg' => 147
2438             }
2439             },
2440             {#State 256
2441             ACTIONS => {
2442             'COLON' => 287
2443             }
2444             },
2445             {#State 257
2446             DEFAULT => -129
2447             },
2448             {#State 258
2449             ACTIONS => {
2450             'S' => 72,
2451             'TRUE' => 73,
2452             'LITERAL' => 75,
2453             'LB' => 258,
2454             'FALSE' => 80,
2455             'NEG_INTEGER' => 81,
2456             'TR' => 82,
2457             'NUMBER' => 83,
2458             'LC' => 233,
2459             'DOLLAR_QNAME' => 85,
2460             'LP' => 86,
2461             'POS_INTEGER' => 87,
2462             'QNAME' => 46,
2463             'QW' => 288,
2464             'QR' => 88
2465             },
2466             DEFAULT => -128,
2467             GOTOS => {
2468             'array_expr' => 232,
2469             'string' => 74,
2470             'perl_method' => 76,
2471             'literal' => 257,
2472             'perl_class' => 77,
2473             'expr' => 266,
2474             'integer' => 79,
2475             'hash_expr' => 231,
2476             'expr_list' => 267,
2477             'string_literal' => 84
2478             }
2479             },
2480             {#State 259
2481             ACTIONS => {
2482             'DONE' => 289
2483             }
2484             },
2485             {#State 260
2486             DEFAULT => -107
2487             },
2488             {#State 261
2489             DEFAULT => -123
2490             },
2491             {#State 262
2492             ACTIONS => {
2493             'QNAME' => 53
2494             },
2495             GOTOS => {
2496             'action_args' => 290,
2497             'action_arg' => 101
2498             }
2499             },
2500             {#State 263
2501             ACTIONS => {
2502             'PIPELINE' => 201,
2503             'QNAME' => 151,
2504             'DONE' => 291
2505             },
2506             GOTOS => {
2507             'action' => 203
2508             }
2509             },
2510             {#State 264
2511             ACTIONS => {
2512             'LC' => -129
2513             },
2514             DEFAULT => -125
2515             },
2516             {#State 265
2517             ACTIONS => {
2518             'REGEX' => 292
2519             }
2520             },
2521             {#State 266
2522             DEFAULT => -133
2523             },
2524             {#State 267
2525             ACTIONS => {
2526             'S' => 72,
2527             'TRUE' => 73,
2528             'LITERAL' => 75,
2529             'LB' => 258,
2530             'FALSE' => 80,
2531             'NEG_INTEGER' => 81,
2532             'TR' => 82,
2533             'NUMBER' => 83,
2534             'LC' => 233,
2535             'RB' => 293,
2536             'DOLLAR_QNAME' => 85,
2537             'LP' => 86,
2538             'POS_INTEGER' => 87,
2539             'QNAME' => 46,
2540             'QW' => 294,
2541             'QR' => 88
2542             },
2543             GOTOS => {
2544             'array_expr' => 232,
2545             'string' => 74,
2546             'perl_method' => 76,
2547             'literal' => 257,
2548             'perl_class' => 77,
2549             'expr' => 295,
2550             'integer' => 79,
2551             'hash_expr' => 231,
2552             'string_literal' => 84
2553             }
2554             },
2555             {#State 268
2556             ACTIONS => {
2557             'LITERAL' => 296
2558             }
2559             },
2560             {#State 269
2561             ACTIONS => {
2562             'QNAME' => 271,
2563             'RC' => 298
2564             },
2565             GOTOS => {
2566             'named_expr' => 297
2567             }
2568             },
2569             {#State 270
2570             DEFAULT => -140
2571             },
2572             {#State 271
2573             ACTIONS => {
2574             'COLON' => 215
2575             }
2576             },
2577             {#State 272
2578             ACTIONS => {
2579             'QNAME' => 53,
2580             'DONE' => 299
2581             },
2582             GOTOS => {
2583             'action_arg' => 145
2584             }
2585             },
2586             {#State 273
2587             ACTIONS => {
2588             'QNAME' => 53,
2589             'DONE' => 300
2590             },
2591             GOTOS => {
2592             'action_arg' => 147
2593             }
2594             },
2595             {#State 274
2596             DEFAULT => -106
2597             },
2598             {#State 275
2599             ACTIONS => {
2600             'COLON' => 301
2601             }
2602             },
2603             {#State 276
2604             ACTIONS => {
2605             'PIPELINE' => 201,
2606             'QNAME' => 151,
2607             'DONE' => 302
2608             },
2609             GOTOS => {
2610             'action' => 203
2611             }
2612             },
2613             {#State 277
2614             ACTIONS => {
2615             'PIPELINE' => 201,
2616             'QNAME' => 151,
2617             'DONE' => 303
2618             },
2619             GOTOS => {
2620             'action' => 203
2621             }
2622             },
2623             {#State 278
2624             ACTIONS => {
2625             'QNAME' => 53,
2626             'DONE' => 304
2627             },
2628             GOTOS => {
2629             'action_arg' => 145
2630             }
2631             },
2632             {#State 279
2633             ACTIONS => {
2634             'QNAME' => 53,
2635             'DONE' => 305
2636             },
2637             GOTOS => {
2638             'action_arg' => 147
2639             }
2640             },
2641             {#State 280
2642             ACTIONS => {
2643             'PIPELINE' => 154,
2644             'QNAME' => 151
2645             },
2646             GOTOS => {
2647             'action' => 155,
2648             'action_list' => 306
2649             }
2650             },
2651             {#State 281
2652             ACTIONS => {
2653             'PIPELINE' => 201,
2654             'QNAME' => 151,
2655             'DONE' => 307
2656             },
2657             GOTOS => {
2658             'action' => 203
2659             }
2660             },
2661             {#State 282
2662             ACTIONS => {
2663             'COLON' => 308
2664             }
2665             },
2666             {#State 283
2667             ACTIONS => {
2668             'S' => 72,
2669             'FILE' => 63,
2670             'TRUE' => 73,
2671             'LITERAL' => 75,
2672             'LB' => 228,
2673             'FALSE' => 80,
2674             'NEG_INTEGER' => 81,
2675             'TR' => 82,
2676             'NUMBER' => 83,
2677             'PIPELINE' => 136,
2678             'LC' => 233,
2679             'DOLLAR_QNAME' => 137,
2680             'LP' => 86,
2681             'POS_INTEGER' => 138,
2682             'QNAME' => 248,
2683             'STDIN' => 67,
2684             'QR' => 88,
2685             'DOES' => 141
2686             },
2687             DEFAULT => -113,
2688             GOTOS => {
2689             'string' => 74,
2690             'perl_method' => 76,
2691             'in_action_arg' => 157,
2692             'const_action_expr' => 130,
2693             'does_in_order' => 129,
2694             'perl_class' => 77,
2695             'literal' => 227,
2696             'named_expr' => 133,
2697             'action_arg' => 230,
2698             'expr' => 229,
2699             'integer' => 79,
2700             'const_array_expr' => 135,
2701             'hash_expr' => 231,
2702             'string_literal' => 84,
2703             'array_expr' => 232,
2704             'in_file' => 113,
2705             'action' => 140,
2706             'action_expr' => 309
2707             }
2708             },
2709             {#State 284
2710             ACTIONS => {
2711             'COLON' => 310,
2712             'IN' => 56
2713             }
2714             },
2715             {#State 285
2716             ACTIONS => {
2717             'COLON' => 312,
2718             'DOES' => 313
2719             },
2720             GOTOS => {
2721             'does_in_order' => 311
2722             }
2723             },
2724             {#State 286
2725             DEFAULT => -47
2726             },
2727             {#State 287
2728             ACTIONS => {
2729             'QNAME' => 53
2730             },
2731             GOTOS => {
2732             'ordered_action_args' => 314,
2733             'action_arg' => 99
2734             }
2735             },
2736             {#State 288
2737             ACTIONS => {
2738             'REGEX' => 315
2739             }
2740             },
2741             {#State 289
2742             DEFAULT => -66
2743             },
2744             {#State 290
2745             ACTIONS => {
2746             'QNAME' => 53,
2747             'DONE' => 316
2748             },
2749             GOTOS => {
2750             'action_arg' => 147
2751             }
2752             },
2753             {#State 291
2754             DEFAULT => -86
2755             },
2756             {#State 292
2757             ACTIONS => {
2758             'LC' => -134
2759             },
2760             DEFAULT => -122
2761             },
2762             {#State 293
2763             DEFAULT => -142
2764             },
2765             {#State 294
2766             ACTIONS => {
2767             'REGEX' => 317
2768             }
2769             },
2770             {#State 295
2771             DEFAULT => -136
2772             },
2773             {#State 296
2774             ACTIONS => {
2775             'COLON' => 318
2776             }
2777             },
2778             {#State 297
2779             DEFAULT => -141
2780             },
2781             {#State 298
2782             DEFAULT => -143
2783             },
2784             {#State 299
2785             DEFAULT => -85
2786             },
2787             {#State 300
2788             DEFAULT => -84
2789             },
2790             {#State 301
2791             ACTIONS => {
2792             'PIPELINE' => 154,
2793             'QNAME' => 151
2794             },
2795             GOTOS => {
2796             'action' => 155,
2797             'action_list' => 319
2798             }
2799             },
2800             {#State 302
2801             DEFAULT => -75
2802             },
2803             {#State 303
2804             DEFAULT => -86
2805             },
2806             {#State 304
2807             DEFAULT => -85
2808             },
2809             {#State 305
2810             DEFAULT => -84
2811             },
2812             {#State 306
2813             ACTIONS => {
2814             'PIPELINE' => 201,
2815             'QNAME' => 151,
2816             'DONE' => 320
2817             },
2818             GOTOS => {
2819             'action' => 203
2820             }
2821             },
2822             {#State 307
2823             DEFAULT => -79
2824             },
2825             {#State 308
2826             ACTIONS => {
2827             'FILE' => 63,
2828             'QNAME' => 285,
2829             'STDIN' => 67
2830             },
2831             GOTOS => {
2832             'ordered_action_args' => 272,
2833             'ordered_in_action_args' => 209,
2834             'in_file' => 113,
2835             'action_arg' => 99,
2836             'in_action_arg' => 111
2837             }
2838             },
2839             {#State 309
2840             DEFAULT => -87
2841             },
2842             {#State 310
2843             ACTIONS => {
2844             'FILE' => 63,
2845             'QNAME' => 285,
2846             'STDIN' => 67
2847             },
2848             GOTOS => {
2849             'in_action_args' => 210,
2850             'action_args' => 273,
2851             'in_file' => 113,
2852             'action_arg' => 101,
2853             'in_action_arg' => 114
2854             }
2855             },
2856             {#State 311
2857             ACTIONS => {
2858             'COLON' => 321
2859             }
2860             },
2861             {#State 312
2862             ACTIONS => {
2863             'S' => 72,
2864             'FILE' => 63,
2865             'TRUE' => 73,
2866             'LITERAL' => 75,
2867             'LB' => 132,
2868             'FALSE' => 80,
2869             'NEG_INTEGER' => 81,
2870             'TR' => 82,
2871             'NUMBER' => 83,
2872             'PIPELINE' => 136,
2873             'DOLLAR_QNAME' => 137,
2874             'LP' => 86,
2875             'POS_INTEGER' => 138,
2876             'QNAME' => 248,
2877             'STDIN' => 67,
2878             'QR' => 88,
2879             'DOES' => 141
2880             },
2881             DEFAULT => -113,
2882             GOTOS => {
2883             'in_file' => 113,
2884             'string' => 74,
2885             'perl_method' => 76,
2886             'in_action_arg' => 157,
2887             'const_action_expr' => 130,
2888             'does_in_order' => 129,
2889             'perl_class' => 77,
2890             'literal' => 131,
2891             'named_expr' => 133,
2892             'action_arg' => 134,
2893             'integer' => 79,
2894             'const_array_expr' => 135,
2895             'action' => 140,
2896             'action_expr' => 309,
2897             'string_literal' => 84
2898             }
2899             },
2900             {#State 313
2901             ACTIONS => {
2902             'COLON' => 322,
2903             'IN' => 56
2904             }
2905             },
2906             {#State 314
2907             ACTIONS => {
2908             'QNAME' => 53,
2909             'DONE' => 323
2910             },
2911             GOTOS => {
2912             'action_arg' => 145
2913             }
2914             },
2915             {#State 315
2916             DEFAULT => -134
2917             },
2918             {#State 316
2919             DEFAULT => -111
2920             },
2921             {#State 317
2922             DEFAULT => -135
2923             },
2924             {#State 318
2925             ACTIONS => {
2926             'S' => 72,
2927             'FALSE' => 80,
2928             'LC' => 233,
2929             'DOLLAR_QNAME' => 85,
2930             'LP' => 86,
2931             'POS_INTEGER' => 87,
2932             'QR' => 88,
2933             'TRUE' => 73,
2934             'LITERAL' => 75,
2935             'LB' => 258,
2936             'NEG_INTEGER' => 81,
2937             'TR' => 82,
2938             'NUMBER' => 83,
2939             'QNAME' => 46
2940             },
2941             DEFAULT => -128,
2942             GOTOS => {
2943             'array_expr' => 232,
2944             'string' => 74,
2945             'perl_method' => 76,
2946             'literal' => 257,
2947             'perl_class' => 77,
2948             'expr' => 324,
2949             'integer' => 79,
2950             'hash_expr' => 231,
2951             'string_literal' => 84
2952             }
2953             },
2954             {#State 319
2955             ACTIONS => {
2956             'PIPELINE' => 201,
2957             'QNAME' => 151,
2958             'DONE' => 325
2959             },
2960             GOTOS => {
2961             'action' => 203
2962             }
2963             },
2964             {#State 320
2965             DEFAULT => -81
2966             },
2967             {#State 321
2968             ACTIONS => {
2969             'FILE' => 63,
2970             'QNAME' => 285,
2971             'STDIN' => 67
2972             },
2973             GOTOS => {
2974             'ordered_action_args' => 192,
2975             'ordered_in_action_args' => 209,
2976             'in_file' => 113,
2977             'action_arg' => 99,
2978             'in_action_arg' => 111
2979             }
2980             },
2981             {#State 322
2982             ACTIONS => {
2983             'FILE' => 63,
2984             'QNAME' => 285,
2985             'STDIN' => 67
2986             },
2987             GOTOS => {
2988             'in_action_args' => 210,
2989             'action_args' => 193,
2990             'in_file' => 113,
2991             'action_arg' => 101,
2992             'in_action_arg' => 114
2993             }
2994             },
2995             {#State 323
2996             DEFAULT => -48
2997             },
2998             {#State 324
2999             DEFAULT => -138
3000             },
3001             {#State 325
3002             DEFAULT => -76
3003             }
3004             ],
3005             yyrules =>
3006             [
3007             [#Rule 0
3008             '$start', 2, undef
3009             ],
3010             [#Rule 1
3011             'program', 1, undef
3012             ],
3013             [#Rule 2
3014             'program', 2,
3015             sub
3016             #line 53 "unkown"
3017             { my($a, $b) = @_[1,2];
3018             sub { $a -> (); $b -> () }
3019             }
3020             ],
3021             [#Rule 3
3022             'program_segment', 1,
3023             sub
3024             #line 59 "unkown"
3025             { my($body) = $_[1];
3026             sub {
3027             $_ -> () for @{$body -> [0]};
3028             $_ -> () for @{$body -> [1]};
3029             }
3030             }
3031             ],
3032             [#Rule 4
3033             'program_segment', 1, undef
3034             ],
3035             [#Rule 5
3036             'machine', 6,
3037             sub
3038             #line 69 "unkown"
3039             {
3040             # evaluate body in the context of the named machine
3041             print "MACHINE machine_name DOES COLON body DONE\n";
3042             my($p, $m, $body) = @_[0,2,5];
3043             sub { $p -> _eval_in_m($m, sub {
3044             $_ -> () for @{$body -> [0]};
3045             $_ -> () for @{$body -> [1]};
3046             }) };
3047             }
3048             ],
3049             [#Rule 6
3050             'machine_name', 1,
3051             sub
3052             #line 81 "unkown"
3053             { $_[1] }
3054             ],
3055             [#Rule 7
3056             'machine_name', 3,
3057             sub
3058             #line 82 "unkown"
3059             { $_[1] . '::' . $_[3] }
3060             ],
3061             [#Rule 8
3062             'body', 0,
3063             sub
3064             #line 86 "unkown"
3065             { [ [], [] ] }
3066             ],
3067             [#Rule 9
3068             'body', 2,
3069             sub
3070             #line 87 "unkown"
3071             { my($b, $d) = @_[1,2];
3072             [ [ @{$b->[0]}, $d ], $b->[1] ]
3073             }
3074             ],
3075             [#Rule 10
3076             'body', 2,
3077             sub
3078             #line 90 "unkown"
3079             { my($b, $p) = @_[1,2];
3080             [ $b->[0], [ @{$b->[1]}, $p ] ]
3081             }
3082             ],
3083             [#Rule 11
3084             'decl_stmt', 1, undef
3085             ],
3086             [#Rule 12
3087             'decl_stmt', 1, undef
3088             ],
3089             [#Rule 13
3090             'decl_stmt', 1, undef
3091             ],
3092             [#Rule 14
3093             'decl_stmt', 1, undef
3094             ],
3095             [#Rule 15
3096             'decl_stmt', 1, undef
3097             ],
3098             [#Rule 16
3099             'qname_list', 1,
3100             sub
3101             #line 104 "unkown"
3102             { [ $_[1] ] }
3103             ],
3104             [#Rule 17
3105             'qname_list', 2,
3106             sub
3107             #line 105 "unkown"
3108             { [ @{$_[1]}, $_[2] ] }
3109             ],
3110             [#Rule 18
3111             'opt_qname', 0, undef
3112             ],
3113             [#Rule 19
3114             'opt_qname', 1, undef
3115             ],
3116             [#Rule 20
3117             'integer', 1, undef
3118             ],
3119             [#Rule 21
3120             'integer', 1, undef
3121             ],
3122             [#Rule 22
3123             'string_literal', 1,
3124             sub
3125             #line 119 "unkown"
3126             { my $l = $_[1]; sub { $l } }
3127             ],
3128             [#Rule 23
3129             'string_literal', 1,
3130             sub
3131             #line 120 "unkown"
3132             { my($p, $v) = @_[0,1];
3133             sub { $p -> _e -> {vars} -> {$v} }
3134             }
3135             ],
3136             [#Rule 24
3137             'string_literal', 3,
3138             sub
3139             #line 123 "unkown"
3140             { my($p, $v, $d) = @_[0,1,3];
3141             sub {
3142             defined($p -> _e -> {vars} -> {$v})
3143             ? $p -> _e -> {vars} -> {$v}
3144             : $d -> ()
3145             }
3146             }
3147             ],
3148             [#Rule 25
3149             'string', 1,
3150             sub
3151             #line 133 "unkown"
3152             { $_[1] }
3153             ],
3154             [#Rule 26
3155             'string', 3,
3156             sub
3157             #line 134 "unkown"
3158             { my($l, $r) = @_[1,3]; sub { $l->() . $r -> () } }
3159             ],
3160             [#Rule 27
3161             'literal', 1,
3162             sub
3163             #line 139 "unkown"
3164             { $_[1] }
3165             ],
3166             [#Rule 28
3167             'literal', 1,
3168             sub
3169             #line 140 "unkown"
3170             { my $s = $_[1]; sub { $s } }
3171             ],
3172             [#Rule 29
3173             'literal', 1,
3174             sub
3175             #line 141 "unkown"
3176             { my $s = $_[1]; sub { $s } }
3177             ],
3178             [#Rule 30
3179             'literal', 2,
3180             sub
3181             #line 142 "unkown"
3182             { my $s = $_[2]; sub { qr/$s/ } }
3183             ],
3184             [#Rule 31
3185             'literal', 2,
3186             sub
3187             #line 143 "unkown"
3188             { my($l,$r) = @{$_[2]};
3189             $l =~ s[([^\\]){][$1\\{]g;
3190             $l =~ s[([^\\])}][$1\\}]g;
3191             $r =~ s[([^\\]){][$1\\{]g;
3192             $r =~ s[([^\\])}][$1\\}]g;
3193             sub { eval "sub { s{$l}{$r}gs }" }
3194             }
3195             ],
3196             [#Rule 32
3197             'literal', 2,
3198             sub
3199             #line 150 "unkown"
3200             { my($l,$r) = @{$_[2]};
3201             $l =~ s[([^\\]){][$1\\{]g;
3202             $l =~ s[([^\\])}][$1\\}]g;
3203             $r =~ s[([^\\]){][$1\\{]g;
3204             $r =~ s[([^\\])}][$1\\}]g;
3205             sub { eval "sub { tr{$l}{$r} }" }
3206             }
3207             ],
3208             [#Rule 33
3209             'literal', 1,
3210             sub
3211             #line 157 "unkown"
3212             { sub { 1 } }
3213             ],
3214             [#Rule 34
3215             'literal', 1,
3216             sub
3217             #line 158 "unkown"
3218             { sub { 0 } }
3219             ],
3220             [#Rule 35
3221             'literal', 1,
3222             sub
3223             #line 159 "unkown"
3224             { $_[1] }
3225             ],
3226             [#Rule 36
3227             'literal', 3,
3228             sub
3229             #line 160 "unkown"
3230             { $_[2] }
3231             ],
3232             [#Rule 37
3233             'in_file', 1,
3234             sub
3235             #line 164 "unkown"
3236             { sub { \*STDIN } }
3237             ],
3238             [#Rule 38
3239             'in_file', 2,
3240             sub
3241             #line 165 "unkown"
3242             { my $fname = $_[2]; sub { my $fn = $fname -> (); print "opening $fn\n"; open my $fh, "<", ($fn); print "fh: $fh\n"; $fh } }
3243             ],
3244             [#Rule 39
3245             'in_file', 4,
3246             sub
3247             #line 166 "unkown"
3248             { my($p, $v) = @_[0,2];
3249             sub {
3250             if(defined($p -> _e -> {vars} -> {$v})) {
3251             my $fname = $p -> _e -> {vars} -> {$v};
3252             open my $fh, "<", ($fname);
3253             return $fh;
3254             }
3255             return \*STDIN;
3256             }
3257             }
3258             ],
3259             [#Rule 40
3260             'out_file', 1,
3261             sub
3262             #line 179 "unkown"
3263             { sub { \*STDOUT } }
3264             ],
3265             [#Rule 41
3266             'out_file', 2,
3267             sub
3268             #line 180 "unkown"
3269             { my $fname = $_[2]; sub { open my $fh, ">", ($fname -> ()); $fh } }
3270             ],
3271             [#Rule 42
3272             'out_file', 4,
3273             sub
3274             #line 181 "unkown"
3275             { my($p, $v) = @_[0,2];
3276             sub {
3277             if(defined($p -> _e -> {vars} -> {$v})) {
3278             my $fname = $p -> _e -> {vars} -> {$v};
3279             open my $fh, ">", ($fname);
3280             return $fh;
3281             }
3282             return \*STDOUT;
3283             }
3284             }
3285             ],
3286             [#Rule 43
3287             'perl_method', 1,
3288             sub
3289             #line 194 "unkown"
3290             {
3291             my($p, $class, $method) = (@_[0,1], 'new');
3292             sub {
3293             $p -> _perl_classes -> {$class} or die "Unable to find '$class'\n";
3294             $class -> can($method) or die "Unable to find '$method' for '$class'\n";
3295              
3296             $class -> $method();
3297             }
3298             }
3299             ],
3300             [#Rule 44
3301             'perl_method', 5,
3302             sub
3303             #line 203 "unkown"
3304             {
3305             my($p, $class, $method, $args) = ($_[0], $_[1], 'new', $_[4]);
3306             sub {
3307             $p -> _perl_classes -> {$class} or die "Unable to find '$class'\n";
3308             $class -> can($method) or die "Unable to find '$method' for '$class'\n";
3309             $class -> $method(%{$args -> ()});
3310             }
3311             }
3312             ],
3313             [#Rule 45
3314             'perl_method', 5,
3315             sub
3316             #line 211 "unkown"
3317             {
3318             my($p, $class, $method, $args) = ($_[0], $_[1], 'new', $_[4]);
3319             sub {
3320             $p -> _perl_classes -> {$class} or die "Unable to find '$class'\n";
3321             $class -> can($method) or die "Unable to find '$method' for '$class'\n";
3322             $class -> $method(@{$args->()});
3323             }
3324             }
3325             ],
3326             [#Rule 46
3327             'perl_method', 3,
3328             sub
3329             #line 219 "unkown"
3330             {
3331             my($p, $class, $method) = (@_[0,1,3]);
3332             sub {
3333             $p -> _perl_classes -> {$class} or die "Unable to find '$class'\n";
3334             $class -> can($method) or die "Unable to find '$method' for '$class'\n";
3335              
3336             $class -> $method();
3337             }
3338             }
3339             ],
3340             [#Rule 47
3341             'perl_method', 6,
3342             sub
3343             #line 228 "unkown"
3344             {
3345             my($p, $class, $method, $args) = (@_[0,1,3,5]);
3346             sub {
3347             $p -> _perl_classes -> {$class} or die "Unable to find '$class'\n";
3348             $class -> can($method) or die "Unable to find '$method' for '$class'\n";
3349             $class -> $method(%{$args->()})
3350             }
3351             }
3352             ],
3353             [#Rule 48
3354             'perl_method', 8,
3355             sub
3356             #line 236 "unkown"
3357             {
3358             my($p, $class, $method, $args) = (@_[0,1,3,7]);
3359             sub {
3360             $p -> _perl_classes -> {$class} or die "Unable to find '$class'\n";
3361             $class -> can($method) or die "Unable to find '$method' for '$class'\n";
3362             $class-> $method(@{$args -> ()});
3363             }
3364             }
3365             ],
3366             [#Rule 49
3367             'let_stmt', 4,
3368             sub
3369             #line 247 "unkown"
3370             {
3371             my($p, $var, $val) = @_[0,2,4];
3372             sub { $p -> _vars -> {$var} = $val -> (); }
3373             }
3374             ],
3375             [#Rule 50
3376             'let_stmt', 3,
3377             sub
3378             #line 251 "unkown"
3379             {
3380             my($p, $var) = @_[0,2];
3381             sub { $p -> _vars -> {$var} = undef; }
3382             }
3383             ],
3384             [#Rule 51
3385             'use_stmt', 3,
3386             sub
3387             #line 258 "unkown"
3388             {
3389             my($p, $list) = @_[0,3];
3390             sub { $p -> load_actions("Action", @{$list}); }
3391             }
3392             ],
3393             [#Rule 52
3394             'use_stmt', 3,
3395             sub
3396             #line 262 "unkown"
3397             {
3398             my($p, $list) = @_[0,3];
3399             sub { $p -> load_actions("Adapter", @{$list}); }
3400             }
3401             ],
3402             [#Rule 53
3403             'use_stmt', 3,
3404             sub
3405             #line 266 "unkown"
3406             {
3407             my($p, $list) = @_[0,3];
3408             sub { $p -> load_actions("Adapter", @{$list}); }
3409             }
3410             ],
3411             [#Rule 54
3412             'import_stmt', 3,
3413             sub
3414             #line 273 "unkown"
3415             {
3416             my($p,$list) = @_[0,3];
3417             sub {
3418             my $loaded = $p -> _perl_classes;
3419             foreach my $class (@{$list}) {
3420             next if $loaded->{$class};
3421             eval "require $class";
3422             if($@) {
3423             warn "Unable to import '$class'\n";
3424             }
3425             else {
3426             $loaded->{$class}++;
3427             }
3428             }
3429             }
3430             }
3431             ],
3432             [#Rule 55
3433             'io_stmt', 3,
3434             sub
3435             #line 292 "unkown"
3436             {
3437             my($p, $v) = @_[0,3];
3438             sub { $p -> _e -> {to} = [ %{$v -> ()} ] }
3439             }
3440             ],
3441             [#Rule 56
3442             'io_stmt', 3,
3443             sub
3444             #line 296 "unkown"
3445             {
3446             my($p, $v) = @_[0,3];
3447             sub { $p -> _e -> {to} = [ $v -> () ] }
3448             }
3449             ],
3450             [#Rule 57
3451             'io_stmt', 5,
3452             sub
3453             #line 300 "unkown"
3454             {
3455             my($p, $v) = @_[0,4];
3456             sub { $p -> _e -> {to} = [ %{$v -> ()} ] }
3457             }
3458             ],
3459             [#Rule 58
3460             'io_stmt', 5,
3461             sub
3462             #line 304 "unkown"
3463             {
3464             my($p, $v) = @_[0,4];
3465             sub { $p -> _e -> {to} = $v -> () }
3466             }
3467             ],
3468             [#Rule 59
3469             'io_stmt', 3,
3470             sub
3471             #line 308 "unkown"
3472             {
3473             my($p, $v) = @_[0,3];
3474             sub { $p -> _e -> {from} = [ %{$v -> ()} ] }
3475             }
3476             ],
3477             [#Rule 60
3478             'io_stmt', 3,
3479             sub
3480             #line 312 "unkown"
3481             {
3482             my($p, $v) = @_[0,3];
3483             sub { $p -> _e -> {from} = [ $v -> () ] }
3484             }
3485             ],
3486             [#Rule 61
3487             'io_stmt', 5,
3488             sub
3489             #line 316 "unkown"
3490             {
3491             my($p, $v) = @_[0,4];
3492             sub { $p -> _e -> {from} = [ %{$v -> ()} ] }
3493             }
3494             ],
3495             [#Rule 62
3496             'io_stmt', 5,
3497             sub
3498             #line 320 "unkown"
3499             {
3500             my($p, $v) = @_[0,4];
3501             sub { $p -> _e -> {from} = $v -> () }
3502             }
3503             ],
3504             [#Rule 63
3505             'filter_type', 1,
3506             sub
3507             #line 331 "unkown"
3508             { 'any' }
3509             ],
3510             [#Rule 64
3511             'filter_type', 1,
3512             sub
3513             #line 332 "unkown"
3514             { 'all' }
3515             ],
3516             [#Rule 65
3517             '@1-6', 0,
3518             sub
3519             #line 336 "unkown"
3520             {
3521             $_[0] -> in_freeform_until_done;
3522             [ @_[2,4,1] ]
3523             }
3524             ],
3525             [#Rule 66
3526             'filter_def', 9,
3527             sub
3528             #line 339 "unkown"
3529             {
3530             my($p,$info, $code) = @_[0,7,8];
3531             sub { $p -> compile_ext_lang(@$info, $code) }
3532             }
3533             ],
3534             [#Rule 67
3535             'perl_class', 3,
3536             sub
3537             #line 346 "unkown"
3538             { $_[1] . '::' . $_[3] }
3539             ],
3540             [#Rule 68
3541             'perl_class', 3,
3542             sub
3543             #line 347 "unkown"
3544             { $_[1] . '::' . $_[3] }
3545             ],
3546             [#Rule 69
3547             'perl_class_list', 1,
3548             sub
3549             #line 351 "unkown"
3550             { [ $_[1] ] }
3551             ],
3552             [#Rule 70
3553             'perl_class_list', 2,
3554             sub
3555             #line 352 "unkown"
3556             { [ @{$_[1]}, $_[2] ] }
3557             ],
3558             [#Rule 71
3559             'does_in_order', 3, undef
3560             ],
3561             [#Rule 72
3562             'pipeline_def', 6,
3563             sub
3564             #line 360 "unkown"
3565             {
3566             my($p, $n, $a) = @_[0,2,5];
3567             sub {
3568             $a = $a -> ();
3569             $a = $a->[0] if @$a == 1;
3570             $p->_m->add_pipeline((defined($n)?$n:'finally'), $a);
3571             }
3572             }
3573             ],
3574             [#Rule 73
3575             'pipeline_def', 6,
3576             sub
3577             #line 368 "unkown"
3578             {
3579             my($p, $n, $a) = @_[0,2,5];
3580             sub {
3581             $p->_m->add_pipeline((defined($n)?$n:'finally'),
3582             Data::Pipeline::Aggregator::Union -> new(
3583             actions => $a -> ()
3584             )
3585             )
3586             }
3587             }
3588             ],
3589             [#Rule 74
3590             'actions', 1,
3591             sub
3592             #line 381 "unkown"
3593             { my($a) = $_[1]; sub { [ $a -> () ] } }
3594             ],
3595             [#Rule 75
3596             'actions', 5,
3597             sub
3598             #line 382 "unkown"
3599             { $_[4] }
3600             ],
3601             [#Rule 76
3602             'actions', 7,
3603             sub
3604             #line 383 "unkown"
3605             { my($a, $b) = @_[1,6];
3606             sub { [ @{$a -> ()}, @{$b -> ()} ] }
3607             }
3608             ],
3609             [#Rule 77
3610             'actions', 3,
3611             sub
3612             #line 386 "unkown"
3613             { my($a, $b) = @_[1,3];
3614             sub { [ @{$a -> ()}, $b -> () ] }
3615             }
3616             ],
3617             [#Rule 78
3618             'action_list', 1,
3619             sub
3620             #line 392 "unkown"
3621             { my($a) = $_[1]; sub { [ $a -> () ] } }
3622             ],
3623             [#Rule 79
3624             'action_list', 5,
3625             sub
3626             #line 393 "unkown"
3627             { $_[4] }
3628             ],
3629             [#Rule 80
3630             'action_list', 2,
3631             sub
3632             #line 395 "unkown"
3633             { my($a, $b) = @_[1,3];
3634             sub { [ @{$a -> ()}, $b -> () ] }
3635             }
3636             ],
3637             [#Rule 81
3638             'action_list', 6,
3639             sub
3640             #line 398 "unkown"
3641             { my($a, $b) = @_[1,5];
3642             sub { [ @{$a -> ()}, @{$b -> ()} ] }
3643             }
3644             ],
3645             [#Rule 82
3646             'action', 1,
3647             sub
3648             #line 404 "unkown"
3649             {
3650             my($p, $qname, $class) = @_[0,1];
3651             sub {
3652             if( $class = $p -> _e -> {filters} -> {$qname} ) {
3653             return $class -> new;
3654             }
3655             else {
3656             die "Unable to find an action '$qname'\n";
3657             }
3658             }
3659             }
3660             ],
3661             [#Rule 83
3662             'action', 3,
3663             sub
3664             #line 415 "unkown"
3665             {
3666             my($p, $qname, $arg, $class) = @_[0,1,3];
3667             sub {
3668             if( $class = $p -> _filters -> {$qname} ) {
3669             $class -> new( %{$arg->()} );
3670             }
3671             else {
3672             die "Unable to find an action '$qname'\n";
3673             }
3674             }
3675             }
3676             ],
3677             [#Rule 84
3678             'action', 5,
3679             sub
3680             #line 426 "unkown"
3681             {
3682             my($p, $qname, $args, $class) = @_[0,1,4];
3683             sub {
3684             if( $class = $p-> _filters -> {$qname} ) {
3685             $class -> new( %{$args->()} );
3686             }
3687             else {
3688             die "Unable to find an action '$qname'\n";
3689             }
3690             }
3691             }
3692             ],
3693             [#Rule 85
3694             'action', 5,
3695             sub
3696             #line 437 "unkown"
3697             {
3698             my($p, $qname, $args, $class) = @_[0,1,4];
3699             sub {
3700             if( $class = $p -> _filters -> {$qname} ) {
3701             $class -> new( @{$args->()} );
3702             }
3703             else {
3704             die "Unable to find an action '$qname'\n";
3705             }
3706             }
3707             }
3708             ],
3709             [#Rule 86
3710             'action', 5,
3711             sub
3712             #line 448 "unkown"
3713             {
3714             my($args) = $_[4];
3715             sub {
3716             Data::Pipeline::Aggregator::Union -> new(
3717             actions => $args->()
3718             );
3719             }
3720             }
3721             ],
3722             [#Rule 87
3723             'action_arg', 3,
3724             sub
3725             #line 459 "unkown"
3726             { my($q, $a) = @_[1,3]; sub { +{$q => $a->()} } }
3727             ],
3728             [#Rule 88
3729             'action_arg', 3,
3730             sub
3731             #line 460 "unkown"
3732             { my($q, $a) = @_[1,3]; sub { +{$q => $a->()} } }
3733             ],
3734             [#Rule 89
3735             'action_arg', 5,
3736             sub
3737             #line 461 "unkown"
3738             { my($q,$a) = @_[1,4]; sub { +{$q => $a->()} } }
3739             ],
3740             [#Rule 90
3741             'action_arg', 5,
3742             sub
3743             #line 462 "unkown"
3744             {my($q,$a) = @_[1,4]; sub { +{ $q => $a->() } } }
3745             ],
3746             [#Rule 91
3747             'action_args', 1, undef
3748             ],
3749             [#Rule 92
3750             'action_args', 2,
3751             sub
3752             #line 467 "unkown"
3753             { my($a,$b) = @_[1,2]; sub { +{ %{$a->()}, %{$b->()} } } }
3754             ],
3755             [#Rule 93
3756             'in_action_arg', 3,
3757             sub
3758             #line 471 "unkown"
3759             { my($q, $a) = @_[1,3]; sub { +{$q => $a->()} } }
3760             ],
3761             [#Rule 94
3762             'in_action_arg', 3,
3763             sub
3764             #line 472 "unkown"
3765             { my($q, $a) = @_[1,3]; sub { +{$q => $a->()} } }
3766             ],
3767             [#Rule 95
3768             'in_action_arg', 5,
3769             sub
3770             #line 473 "unkown"
3771             { my($q,$a) = @_[1,4]; sub { +{$q => $a->()} } }
3772             ],
3773             [#Rule 96
3774             'in_action_arg', 5,
3775             sub
3776             #line 474 "unkown"
3777             {my($q,$a) = @_[1,4]; sub { +{ $q => $a->() } } }
3778             ],
3779             [#Rule 97
3780             'in_action_arg', 1, undef
3781             ],
3782             [#Rule 98
3783             'in_action_args', 1, undef
3784             ],
3785             [#Rule 99
3786             'in_action_args', 2,
3787             sub
3788             #line 480 "unkown"
3789             { my($a,$b) = @_[1,2]; sub { +{ %{$a->()}, %{$b->()} } } }
3790             ],
3791             [#Rule 100
3792             'ordered_action_args', 1,
3793             sub
3794             #line 484 "unkown"
3795             { my $a = $_[1]; sub { [ %{$a -> ()} ] } }
3796             ],
3797             [#Rule 101
3798             'ordered_action_args', 2,
3799             sub
3800             #line 485 "unkown"
3801             { my($a,$b) = @_[1,2]; sub { [ @{$a->()}, %{$b->()}]} }
3802             ],
3803             [#Rule 102
3804             'ordered_in_action_args', 1,
3805             sub
3806             #line 489 "unkown"
3807             { my $a = $_[1]; sub { [ %{$a -> ()} ] } }
3808             ],
3809             [#Rule 103
3810             'ordered_in_action_args', 2,
3811             sub
3812             #line 490 "unkown"
3813             { my($a,$b) = @_[1,2]; sub { [ @{$a->()}, %{$b->()}]} }
3814             ],
3815             [#Rule 104
3816             'action_expr', 1, undef
3817             ],
3818             [#Rule 105
3819             'action_expr', 1, undef
3820             ],
3821             [#Rule 106
3822             'action_expr', 4,
3823             sub
3824             #line 496 "unkown"
3825             { $_[3] }
3826             ],
3827             [#Rule 107
3828             'action_expr', 4,
3829             sub
3830             #line 497 "unkown"
3831             { $_[3] }
3832             ],
3833             [#Rule 108
3834             'action_expr', 3,
3835             sub
3836             #line 498 "unkown"
3837             {
3838             my($name,$default) = @_[1,3];
3839             sub {
3840             Data::Pipeline::Iterator -> new( coded_source => sub {
3841             to_IteratorSource( Data::Pipeline::Machine::has_option($name) ?
3842             Data::Pipeline::Machine::get_option($name) :
3843             $default -> ()
3844             );
3845             } )
3846             }
3847             }
3848             ],
3849             [#Rule 109
3850             'action_expr', 3,
3851             sub
3852             #line 509 "unkown"
3853             {
3854             my($opt,$default) = @_[2,4];
3855             sub {
3856             Data::Pipeline::Iterator -> new( coded_source => sub {
3857             to_IteratorSource( defined($ARGV[$opt]) ?
3858             $ARGV[$opt] : $default -> ()
3859             );
3860             });
3861             }
3862             }
3863             ],
3864             [#Rule 110
3865             'action_expr', 2,
3866             sub
3867             #line 519 "unkown"
3868             {
3869             my($p, $qname) = @_[0,2];
3870              
3871             sub {
3872             Data::Pipeline::Machine::Surrogate -> new(
3873             machine => $p->_m,
3874             named_pipeline => $qname,
3875             options => { }
3876             );
3877             }
3878             }
3879             ],
3880             [#Rule 111
3881             'action_expr', 6,
3882             sub
3883             #line 530 "unkown"
3884             {
3885             my($p,$qname,$args) = @_[0,2,5];
3886              
3887             sub {
3888             Data::Pipeline::Machine::Surrogate -> new(
3889             machine => $p->_m,
3890             named_pipeline => $qname,
3891             options => $args
3892             );
3893             }
3894             }
3895             ],
3896             [#Rule 112
3897             'action_expr', 5,
3898             sub
3899             #line 541 "unkown"
3900             {
3901             my($args) = $_[4];
3902              
3903             sub {
3904             Data::Pipeline::Aggregator::Union -> new(
3905             actions => $args -> ()
3906             );
3907             }
3908             }
3909             ],
3910             [#Rule 113
3911             'const_action_expr', 0,
3912             sub
3913             #line 553 "unkown"
3914             { sub { } }
3915             ],
3916             [#Rule 114
3917             'const_action_expr', 1,
3918             sub
3919             #line 554 "unkown"
3920             { $_[1] }
3921             ],
3922             [#Rule 115
3923             'const_action_expr', 1,
3924             sub
3925             #line 555 "unkown"
3926             { my($p, $v) = @_;
3927             sub { $p -> _vars -> {$v} }
3928             }
3929             ],
3930             [#Rule 116
3931             'const_action_expr', 3,
3932             sub
3933             #line 558 "unkown"
3934             { my($p, $v, $d) = @_[0,1,3];
3935             sub {
3936             defined($p -> _vars -> {$v})
3937             ? $p -> _vars -> {$v}
3938             : $d
3939             }
3940             }
3941             ],
3942             [#Rule 117
3943             'const_action_expr', 1,
3944             sub
3945             #line 565 "unkown"
3946             { $_[1] }
3947             ],
3948             [#Rule 118
3949             'const_action_expr', 1,
3950             sub
3951             #line 566 "unkown"
3952             { $_[1] }
3953             ],
3954             [#Rule 119
3955             'const_array_expr', 3,
3956             sub
3957             #line 570 "unkown"
3958             { $_[2] }
3959             ],
3960             [#Rule 120
3961             'const_expr_list', 0,
3962             sub
3963             #line 574 "unkown"
3964             { sub { [] } }
3965             ],
3966             [#Rule 121
3967             'const_expr_list', 1,
3968             sub
3969             #line 575 "unkown"
3970             { my $a = $_[1]; sub { [ $a -> () ] } }
3971             ],
3972             [#Rule 122
3973             'const_expr_list', 2,
3974             sub
3975             #line 576 "unkown"
3976             { my($a) = $_[2];
3977             sub {[ split(/\s+/, $a) ]}
3978             }
3979             ],
3980             [#Rule 123
3981             'const_expr_list', 3,
3982             sub
3983             #line 579 "unkown"
3984             { my($a, $b) = @_[1,3];
3985             sub {[ @{$a -> ()}, split(/\s+/, $b) ] }
3986             }
3987             ],
3988             [#Rule 124
3989             'const_expr_list', 2,
3990             sub
3991             #line 582 "unkown"
3992             { my($a,$b) = @_[1,2];
3993             sub { [ @{$a -> ()}, @{$b -> ()} ] }
3994             }
3995             ],
3996             [#Rule 125
3997             'const_expr', 1,
3998             sub
3999             #line 588 "unkown"
4000             { $_[1] }
4001             ],
4002             [#Rule 126
4003             'const_expr', 1,
4004             sub
4005             #line 589 "unkown"
4006             { $_[1] }
4007             ],
4008             [#Rule 127
4009             'const_expr', 1,
4010             sub
4011             #line 590 "unkown"
4012             {
4013             my($p, $v) = @_[0,1];
4014             sub { $p -> _vars -> {$v} }
4015             }
4016             ],
4017             [#Rule 128
4018             'expr', 0,
4019             sub
4020             #line 597 "unkown"
4021             { sub { } }
4022             ],
4023             [#Rule 129
4024             'expr', 1,
4025             sub
4026             #line 598 "unkown"
4027             { $_[1] }
4028             ],
4029             [#Rule 130
4030             'expr', 1,
4031             sub
4032             #line 599 "unkown"
4033             { $_[1] }
4034             ],
4035             [#Rule 131
4036             'expr', 1,
4037             sub
4038             #line 600 "unkown"
4039             { $_[1] }
4040             ],
4041             [#Rule 132
4042             'expr_list', 0,
4043             sub
4044             #line 604 "unkown"
4045             { sub {[]} }
4046             ],
4047             [#Rule 133
4048             'expr_list', 1,
4049             sub
4050             #line 605 "unkown"
4051             { my($a) = $_[1]; sub { [ $a -> () ] } }
4052             ],
4053             [#Rule 134
4054             'expr_list', 2,
4055             sub
4056             #line 606 "unkown"
4057             { my $r = $_[2]; sub { [ split(/\s+/, $r) ] } }
4058             ],
4059             [#Rule 135
4060             'expr_list', 3,
4061             sub
4062             #line 607 "unkown"
4063             { my($e,$r) = @_[1,3]; sub { [ @{$e->()}, split(/\s+/, $r) ] } }
4064             ],
4065             [#Rule 136
4066             'expr_list', 2,
4067             sub
4068             #line 608 "unkown"
4069             { my($a,$b) = @_[1,2]; sub { [ @{$a -> ()}, @{$b->()} ] } }
4070             ],
4071             [#Rule 137
4072             '@2-3', 0,
4073             sub
4074             #line 612 "unkown"
4075             { my($l,$r) = @_[1,3]; sub { +{ $l => $r->() } } }
4076             ],
4077             [#Rule 138
4078             'named_expr', 7,
4079             sub
4080             #line 613 "unkown"
4081             { my($l,$r) = @_[1,3]; sub { +{ $l => $r->() } } }
4082             ],
4083             [#Rule 139
4084             'named_expr_list', 0,
4085             sub
4086             #line 617 "unkown"
4087             { sub { +{ } } }
4088             ],
4089             [#Rule 140
4090             'named_expr_list', 1,
4091             sub
4092             #line 618 "unkown"
4093             { $_[1] }
4094             ],
4095             [#Rule 141
4096             'named_expr_list', 2,
4097             sub
4098             #line 619 "unkown"
4099             { my($a, $b) = @_[1,2];
4100             sub { +{ %{$a -> ()}, %{$b -> ()} } }
4101             }
4102             ],
4103             [#Rule 142
4104             'array_expr', 3,
4105             sub
4106             #line 625 "unkown"
4107             { $_[2] }
4108             ],
4109             [#Rule 143
4110             'hash_expr', 3,
4111             sub
4112             #line 629 "unkown"
4113             { $_[2] }
4114             ]
4115             ],
4116             @_);
4117             bless($self,$class);
4118             }
4119              
4120             #line 631 "unkown"
4121              
4122              
4123              
4124             use Carp;
4125             use Class::MOP;
4126              
4127             use Data::Pipeline::Types qw(IteratorSource);
4128             use Data::Pipeline::Machine ();
4129             use MooseX::Types::Moose qw(HashRef ArrayRef CodeRef);
4130              
4131             my @reserved_words = (qw(
4132             DOES
4133             DONE
4134             FROM
4135             IN
4136             LET
4137             OUT
4138             PIPELINE
4139             TO
4140             USE
4141             ORDER
4142             S
4143             QR
4144             QW
4145             TR
4146             TRUE
4147             FALSE
4148             IMPORT
4149             STDOUT
4150             STDIN
4151             FILE
4152             USING
4153             MAPPING
4154             REDUCTION
4155             ));
4156              
4157             my %tokens = (qw(
4158             => ARROW
4159             : COLON
4160             :: COLON_COLON
4161             // SLASH_SLASH
4162             [ LB
4163             ] RB
4164             { LC
4165             } RC
4166             ~ TILDE
4167             ));
4168            
4169              
4170              
4171             my $simple_tokens =
4172             join "|",
4173             map
4174             quotemeta,
4175             reverse
4176             sort {
4177             length $a <=> length $b
4178             } keys %tokens;
4179              
4180             %tokens = (%tokens, map { ($_ => $_) } @reserved_words);
4181              
4182             my $reserved_words =
4183             join "|",
4184             reverse
4185             sort { length $a <=> length $b }
4186             @reserved_words;
4187              
4188             my $NCName = "(?:[a-zA-Z_][a-zA-Z0-9_]*\\??)";
4189              
4190             sub debugging() { 0 }
4191              
4192             my %balancing_delims = (qw-
4193             < >
4194             > <
4195             ( )
4196             ) (
4197             { }
4198             } {
4199             [ ]
4200             ] [
4201             -);
4202              
4203             sub in_freeform_until_done { $_[0] -> {in_freeform_until} = 'DONE' }
4204              
4205             sub lex {
4206             my( $p ) = @_;
4207              
4208             my $d = $p -> {USER};
4209             my $input = \$d->{Input};
4210              
4211             if( ( pos( $$input ) || 0 ) == length $$input ) {
4212             $d -> {LastToken} = undef;
4213             return ( '', undef );
4214             }
4215              
4216             my($token, $val);
4217              
4218             if( defined($d -> {LastToken}) && ($d -> {LastToken} eq 'QR' || $d -> {LastToken} eq 'QW' ) ) { # REGEX
4219             $$input =~ m{\G(.)}gc;
4220             my $delim = $1;
4221             my $bdelim = $balancing_delims{$delim} || $delim;
4222             $$input =~ m{\G((([^$delim$bdelim]*)(\\[$delim$bdelim])?)+)[$bdelim]\s*}gc;
4223             ( $token, $val ) = ( 'REGEX', $1 );
4224             }
4225             elsif( $d -> {LastToken} eq 'S' || $d -> {LastToken} eq 'TR' ) {
4226             $$input =~ m{\G(.)}gc;
4227             my @bits;
4228             my $delim = $1;
4229             my $bdelim = $balancing_delims{$delim} || $delim;
4230             if($bdelim ne $delim) { # need to balance delimiters
4231             ## for now, we just assume the delimiters have to be escaped
4232             $$input =~ m{\G((([^$delim$bdelim]*)(\\[$delim$bdelim])?)+)[$bdelim]\s*}gc;
4233             push @bits, $1;
4234             $$input =~ m{\G(.)}gc;
4235             my $delim = $1;
4236             my $bdelim = $balancing_delims{$delim} || $delim;
4237             $$input =~ m{\G((([^$delim$bdelim]*)(\\[$delim$bdelim])?)+)[$bdelim]\s*}gc;
4238             push @bits, $1;
4239             }
4240             else {
4241             $$input =~ m{\G((([^$delim$bdelim]*)(\\[$delim$bdelim])?)+)[$bdelim]((([^$delim$bdelim]*)(\\[$delim$bdelim])?)+)[$bdelim]}gc;
4242             @bits = ($1, $5);
4243             }
4244             ( $token, $val ) = ( 'REGEX', \@bits );
4245             }
4246              
4247             unless ( defined $token ) {
4248             if($p -> {in_freeform_until}) {
4249             my $pat = $p -> {in_freeform_until};
4250             my $pos = pos $$input;
4251             my $done;
4252             do {
4253             $done = 1;
4254             $pos = index $$input, $pat, $pos;
4255             $val = substr($$input, pos($$input), $pos - pos($$input));
4256             my $bit = rindex $$input, "\n", $pos;
4257             if( substr($$input, $bit+1, $pos-$bit-1) !~ /^\s*$/ ) {
4258             $done = 0;
4259             }
4260             $bit = index $$input, "\n", ($pos + length($pat));
4261             if( defined($bit) && substr($$input, $pos + length($pat), $bit - $pos - length($pat)) !~ /^\s*$/ ) {
4262             $done = 0;
4263             }
4264             } until $done;
4265            
4266             pos($$input) = $pos;
4267             $token = 'TO_DONE';
4268             $p -> {in_freeform_until} = undef;
4269             }
4270             }
4271              
4272             unless(defined $token) {
4273             while( $$input =~ m{\G\s*(?:#.*)$}gmc ) {
4274             # skip comments
4275             }
4276             if( ( pos( $$input ) || 0 ) == length $$input ) {
4277             $d -> {LastToken} = undef;
4278             return ( '', undef );
4279             }
4280             }
4281              
4282             unless(defined $token) {
4283             if( $$input =~ m{\G^__END__$}gcm ) {
4284             $d -> {LastToken} = undef;
4285             pos( $$input ) = length $$input;
4286             return ( '', undef );
4287             }
4288              
4289             $$input =~ m{\G\s*(?:
4290             ((?:$simple_tokens)|(?:(?:$reserved_words)\b))
4291             |(\\?$NCName) #QNAME
4292             |('[^']*'|"[^"]*") #LITERAL
4293             |(-?\d+\.\d+|\.\d+) #NUMBER
4294             |(\d+) #POS_INTEGER
4295             |(-\d+) #NEG_INTEGER
4296             |\$($NCName) #DOLLAR_QNAME
4297             )\s*}igcx;
4298              
4299             ( $token, $val ) =
4300             defined $1 ? ( $tokens{uc $1} => uc $1 ) :
4301             defined $2 ? (QNAME => do { my $q = $2; $q =~ s/^\\//; $q }) :
4302             defined $3 ? (LITERAL => do {
4303             my $s = substr( $3, 1, -1);
4304             $s =~ s/([\\'])/\\$1/g;
4305             $s;
4306             }) :
4307             defined $4 ? ( NUMBER => $4 ) :
4308             defined $5 ? ( POS_INTEGER => $5 ) :
4309             defined $6 ? ( NEG_INTEGER => $6 ) :
4310             defined $7 ? ( DOLLAR_QNAME => $7 ) :
4311             die "Failed to parse '$$input' at ", pos $$input, "\n";
4312             }
4313              
4314             $d -> {LastTokenType} = $token;
4315             $d -> {LastToken} = $val;
4316              
4317             # print "lexer: [$token] => [$val]\n";
4318              
4319             return( $token, $val );
4320             }
4321              
4322             sub error {
4323             my( $p ) = @_;
4324              
4325             return if $p -> {USER} -> {Input} =~ m{^\s*$};
4326             #print join(", ", caller), "\n";
4327             my $pos = pos $p -> {USER} -> {Input};
4328             my $before_error = substr($p->{USER}{Input}, 0, $pos);
4329             my $after_error = substr($p->{USER}{Input}, $pos);
4330             my $line = ($before_error =~ tr/\n/\n/) + 1;
4331             $before_error =~ s{.*\n}{}s;
4332             $after_error =~ s{\n.*$}{}s;
4333             #warn "Couldn't parse '$p->{USER}{Input}' at position ", pos $p->{USER}->{Input}, " (line $line, pos ", length($before_error), ")\n";
4334             $line++;
4335             warn "Syntax error on line $line:\n";
4336             warn "$before_error$after_error\n";
4337             warn " "x length($before_error), "^\n";
4338             }
4339              
4340             sub parse {
4341             my $self = shift;
4342             my( $e, $expr, $action_code ) = @_;
4343              
4344             $expr =~ s{^\s*}{};
4345             $expr =~ s{\s*$}{};
4346              
4347             my $p = Data::Pipeline::Parser -> new(
4348             yylex => \&lex,
4349             yyerror => \&error,
4350             yydebug => 0
4351             # | 0x01 # Token reading (useful for Lexer debugging)
4352             # | 0x02 # States information
4353             # | 0x04 # Driver actions (shifts, reduces, accept...)
4354             #| 0x08 # Parse Stack dump
4355             #| 0x10 # Error Recovery tracing
4356             ,
4357             );
4358              
4359             $p->{USER}->{Input} = $expr;
4360             $p->{USER}->{e} = $e;
4361              
4362             $p->{USER}->{e} -> {machine} = [ ];
4363             $p->{USER}->{e} -> {es} = { '' => { vars => { %{$p->{USER}->{e} -> {vars}||{} } } } };
4364              
4365             my $code;
4366             eval { $code = $p -> YYParse( ); };
4367              
4368             die $@ if $@;
4369              
4370             die map "$_\n", @{$p->{USER}->{NONONO}}
4371             if $p -> {USER} -> {NONONO};
4372              
4373             $p -> _eval_in_m('', $code) if $code;
4374              
4375             return $p;
4376             #return $code; # useful stuff is in $e
4377             }
4378              
4379             sub _e {
4380             my($p,$m) = ($_[0], $_[0]->_m_);
4381              
4382             if(!defined $p -> {USER} -> {e} -> {es} -> {$m}) {
4383             $p->{USER}->{e} -> {es}->{$m} = {
4384             filters => +{ %{ $p->{USER}->{e} -> {es}->{$p->_pm_}->{filters}||{} } },
4385             perl_classes => +{ %{ $p->{USER}->{e} -> {es}->{$p->_pm_}->{perl_classes}||{} } },
4386             vars => { },
4387             }
4388             }
4389             return $p -> {USER} ->{e} -> {es} -> {$m};
4390             }
4391              
4392             sub _m_ { ($_[0]->{USER}->{e}->{machine}||=[])->[0] || '' }
4393              
4394             sub _pm_ {
4395             my $ms = ($_[0]->{USER}->{e}->{machine}||=[]);
4396             return '' if scalar(@$ms) < 2;
4397             return $ms->[$#$ms-1];
4398             }
4399              
4400             sub _m { $_[0] -> _e->{machine} ||= Data::Pipeline::Aggregator::Machine->new() };
4401              
4402             sub compile_ext_lang {
4403             my($self, $qname, $language, $scope, $code) = @_;
4404              
4405             my $mname = $self -> _m_;
4406              
4407             if(lc($language) eq 'perl') {
4408             # print "We're doing something in Perl!\n";
4409             }
4410             else {
4411             die "'$language' unsupported for filters\n";
4412             }
4413             }
4414              
4415             sub run { my $self = shift;
4416              
4417             return unless $self -> _e -> {machine};
4418              
4419             my %opts = @_;
4420              
4421             my(@from, @to);
4422              
4423             my($from, $to) = (
4424             $self -> _e -> {from} || $self -> {e} -> {from} || $opts{from},
4425             $self -> _e -> {to} || $self -> {e} -> {to} || $opts{to}
4426             );
4427              
4428             $from = $from -> () while is_CodeRef($from);
4429             $to = $to -> () while is_CodeRef($to);
4430              
4431             if(is_HashRef($from)) {
4432             @from = %{$from};
4433             }
4434             elsif(is_ArrayRef($from)) {
4435             @from = @{$from};
4436             }
4437             else {
4438             @from = ($from);
4439             }
4440              
4441             if(is_HashRef($to)) {
4442             @to = %{$to};
4443             }
4444             elsif(is_ArrayRef($to)) {
4445             @to = @{$to};
4446             }
4447             else {
4448             @to = ($to);
4449             }
4450              
4451             #print "From: ", join(", ", @from), "\n";
4452             #print " To: ", join(", ", @to), "\n";
4453              
4454             $self -> _e
4455             -> {machine}
4456             -> from(@from)
4457             -> to(@to);
4458             }
4459              
4460             sub _perl_classes { $_[0] -> _e -> {perl_classes} ||= {} }
4461             sub _vars { $_[0] -> _e -> {vars} }
4462              
4463             sub _filters { $_[0] -> _e -> {filters} }
4464              
4465             sub _eval_in_m {
4466             my($p, $m, $code) = @_;
4467             push @{$p->{USER}->{e}->{machine}||=[]}, $m;
4468             $code->();
4469             pop @{$p->{USER}->{e}->{machine}};
4470             }
4471              
4472             sub load_actions {
4473             my($p, $type, @filters) = @_;
4474              
4475             my $class;
4476              
4477             foreach my $filter (@filters) {
4478             if($class = $p -> _load_filter($type, $filter)) {
4479             $p -> _e -> {filters} -> {$filter} = $class;
4480             }
4481             else {
4482             print STDERR "Unable to load '$filter'\n";
4483             }
4484             }
4485             }
4486              
4487             sub _load_filter($$) {
4488             my(undef, $type, $filter) = @_;
4489              
4490             my $class;
4491             for my $p ($type, $type.'X') {
4492              
4493             $class="Data::Pipeline::${p}::${filter}";
4494              
4495             return $class if eval { Class::MOP::load_class($class) };
4496             }
4497             }
4498              
4499             1;
4500              
4501             1;