3 no strict
"subs"; # XXX remove once Type-names are quoted. # say Int.isa(Any)
6 {package AssertCurrentModuleVersions
;
9 { package NoSideEffects
;
10 use Class
::Multimethods
;
18 my $class = ref $self || $self;
19 my $obj = bless {@_}, $class;
20 for (keys %{$DEFAULTS{$class}}) {
21 $obj->{$_} = $DEFAULTS{$class}{$_}->() unless $obj->{$_};
30 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
33 # Workaround autobox 2.53 api change. :(
34 if(!defined(&autobox
::universal
::type
)) {
35 eval q{package autobox::universal; sub type { autobox->type($_[0]) }};
37 {package UNDEF; sub WHAT {"Undef"}}
38 {package UNIVERSAL; sub ref {CORE::ref($_[0]) || autobox::universal::type($_[0]) } } # For IRx1_FromAST.pm.
39 {package UNIVERSAL; sub WHAT {CORE::ref($_[0]) || autobox::universal::type($_[0]) } }
46 sub can { UNIVERSAL::can($_[0],$_[1]) }
47 sub isa { UNIVERSAL::isa($_[0],$_[1]) }
48 sub does { UNIVERSAL::isa($_[0],$_[1]) }
51 # Avoid "use base" error: Base class package "Xxx" is empty. :/
52 { package Num; our $_tell_use_base_i_am_not_empty_; }
53 { package Int; our $_tell_use_base_i_am_not_empty_; }
54 { package Str; our $_tell_use_base_i_am_not_empty_; }
55 { package Array; our $_tell_use_base_i_am_not_empty_; }
56 { package Hash; our $_tell_use_base_i_am_not_empty_; }
57 { package Code; our $_tell_use_base_i_am_not_empty_; }
59 no warnings qw(redefine prototype);
64 sub re_matchp
{ ($_[0] =~ m{$_[1]}) ?
1 : 0 }
66 my @g = $_[0] =~ m{$_[1]};
70 # randomness taken from autobox::Core
72 sub chomp { CORE
::chomp($_[0]); }
73 sub chop { CORE
::chop($_[0]); }
74 sub chr { CORE
::chr($_[0]); }
75 sub crypt { CORE
::crypt($_[0], $_[1]); }
76 sub index { CORE
::index($_[0], $_[1], @_[2.. $#_]); }
77 sub lc { CORE
::lc($_[0]); }
78 sub lcfirst { CORE
::lcfirst($_[0]); }
80 sub length { CORE
::length($_[0]); }
81 sub bytes
{ use bytes
; CORE
::length($_[0]); }
82 sub chars
{ CORE
::length($_[0]); }
83 sub codes
{ my @c = unpack("U*",$_[0]); 0+@c }
84 sub graphs
{ require String
::Multibyte
; String
::Multibyte
->new("Grapheme")->length($_[0]) }
86 sub ord { CORE
::ord($_[0]); }
87 sub pack { CORE
::pack(@_); }
88 sub reverse { CORE
::reverse($_[0]); }
89 sub rindex { CORE
::rindex($_[0], $_[1], @_[2.. $#_]); }
90 sub sprintf { CORE
::sprintf($_[0], $_[1], @_[2.. $#_]); }
91 sub substr { CORE
::substr($_[0], $_[1], @_[2 .. $#_]); }
92 sub uc { CORE
::uc($_[0]); }
93 sub ucfirst { CORE
::ucfirst($_[0]); }
94 sub unpack { CORE
::unpack($_[0], @_[1..$#_]); }
95 sub quotemet
{ CORE
::quotemeta($_[0]); }
96 sub undef { $_[0] = undef }
97 sub m
{ [ $_[0] =~ m{$_[1]} ] }
98 sub nm
{ [ $_[0] !~ m{$_[1]} ] }
99 sub s
{ $_[0] =~ s{$_[1]}{$_[2]} }
100 sub split { [ split $_[1], $_[0] ] }
102 sub primitive_Num
{ no warnings
"numeric"; 0+$_[0] }
105 { package FLOAT_and_INTEGER
;
107 sub abs { CORE
::abs($_[0]) }
108 sub atan2 { CORE
::atan2($_[0], $_[1]) }
109 sub cos { CORE
::cos($_[0]) }
110 sub exp { CORE
::exp($_[0]) }
111 sub int { CORE
::int($_[0]) }
112 sub log { CORE
::log($_[0]) }
113 sub oct { CORE
::oct($_[0]) }
114 sub hex { CORE
::hex($_[0]); }
115 sub rand { CORE
::rand($_[0]) }
116 sub sin { CORE
::sin($_[0]) }
117 sub sqrt { CORE
::sqrt($_[0]) }
121 use base
"FLOAT_and_INTEGER";
125 use base
"FLOAT_and_INTEGER";
129 sub to
($$) { $_[0] < $_[1] ?
[$_[0]..$_[1]] : [CORE
::reverse $_[1]..$_[0]]}
130 sub upto
($$) { [ $_[0]..$_[1] ] }
131 sub downto
($$) { [ CORE
::reverse $_[1]..$_[0] ] }
137 sub shape
{ my $a = CORE
::shift; 0+@
$a } # ?
138 sub end
{ my $a = CORE
::shift; -1+@
$a } # ?
139 sub elems
{ my $a = CORE
::shift; CORE
::scalar @
$a }
140 sub delete { my $a = CORE
::shift; @_ ? CORE
::delete($a->[$_[0]]) : undef }
141 sub exists { my $a = CORE
::shift; @_ ? CORE
::exists($a->[$_[0]]) : undef }
142 sub pop { CORE
::pop @
{$_[0]}; }
143 sub shift { my $a = CORE
::shift; CORE
::shift(@
$a) }
144 sub push { my $a = CORE
::shift; CORE
::push(@
$a,@_); $a }
145 sub unshift { my $a = CORE
::shift; CORE
::unshift(@
$a,@_) }
148 my $offset = CORE
::shift || 0;
149 my $size = CORE
::shift || 0;
150 [CORE
::splice(@
{$a},$offset,$size,@_)]
152 sub keys { my $a = CORE
::shift; [0..(@
$a-1)] }
153 sub kv
{ my $a = CORE
::shift; my $idx = 0; [map{($idx++,$_)}@
$a] }
154 sub pairs
{ my $a = CORE
::shift; my $idx = 0; [map{Pair
->new("key"=>$idx++,"value"=>$_)}@
$a] }
155 sub values { my $a = CORE
::shift; @
$a }
159 sub clone
{ my $a = CORE
::shift; [@
$a] }
163 sub grep { my $arr = CORE
::shift; my $sub = CORE
::shift; [ CORE
::grep { $sub->($_) } @
$arr ]; }
164 sub join { my $arr = CORE
::shift; my $sep = CORE
::shift; CORE
::join $sep, @
$arr; }
165 sub map { my $arr = CORE
::shift; my $sub = CORE
::shift; [ CORE
::map { $sub->($_) } @
$arr ]; }
166 sub reverse { [ CORE
::reverse @
{$_[0]} ] }
167 sub sort { my $arr = CORE
::shift; my $sub = CORE
::shift() || sub { $a cmp $b }; [ CORE
::sort { $sub->($a, $b) } @
$arr ]; }
168 sub max
{ my $arr = CORE
::shift; my $max = $arr->[0]; foreach (@
$arr) {$max = $_ if $_ > $max }; $max; }
169 sub min
{ my $arr = CORE
::shift; my $min = $arr->[0]; foreach (@
$arr) {$min = $_ if $_ < $min }; $min; }
173 sub flatten
{ ( @
{$_[0]} ) }
174 sub flatten_recursively
{
175 map { my $ref = ref($_); ($ref && $ref eq "ARRAY") ?
$_->flatten_recursively : $_ } @
{$_[0]}
183 # randomness taken from autobox::Core
185 sub delete { my $hash = CORE
::shift; my @res = (); CORE
::foreach(@_) { push @res, CORE
::delete $hash->{$_}; } CORE
::wantarray ?
@res : \
@res }
186 sub exists { my $hash = CORE
::shift; CORE
::exists $hash->{$_[0]}; }
187 sub keys { [ CORE
::keys %{$_[0]} ] }
188 sub values { [ CORE
::values %{$_[0]} ] }
191 my $hash = CORE
::shift;
192 my $cb = CORE
::shift;
193 while((my $k, my $v) = CORE
::each(%$hash)) {
200 sub kv
{ my $h = CORE
::shift; [map{($_,$h->{$_})} CORE
::keys %$h] }
201 sub pairs
{ my $h = CORE
::shift; [map{Pair
->new("key"=>$_,"value"=>$h->{$_})} CORE
::keys %$h] }
207 # Do not simplify this to "...ift; {%$h} }". returns 0. autobox issue?
213 sub dup
{ my $h = CORE
::shift; my $h1 = {%$h}; $h1} # obsolete
222 { package Any
; sub __make_not_empty_for_use_base
{}}
223 { package STRING
; use base
"Any";}
224 { package INTEGER
; use base
"Any";}
225 { package FLOAT
; use base
"Any";}
226 { package ARRAY
; use base
"Any";}
227 { package HASH
; use base
"Any";}
228 { package CODE
; use base
"Any";}
231 # Taken from Perl6::Take 0.04.
233 sub gather
(&) {local @GATHER = (@GATHER, []); shift->(); $GATHER[-1] }
234 sub take
(@
) {push @
{ $GATHER[-1] }, @_; undef }
239 *gather
= \
&Private
::gather
;
240 *take
= \
&Private
::take
;}
242 our $a_ARGS = [map {encoding
::decode
("utf8",$_)} @ARGV];
250 open(my $fh,"<:utf8",$file);
256 open(my $fh,">:utf8",$file) or CORE
::die $!;
257 CORE
::print $fh $text;
260 sub file_exists
{-e
$_[0]}
261 sub system{CORE
::system(@_)}
264 if($env) { $env->($p5) }
266 my $code = "package Main; ".$p5;
267 my $res = eval($code); croak
($@
) if $@
;
272 sub exit{CORE
::exit(@_)}
273 sub defined{CORE
::defined($_[0])}
274 sub substr ($$$){CORE
::substr($_[0],$_[1],$_[2])}
275 sub not ($){CORE
::not $_[0]}
276 sub exec{CORE
::exec(@_)}
277 sub sleep{CORE
::sleep(@_)}
279 sub split{[CORE
::split($_[0],$_[1])]}
281 sub unlink{CORE
::unlink(@_)}
282 sub sprintf{CORE
::sprintf(shift,@_)}
283 sub print { CORE
::print @_ }
284 sub quotemeta { CORE
::quotemeta($_[0]) }
286 sub chmod_exe
{ CORE
::chmod(0755,$_[0]) } # Hack for Compiler.
289 eval("use Perl::Tidy");
294 Perl
::Tidy
::perltidy
(argv
=>[],source
=>\
$source,destination
=>\
$dest);
303 my $expr = "\$_[0] =~ s/$_[1]/$_[2]/".($_[3]||"");
305 Carp
::confess
($@
) if $@
;
309 eval "\$_[0] =~ s/$_[1]/$_[2]/g";
310 Carp
::confess
($@
) if $@
;
314 sub re_gsub
($$$) {$_[0] =~ s/$_[1]/$_[2]/g; $_[0]}
320 my $e = $ENV{ELF_STD_RED_RUN
};
324 $f."elf_g_src/STD_red/STD_red_run"
325 # $f."../STD_red/STD_red_run"
333 my $file = find_required_module
($module);
334 $file || CORE
::die "Cant locate $module in ( ".CORE
::join(" ",@
$GLOBAL::a_INC
)." ).\n";
337 sub find_required_module
{
339 my @names = ($module,$module.".pm",$module.".p6");
340 for my $dir (@
$GLOBAL::a_INC
) {
341 for my $name (@names) {
342 my $file = $dir."/".$name;
351 my($module,@args)=@_;
353 my $import = "if(defined(&".$module."::import)) { ".$module."->import(\$args); }";
354 my $result = eval $import;
355 Carp
::confess
($@
) if $@
;
374 $GLOBAL::compiler0
->eval_file($file);
378 $GLOBAL::compiler0
->eval_perl6($code,$env);
382 eval_perl6
($code,$env);
388 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
392 use base
"Any";BEGIN{push(@Bit::ISA
,'Any');}
398 use base
"Any";BEGIN{push(@Int::ISA
,'Any');}
404 use base
"Any";BEGIN{push(@Str::ISA
,'Any');}
410 use base
"Any";BEGIN{push(@Num::ISA
,'Any');}
416 use base
"Any";BEGIN{push(@Complex::ISA
,'Any');}
422 use base
"Any";BEGIN{push(@Bool::ISA
,'Any');}
428 use base
"Any";BEGIN{push(@Code::ISA
,'Any');}
434 use base
"Any";BEGIN{push(@Block::ISA
,'Code');}
440 use base
"Any";BEGIN{push(@List::ISA
,'Any');}
446 use base
"Any";BEGIN{push(@Seq::ISA
,'Any');}
452 use base
"Any";BEGIN{push(@Range::ISA
,'Any');}
458 use base
"Any";BEGIN{push(@Set::ISA
,'Any');}
464 use base
"Any";BEGIN{push(@Bag::ISA
,'Any');}
470 BEGIN{push(@Junction::ISA
,'Object');}
476 use base
"Any";BEGIN{push(@Pair::ISA
,'Any');}
482 use base
"Any";BEGIN{push(@Mapping::ISA
,'Any');}
488 use base
"Any";BEGIN{push(@Signature::ISA
,'Any');}
494 use base
"Any";BEGIN{push(@Capture::ISA
,'Any');}
500 use base
"Any";BEGIN{push(@Blob::ISA
,'Any');}
506 use base
"Any";BEGIN{push(@Scalar::ISA
,'Any');}
512 use base
"Any";BEGIN{push(@Array::ISA
,'List');}
518 use base
"Any";BEGIN{push(@Hash::ISA
,'Any');}
524 use base
"Any";BEGIN{push(@KeyHash::ISA
,'Any');}
530 use base
"Any";BEGIN{push(@KeySet::ISA
,'Any');}
536 use base
"Any";BEGIN{push(@KeyBag::ISA
,'Any');}
542 use base
"Any";BEGIN{push(@Buf::ISA
,'Any');}
548 use base
"Any";BEGIN{push(@IO::ISA
,'Any');}
554 use base
"Any";BEGIN{push(@Routine::ISA
,'Code');}
560 use base
"Any";BEGIN{push(@Sub::ISA
,'Routine');}
566 use base
"Any";BEGIN{push(@Method::ISA
,'Routine');}
572 use base
"Any";BEGIN{push(@Subethod::ISA
,'Routine');}
578 use base
"Any";BEGIN{push(@Macro::ISA
,'Routine');}
584 use base
"Any";BEGIN{push(@Regex::ISA
,'Routine');}
590 use base
"Any";BEGIN{push(@Match::ISA
,'Any');}
596 use base
"Any";BEGIN{push(@Package::ISA
,'Any');}
602 use base
"Any";BEGIN{push(@Module::ISA
,'Package');}
608 use base
"Any";BEGIN{push(@Class::ISA
,'Module');}
614 use base
"Any";BEGIN{push(@Role::ISA
,'Module');}
620 use base
"Any";BEGIN{push(@Grammar::ISA
,'Module');}
626 BEGIN{push(@Any::ISA
,'Object');}
637 use base
"Any";(do{sub key
{ if(@_==2){$_[0]{'key'}=$_[1]}else{$_[0]{'key'}}};
638 sub value
{ if(@_==2){$_[0]{'value'}=$_[1]}else{$_[0]{'value'}}}})
643 (do{sub say{my $self=CORE
::shift;(do{GLOBAL
::say($self)})}})
648 use base
"Any";(do{sub say{my(@a)=@_;
650 (do{for(($a_a)->flatten){
651 (do{GLOBAL
::print($_->Str())})
655 sub infix_xx
{my($a_a,$count)=@_;
656 (do{my $a_result = [];;
657 for((GLOBAL
::infix__46_46
(1,$count))){
658 (do{$a_result->push($a_a)})
665 use base
"Any";(do{sub Num
{my $self=CORE
::shift;(do{$self})}})
670 use base
"Any";(do{sub Num
{my $self=CORE
::shift;(do{$self})}})
675 use base
"Any";(do{sub Num
{my $self=CORE
::shift;(do{$self->primitive_Num()})}})
680 use base
"Any";(do{sub Num
{my $self=CORE
::shift;(do{$self->elems()})}})
685 use base
"Any";(do{sub Num
{my $self=CORE
::shift;(do{$self->keys()->elems()})}})
690 use base
"Any";(do{sub Num
{my $self=CORE
::shift;(do{2})}})
695 use base
"Any";(do{sub Str
{my $self=CORE
::shift;(do{("" . $self)})}})
700 use base
"Any";(do{sub Str
{my $self=CORE
::shift;(do{("" . $self)})}})
705 use base
"Any";(do{sub Str
{my $self=CORE
::shift;(do{$self})}})
710 use base
"Any";(do{sub Str
{my $self=CORE
::shift;(do{$self->join("")})}})
715 use base
"Any";(do{sub Str
{my $self=CORE
::shift;(do{$self->keys()->map(sub {my($k)=@_;
716 (do{(($k . "\ ") . $self->{'$k'})})})->join("\
722 use base
"Any";(do{sub Str
{my $self=CORE
::shift;(do{(($self->key . "\ ") . $self->value)})}})
727 (do{sub print{my $self=CORE
::shift;(do{GLOBAL
::say($self)})}})
732 (do{sub true
{my $self=CORE
::shift;(do{GLOBAL
::defined($self)})}})
737 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
741 use base
"Any";(do{sub rule
{ if(@_==2){$_[0]{'rule'}=$_[1]}else{$_[0]{'rule'}}};
742 sub match_str
{ if(@_==2){$_[0]{'match_str'}=$_[1]}else{$_[0]{'match_str'}}};
743 sub from
{ if(@_==2){$_[0]{'from'}=$_[1]}else{$_[0]{'from'}}};
744 sub to
{ if(@_==2){$_[0]{'to'}=$_[1]}else{$_[0]{'to'}}};
745 sub bool
{ if(@_==2){$_[0]{'bool'}=$_[1]}else{$_[0]{'bool'}}};
746 sub hash
{ if(@_==2){$_[0]{'hash'}=$_[1]}else{$_[0]{'hash'}}};
747 sub make_from_rsfth
{my $self=CORE
::shift;my($r,$s,$f,$t,$h)=@_;
748 (do{$self->new("rule", $r, "match_str", $s, "from", $f, "to", $t, "hash", $h)})};
749 sub match_describe
{my $self=CORE
::shift;(do{my $s = ((((((($self->rule . "\<") . $self->from) . "\,") . $self->to) . "\,\'") . $self->match_str) . "\'\,\{");
750 for(($self->hash->keys())->flatten){
752 my $v = $self->hash->{$k};
754 if(GLOBAL
::defined($v)) {
755 (do{($vs = $v->match_describe())})
758 \ \ ") . $k) . "\ \=\>\ ") . $self->indent_except_top($vs)) . "\,"))})
760 if($self->hash->keys()->elems()) {
764 ($s = ($s . "\}\>"))})};
765 sub indent
{my $self=CORE
::shift;my($s)=@_;
766 (do{$s->re_gsub(qr/(?m:^(?!\Z))/, "\ \ ")})};
767 sub indent_except_top
{my $self=CORE
::shift;my($s)=@_;
768 (do{$s->re_gsub(qr/(?m:^(?<!\A)(?!\Z))/, "\ \ ")})};
769 sub match_string
{my $self=CORE
::shift;(do{$self->match_str})};
770 sub Str
{my $self=CORE
::shift;(do{$self->match_str->substr($self->from, ($self->to - $self->from))})}})
775 use base
"Any";(do{sub match_describe
{my $self=CORE
::shift;(do{((("\[\
776 " . Match
->indent($self->map(sub {my($e)=@_;
777 (do{$e->match_describe()})})->join("\,\
784 use base
"Any";(do{sub match_describe
{my $self=CORE
::shift;(do{my $s = "\{";
785 for(($self->keys())->flatten){
789 if(GLOBAL
::defined($v)) {
790 (do{($vs = $v->match_describe())})
793 \ \ ") . $k) . "\ \=\>\ ") . Match
->indent_except_top($vs)) . "\,"))})
795 if($self->keys()->elems()) {
804 use base
"Any";(do{sub match_describe
{my $self=CORE
::shift;(do{(("\'" . $self) . "\'")})}})
809 use base
"Any";(do{sub match_describe
{my $self=CORE
::shift;(do{(("\'" . $self) . "\'")})}})
814 use base
"Any";(do{sub match_describe
{my $self=CORE
::shift;(do{(("\'" . $self) . "\'")})}})
819 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
823 use base
"Any";(do{sub irx1_describe
{my $self=CORE
::shift;(do{(("\[" . $self->map(sub {my($e)=@_;
824 (do{$e->irx1_describe()})})->join("\,")) . "\]")})}})
829 use base
"Any";(do{sub irx1_describe
{my $self=CORE
::shift;(do{($self . "")})}})
834 use base
"Any";(do{sub irx1_describe
{my $self=CORE
::shift;(do{($self . "")})}})
839 use base
"Any";(do{sub irx1_describe
{my $self=CORE
::shift;(do{($self . "")})}})
844 use base
"Any";(do{sub irx1_describe
{my $self=CORE
::shift;(do{"undef"})}})
850 { package IRx1
::Base
;
851 use base
"Any";(do{})
855 { package IRx1
::CompUnit_and_Block
;
856 use base
"Any";(do{})
860 { package IRx1
::CompUnit
;
861 use base
"Any";BEGIN{push(@IRx1::CompUnit
::ISA
,'IRx1::CompUnit_and_Block');}
866 { package IRx1
::Block
;
867 use base
"Any";BEGIN{push(@IRx1::Block
::ISA
,'IRx1::CompUnit_and_Block');}
872 { package IRx1
::CompUnit
;
873 use base
"Any";BEGIN{push(@IRx1::CompUnit
::ISA
,'IRx1::Base');}
874 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
875 sub statements
{ if(@_==2){$_[0]{'statements'}=$_[1]}else{$_[0]{'statements'}}};
876 sub filename
{ if(@_==2){$_[0]{'filename'}=$_[1]}else{$_[0]{'filename'}}};
877 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
878 sub newp
{my $self=CORE
::shift;my($match,$statements,$filename)=@_;
879 (do{$self->new("match", $match, "statements", $statements, "filename", $filename)})};
880 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
881 (do{$emitter->cb__CompUnit($self)})};
882 sub node_name
{my $self=CORE
::shift;(do{"CompUnit"})};
883 sub field_names
{my $self=CORE
::shift;(do{["statements", "filename"]})};
884 sub field_values
{my $self=CORE
::shift;(do{[$self->statements, $self->filename]})};
885 sub irx1_describe
{my $self=CORE
::shift;(do{(((("CompUnit\(" . $self->statements->irx1_describe()) . "\,") . $self->filename->irx1_describe()) . "\)")})}})
889 { package IRx1
::Block
;
890 use base
"Any";BEGIN{push(@IRx1::Block
::ISA
,'IRx1::Base');}
891 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
892 sub statements
{ if(@_==2){$_[0]{'statements'}=$_[1]}else{$_[0]{'statements'}}};
893 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
894 sub newp
{my $self=CORE
::shift;my($match,$statements)=@_;
895 (do{$self->new("match", $match, "statements", $statements)})};
896 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
897 (do{$emitter->cb__Block($self)})};
898 sub node_name
{my $self=CORE
::shift;(do{"Block"})};
899 sub field_names
{my $self=CORE
::shift;(do{["statements"]})};
900 sub field_values
{my $self=CORE
::shift;(do{[$self->statements]})};
901 sub irx1_describe
{my $self=CORE
::shift;(do{(("Block\(" . $self->statements->irx1_describe()) . "\)")})}})
906 use base
"Any";BEGIN{push(@IRx1::Use
::ISA
,'IRx1::Base');}
907 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
908 sub kind
{ if(@_==2){$_[0]{'kind'}=$_[1]}else{$_[0]{'kind'}}};
909 sub module_name
{ if(@_==2){$_[0]{'module_name'}=$_[1]}else{$_[0]{'module_name'}}};
910 sub expr
{ if(@_==2){$_[0]{'expr'}=$_[1]}else{$_[0]{'expr'}}};
911 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
912 sub newp
{my $self=CORE
::shift;my($match,$kind,$module_name,$expr)=@_;
913 (do{$self->new("match", $match, "kind", $kind, "module_name", $module_name, "expr", $expr)})};
914 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
915 (do{$emitter->cb__Use($self)})};
916 sub node_name
{my $self=CORE
::shift;(do{"Use"})};
917 sub field_names
{my $self=CORE
::shift;(do{["kind", "module_name", "expr"]})};
918 sub field_values
{my $self=CORE
::shift;(do{[$self->kind, $self->module_name, $self->expr]})};
919 sub irx1_describe
{my $self=CORE
::shift;(do{(((((("Use\(" . $self->kind->irx1_describe()) . "\,") . $self->module_name->irx1_describe()) . "\,") . $self->expr->irx1_describe()) . "\)")})}})
923 { package IRx1
::PackageDecl
;
924 use base
"Any";BEGIN{push(@IRx1::PackageDecl
::ISA
,'IRx1::Base');}
925 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
926 sub scope
{ if(@_==2){$_[0]{'scope'}=$_[1]}else{$_[0]{'scope'}}};
927 sub plurality
{ if(@_==2){$_[0]{'plurality'}=$_[1]}else{$_[0]{'plurality'}}};
928 sub kind
{ if(@_==2){$_[0]{'kind'}=$_[1]}else{$_[0]{'kind'}}};
929 sub name
{ if(@_==2){$_[0]{'name'}=$_[1]}else{$_[0]{'name'}}};
930 sub traits
{ if(@_==2){$_[0]{'traits'}=$_[1]}else{$_[0]{'traits'}}};
931 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
932 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
933 sub newp
{my $self=CORE
::shift;my($match,$scope,$plurality,$kind,$name,$traits,$block)=@_;
934 (do{$self->new("match", $match, "scope", $scope, "plurality", $plurality, "kind", $kind, "name", $name, "traits", $traits, "block", $block)})};
935 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
936 (do{$emitter->cb__PackageDecl($self)})};
937 sub node_name
{my $self=CORE
::shift;(do{"PackageDecl"})};
938 sub field_names
{my $self=CORE
::shift;(do{["scope", "plurality", "kind", "name", "traits", "block"]})};
939 sub field_values
{my $self=CORE
::shift;(do{[$self->scope, $self->plurality, $self->kind, $self->name, $self->traits, $self->block]})};
940 sub irx1_describe
{my $self=CORE
::shift;(do{(((((((((((("PackageDecl\(" . $self->scope->irx1_describe()) . "\,") . $self->plurality->irx1_describe()) . "\,") . $self->kind->irx1_describe()) . "\,") . $self->name->irx1_describe()) . "\,") . $self->traits->irx1_describe()) . "\,") . $self->block->irx1_describe()) . "\)")})}})
944 { package IRx1
::MethodDecl
;
945 use base
"Any";BEGIN{push(@IRx1::MethodDecl
::ISA
,'IRx1::Base');}
946 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
947 sub scope
{ if(@_==2){$_[0]{'scope'}=$_[1]}else{$_[0]{'scope'}}};
948 sub typenames
{ if(@_==2){$_[0]{'typenames'}=$_[1]}else{$_[0]{'typenames'}}};
949 sub plurality
{ if(@_==2){$_[0]{'plurality'}=$_[1]}else{$_[0]{'plurality'}}};
950 sub name
{ if(@_==2){$_[0]{'name'}=$_[1]}else{$_[0]{'name'}}};
951 sub multisig
{ if(@_==2){$_[0]{'multisig'}=$_[1]}else{$_[0]{'multisig'}}};
952 sub traits
{ if(@_==2){$_[0]{'traits'}=$_[1]}else{$_[0]{'traits'}}};
953 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
954 sub sigil
{ if(@_==2){$_[0]{'sigil'}=$_[1]}else{$_[0]{'sigil'}}};
955 sub postcircumfix
{ if(@_==2){$_[0]{'postcircumfix'}=$_[1]}else{$_[0]{'postcircumfix'}}};
956 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
957 sub newp
{my $self=CORE
::shift;my($match,$scope,$typenames,$plurality,$name,$multisig,$traits,$block,$sigil,$postcircumfix)=@_;
958 (do{$self->new("match", $match, "scope", $scope, "typenames", $typenames, "plurality", $plurality, "name", $name, "multisig", $multisig, "traits", $traits, "block", $block, "sigil", $sigil, "postcircumfix", $postcircumfix)})};
959 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
960 (do{$emitter->cb__MethodDecl($self)})};
961 sub node_name
{my $self=CORE
::shift;(do{"MethodDecl"})};
962 sub field_names
{my $self=CORE
::shift;(do{["scope", "typenames", "plurality", "name", "multisig", "traits", "block", "sigil", "postcircumfix"]})};
963 sub field_values
{my $self=CORE
::shift;(do{[$self->scope, $self->typenames, $self->plurality, $self->name, $self->multisig, $self->traits, $self->block, $self->sigil, $self->postcircumfix]})};
964 sub irx1_describe
{my $self=CORE
::shift;(do{(((((((((((((((((("MethodDecl\(" . $self->scope->irx1_describe()) . "\,") . $self->typenames->irx1_describe()) . "\,") . $self->plurality->irx1_describe()) . "\,") . $self->name->irx1_describe()) . "\,") . $self->multisig->irx1_describe()) . "\,") . $self->traits->irx1_describe()) . "\,") . $self->block->irx1_describe()) . "\,") . $self->sigil->irx1_describe()) . "\,") . $self->postcircumfix->irx1_describe()) . "\)")})}})
968 { package IRx1
::SubDecl
;
969 use base
"Any";BEGIN{push(@IRx1::SubDecl
::ISA
,'IRx1::Base');}
970 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
971 sub scope
{ if(@_==2){$_[0]{'scope'}=$_[1]}else{$_[0]{'scope'}}};
972 sub typenames
{ if(@_==2){$_[0]{'typenames'}=$_[1]}else{$_[0]{'typenames'}}};
973 sub plurality
{ if(@_==2){$_[0]{'plurality'}=$_[1]}else{$_[0]{'plurality'}}};
974 sub name
{ if(@_==2){$_[0]{'name'}=$_[1]}else{$_[0]{'name'}}};
975 sub multisig
{ if(@_==2){$_[0]{'multisig'}=$_[1]}else{$_[0]{'multisig'}}};
976 sub traits
{ if(@_==2){$_[0]{'traits'}=$_[1]}else{$_[0]{'traits'}}};
977 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
978 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
979 sub newp
{my $self=CORE
::shift;my($match,$scope,$typenames,$plurality,$name,$multisig,$traits,$block)=@_;
980 (do{$self->new("match", $match, "scope", $scope, "typenames", $typenames, "plurality", $plurality, "name", $name, "multisig", $multisig, "traits", $traits, "block", $block)})};
981 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
982 (do{$emitter->cb__SubDecl($self)})};
983 sub node_name
{my $self=CORE
::shift;(do{"SubDecl"})};
984 sub field_names
{my $self=CORE
::shift;(do{["scope", "typenames", "plurality", "name", "multisig", "traits", "block"]})};
985 sub field_values
{my $self=CORE
::shift;(do{[$self->scope, $self->typenames, $self->plurality, $self->name, $self->multisig, $self->traits, $self->block]})};
986 sub irx1_describe
{my $self=CORE
::shift;(do{(((((((((((((("SubDecl\(" . $self->scope->irx1_describe()) . "\,") . $self->typenames->irx1_describe()) . "\,") . $self->plurality->irx1_describe()) . "\,") . $self->name->irx1_describe()) . "\,") . $self->multisig->irx1_describe()) . "\,") . $self->traits->irx1_describe()) . "\,") . $self->block->irx1_describe()) . "\)")})}})
990 { package IRx1
::MacroDecl
;
991 use base
"Any";BEGIN{push(@IRx1::MacroDecl
::ISA
,'IRx1::Base');}
992 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
993 sub scope
{ if(@_==2){$_[0]{'scope'}=$_[1]}else{$_[0]{'scope'}}};
994 sub typenames
{ if(@_==2){$_[0]{'typenames'}=$_[1]}else{$_[0]{'typenames'}}};
995 sub plurality
{ if(@_==2){$_[0]{'plurality'}=$_[1]}else{$_[0]{'plurality'}}};
996 sub name
{ if(@_==2){$_[0]{'name'}=$_[1]}else{$_[0]{'name'}}};
997 sub multisig
{ if(@_==2){$_[0]{'multisig'}=$_[1]}else{$_[0]{'multisig'}}};
998 sub traits
{ if(@_==2){$_[0]{'traits'}=$_[1]}else{$_[0]{'traits'}}};
999 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
1000 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1001 sub newp
{my $self=CORE
::shift;my($match,$scope,$typenames,$plurality,$name,$multisig,$traits,$block)=@_;
1002 (do{$self->new("match", $match, "scope", $scope, "typenames", $typenames, "plurality", $plurality, "name", $name, "multisig", $multisig, "traits", $traits, "block", $block)})};
1003 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1004 (do{$emitter->cb__MacroDecl($self)})};
1005 sub node_name
{my $self=CORE
::shift;(do{"MacroDecl"})};
1006 sub field_names
{my $self=CORE
::shift;(do{["scope", "typenames", "plurality", "name", "multisig", "traits", "block"]})};
1007 sub field_values
{my $self=CORE
::shift;(do{[$self->scope, $self->typenames, $self->plurality, $self->name, $self->multisig, $self->traits, $self->block]})};
1008 sub irx1_describe
{my $self=CORE
::shift;(do{(((((((((((((("MacroDecl\(" . $self->scope->irx1_describe()) . "\,") . $self->typenames->irx1_describe()) . "\,") . $self->plurality->irx1_describe()) . "\,") . $self->name->irx1_describe()) . "\,") . $self->multisig->irx1_describe()) . "\,") . $self->traits->irx1_describe()) . "\,") . $self->block->irx1_describe()) . "\)")})}})
1012 { package IRx1
::VarDecl
;
1013 use base
"Any";BEGIN{push(@IRx1::VarDecl
::ISA
,'IRx1::Base');}
1014 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1015 sub scope
{ if(@_==2){$_[0]{'scope'}=$_[1]}else{$_[0]{'scope'}}};
1016 sub typenames
{ if(@_==2){$_[0]{'typenames'}=$_[1]}else{$_[0]{'typenames'}}};
1017 sub plurality
{ if(@_==2){$_[0]{'plurality'}=$_[1]}else{$_[0]{'plurality'}}};
1018 sub var
{ if(@_==2){$_[0]{'var'}=$_[1]}else{$_[0]{'var'}}};
1019 sub postcircumfix
{ if(@_==2){$_[0]{'postcircumfix'}=$_[1]}else{$_[0]{'postcircumfix'}}};
1020 sub traits
{ if(@_==2){$_[0]{'traits'}=$_[1]}else{$_[0]{'traits'}}};
1021 sub default_op
{ if(@_==2){$_[0]{'default_op'}=$_[1]}else{$_[0]{'default_op'}}};
1022 sub default_expr
{ if(@_==2){$_[0]{'default_expr'}=$_[1]}else{$_[0]{'default_expr'}}};
1023 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1024 sub newp
{my $self=CORE
::shift;my($match,$scope,$typenames,$plurality,$var,$postcircumfix,$traits,$default_op,$default_expr)=@_;
1025 (do{$self->new("match", $match, "scope", $scope, "typenames", $typenames, "plurality", $plurality, "var", $var, "postcircumfix", $postcircumfix, "traits", $traits, "default_op", $default_op, "default_expr", $default_expr)})};
1026 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1027 (do{$emitter->cb__VarDecl($self)})};
1028 sub node_name
{my $self=CORE
::shift;(do{"VarDecl"})};
1029 sub field_names
{my $self=CORE
::shift;(do{["scope", "typenames", "plurality", "var", "postcircumfix", "traits", "default_op", "default_expr"]})};
1030 sub field_values
{my $self=CORE
::shift;(do{[$self->scope, $self->typenames, $self->plurality, $self->var, $self->postcircumfix, $self->traits, $self->default_op, $self->default_expr]})};
1031 sub irx1_describe
{my $self=CORE
::shift;(do{(((((((((((((((("VarDecl\(" . $self->scope->irx1_describe()) . "\,") . $self->typenames->irx1_describe()) . "\,") . $self->plurality->irx1_describe()) . "\,") . $self->var->irx1_describe()) . "\,") . $self->postcircumfix->irx1_describe()) . "\,") . $self->traits->irx1_describe()) . "\,") . $self->default_op->irx1_describe()) . "\,") . $self->default_expr->irx1_describe()) . "\)")})}})
1035 { package IRx1
::Var
;
1036 use base
"Any";BEGIN{push(@IRx1::Var
::ISA
,'IRx1::Base');}
1037 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1038 sub sigil
{ if(@_==2){$_[0]{'sigil'}=$_[1]}else{$_[0]{'sigil'}}};
1039 sub twigil
{ if(@_==2){$_[0]{'twigil'}=$_[1]}else{$_[0]{'twigil'}}};
1040 sub name
{ if(@_==2){$_[0]{'name'}=$_[1]}else{$_[0]{'name'}}};
1041 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1042 sub newp
{my $self=CORE
::shift;my($match,$sigil,$twigil,$name)=@_;
1043 (do{$self->new("match", $match, "sigil", $sigil, "twigil", $twigil, "name", $name)})};
1044 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1045 (do{$emitter->cb__Var($self)})};
1046 sub node_name
{my $self=CORE
::shift;(do{"Var"})};
1047 sub field_names
{my $self=CORE
::shift;(do{["sigil", "twigil", "name"]})};
1048 sub field_values
{my $self=CORE
::shift;(do{[$self->sigil, $self->twigil, $self->name]})};
1049 sub irx1_describe
{my $self=CORE
::shift;(do{(((((("Var\(" . $self->sigil->irx1_describe()) . "\,") . $self->twigil->irx1_describe()) . "\,") . $self->name->irx1_describe()) . "\)")})}})
1053 { package IRx1
::Trait
;
1054 use base
"Any";BEGIN{push(@IRx1::Trait
::ISA
,'IRx1::Base');}
1055 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1056 sub verb
{ if(@_==2){$_[0]{'verb'}=$_[1]}else{$_[0]{'verb'}}};
1057 sub expr
{ if(@_==2){$_[0]{'expr'}=$_[1]}else{$_[0]{'expr'}}};
1058 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1059 sub newp
{my $self=CORE
::shift;my($match,$verb,$expr)=@_;
1060 (do{$self->new("match", $match, "verb", $verb, "expr", $expr)})};
1061 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1062 (do{$emitter->cb__Trait($self)})};
1063 sub node_name
{my $self=CORE
::shift;(do{"Trait"})};
1064 sub field_names
{my $self=CORE
::shift;(do{["verb", "expr"]})};
1065 sub field_values
{my $self=CORE
::shift;(do{[$self->verb, $self->expr]})};
1066 sub irx1_describe
{my $self=CORE
::shift;(do{(((("Trait\(" . $self->verb->irx1_describe()) . "\,") . $self->expr->irx1_describe()) . "\)")})}})
1070 { package IRx1
::ClosureTrait
;
1071 use base
"Any";BEGIN{push(@IRx1::ClosureTrait
::ISA
,'IRx1::Base');}
1072 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1073 sub kind
{ if(@_==2){$_[0]{'kind'}=$_[1]}else{$_[0]{'kind'}}};
1074 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
1075 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1076 sub newp
{my $self=CORE
::shift;my($match,$kind,$block)=@_;
1077 (do{$self->new("match", $match, "kind", $kind, "block", $block)})};
1078 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1079 (do{$emitter->cb__ClosureTrait($self)})};
1080 sub node_name
{my $self=CORE
::shift;(do{"ClosureTrait"})};
1081 sub field_names
{my $self=CORE
::shift;(do{["kind", "block"]})};
1082 sub field_values
{my $self=CORE
::shift;(do{[$self->kind, $self->block]})};
1083 sub irx1_describe
{my $self=CORE
::shift;(do{(((("ClosureTrait\(" . $self->kind->irx1_describe()) . "\,") . $self->block->irx1_describe()) . "\)")})}})
1087 { package IRx1
::ModuleName
;
1088 use base
"Any";BEGIN{push(@IRx1::ModuleName
::ISA
,'IRx1::Base');}
1089 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1090 sub name
{ if(@_==2){$_[0]{'name'}=$_[1]}else{$_[0]{'name'}}};
1091 sub pairs
{ if(@_==2){$_[0]{'pairs'}=$_[1]}else{$_[0]{'pairs'}}};
1092 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1093 sub newp
{my $self=CORE
::shift;my($match,$name,$pairs)=@_;
1094 (do{$self->new("match", $match, "name", $name, "pairs", $pairs)})};
1095 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1096 (do{$emitter->cb__ModuleName($self)})};
1097 sub node_name
{my $self=CORE
::shift;(do{"ModuleName"})};
1098 sub field_names
{my $self=CORE
::shift;(do{["name", "pairs"]})};
1099 sub field_values
{my $self=CORE
::shift;(do{[$self->name, $self->pairs]})};
1100 sub irx1_describe
{my $self=CORE
::shift;(do{(((("ModuleName\(" . $self->name->irx1_describe()) . "\,") . $self->pairs->irx1_describe()) . "\)")})}})
1104 { package IRx1
::PathName
;
1105 use base
"Any";BEGIN{push(@IRx1::PathName
::ISA
,'IRx1::Base');}
1106 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1107 sub path
{ if(@_==2){$_[0]{'path'}=$_[1]}else{$_[0]{'path'}}};
1108 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1109 sub newp
{my $self=CORE
::shift;my($match,$path)=@_;
1110 (do{$self->new("match", $match, "path", $path)})};
1111 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1112 (do{$emitter->cb__PathName($self)})};
1113 sub node_name
{my $self=CORE
::shift;(do{"PathName"})};
1114 sub field_names
{my $self=CORE
::shift;(do{["path"]})};
1115 sub field_values
{my $self=CORE
::shift;(do{[$self->path]})};
1116 sub irx1_describe
{my $self=CORE
::shift;(do{(("PathName\(" . $self->path->irx1_describe()) . "\)")})}})
1120 { package IRx1
::SubName
;
1121 use base
"Any";BEGIN{push(@IRx1::SubName
::ISA
,'IRx1::Base');}
1122 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1123 sub category
{ if(@_==2){$_[0]{'category'}=$_[1]}else{$_[0]{'category'}}};
1124 sub pairs
{ if(@_==2){$_[0]{'pairs'}=$_[1]}else{$_[0]{'pairs'}}};
1125 sub desigilname
{ if(@_==2){$_[0]{'desigilname'}=$_[1]}else{$_[0]{'desigilname'}}};
1126 sub signature
{ if(@_==2){$_[0]{'signature'}=$_[1]}else{$_[0]{'signature'}}};
1127 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1128 sub newp
{my $self=CORE
::shift;my($match,$category,$pairs,$desigilname,$signature)=@_;
1129 (do{$self->new("match", $match, "category", $category, "pairs", $pairs, "desigilname", $desigilname, "signature", $signature)})};
1130 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1131 (do{$emitter->cb__SubName($self)})};
1132 sub node_name
{my $self=CORE
::shift;(do{"SubName"})};
1133 sub field_names
{my $self=CORE
::shift;(do{["category", "pairs", "desigilname", "signature"]})};
1134 sub field_values
{my $self=CORE
::shift;(do{[$self->category, $self->pairs, $self->desigilname, $self->signature]})};
1135 sub irx1_describe
{my $self=CORE
::shift;(do{(((((((("SubName\(" . $self->category->irx1_describe()) . "\,") . $self->pairs->irx1_describe()) . "\,") . $self->desigilname->irx1_describe()) . "\,") . $self->signature->irx1_describe()) . "\)")})}})
1139 { package IRx1
::ShapedParamName
;
1140 use base
"Any";BEGIN{push(@IRx1::ShapedParamName
::ISA
,'IRx1::Base');}
1141 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1142 sub ident
{ if(@_==2){$_[0]{'ident'}=$_[1]}else{$_[0]{'ident'}}};
1143 sub postcircumfix
{ if(@_==2){$_[0]{'postcircumfix'}=$_[1]}else{$_[0]{'postcircumfix'}}};
1144 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1145 sub newp
{my $self=CORE
::shift;my($match,$ident,$postcircumfix)=@_;
1146 (do{$self->new("match", $match, "ident", $ident, "postcircumfix", $postcircumfix)})};
1147 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1148 (do{$emitter->cb__ShapedParamName($self)})};
1149 sub node_name
{my $self=CORE
::shift;(do{"ShapedParamName"})};
1150 sub field_names
{my $self=CORE
::shift;(do{["ident", "postcircumfix"]})};
1151 sub field_values
{my $self=CORE
::shift;(do{[$self->ident, $self->postcircumfix]})};
1152 sub irx1_describe
{my $self=CORE
::shift;(do{(((("ShapedParamName\(" . $self->ident->irx1_describe()) . "\,") . $self->postcircumfix->irx1_describe()) . "\)")})}})
1156 { package IRx1
::Call
;
1157 use base
"Any";BEGIN{push(@IRx1::Call
::ISA
,'IRx1::Base');}
1158 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1159 sub invocant
{ if(@_==2){$_[0]{'invocant'}=$_[1]}else{$_[0]{'invocant'}}};
1160 sub method
{ if(@_==2){$_[0]{'method'}=$_[1]}else{$_[0]{'method'}}};
1161 sub capture
{ if(@_==2){$_[0]{'capture'}=$_[1]}else{$_[0]{'capture'}}};
1162 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1163 sub newp
{my $self=CORE
::shift;my($match,$invocant,$method,$capture)=@_;
1164 (do{$self->new("match", $match, "invocant", $invocant, "method", $method, "capture", $capture)})};
1165 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1166 (do{$emitter->cb__Call($self)})};
1167 sub node_name
{my $self=CORE
::shift;(do{"Call"})};
1168 sub field_names
{my $self=CORE
::shift;(do{["invocant", "method", "capture"]})};
1169 sub field_values
{my $self=CORE
::shift;(do{[$self->invocant, $self->method, $self->capture]})};
1170 sub irx1_describe
{my $self=CORE
::shift;(do{(((((("Call\(" . $self->invocant->irx1_describe()) . "\,") . $self->method->irx1_describe()) . "\,") . $self->capture->irx1_describe()) . "\)")})}})
1174 { package IRx1
::Apply
;
1175 use base
"Any";BEGIN{push(@IRx1::Apply
::ISA
,'IRx1::Base');}
1176 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1177 sub function
{ if(@_==2){$_[0]{'function'}=$_[1]}else{$_[0]{'function'}}};
1178 sub capture
{ if(@_==2){$_[0]{'capture'}=$_[1]}else{$_[0]{'capture'}}};
1179 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1180 sub newp
{my $self=CORE
::shift;my($match,$function,$capture)=@_;
1181 (do{$self->new("match", $match, "function", $function, "capture", $capture)})};
1182 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1183 (do{$emitter->cb__Apply($self)})};
1184 sub node_name
{my $self=CORE
::shift;(do{"Apply"})};
1185 sub field_names
{my $self=CORE
::shift;(do{["function", "capture"]})};
1186 sub field_values
{my $self=CORE
::shift;(do{[$self->function, $self->capture]})};
1187 sub irx1_describe
{my $self=CORE
::shift;(do{(((("Apply\(" . $self->function->irx1_describe()) . "\,") . $self->capture->irx1_describe()) . "\)")})}})
1191 { package IRx1
::Hyper
;
1192 use base
"Any";BEGIN{push(@IRx1::Hyper
::ISA
,'IRx1::Base');}
1193 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1194 sub operator
{ if(@_==2){$_[0]{'operator'}=$_[1]}else{$_[0]{'operator'}}};
1195 sub capture
{ if(@_==2){$_[0]{'capture'}=$_[1]}else{$_[0]{'capture'}}};
1196 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1197 sub newp
{my $self=CORE
::shift;my($match,$operator,$capture)=@_;
1198 (do{$self->new("match", $match, "operator", $operator, "capture", $capture)})};
1199 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1200 (do{$emitter->cb__Hyper($self)})};
1201 sub node_name
{my $self=CORE
::shift;(do{"Hyper"})};
1202 sub field_names
{my $self=CORE
::shift;(do{["operator", "capture"]})};
1203 sub field_values
{my $self=CORE
::shift;(do{[$self->operator, $self->capture]})};
1204 sub irx1_describe
{my $self=CORE
::shift;(do{(((("Hyper\(" . $self->operator->irx1_describe()) . "\,") . $self->capture->irx1_describe()) . "\)")})}})
1208 { package IRx1
::Capture
;
1209 use base
"Any";BEGIN{push(@IRx1::Capture
::ISA
,'IRx1::Base');}
1210 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1211 sub arguments
{ if(@_==2){$_[0]{'arguments'}=$_[1]}else{$_[0]{'arguments'}}};
1212 sub invocant
{ if(@_==2){$_[0]{'invocant'}=$_[1]}else{$_[0]{'invocant'}}};
1213 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1214 sub newp
{my $self=CORE
::shift;my($match,$arguments,$invocant)=@_;
1215 (do{$self->new("match", $match, "arguments", $arguments, "invocant", $invocant)})};
1216 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1217 (do{$emitter->cb__Capture($self)})};
1218 sub node_name
{my $self=CORE
::shift;(do{"Capture"})};
1219 sub field_names
{my $self=CORE
::shift;(do{["arguments", "invocant"]})};
1220 sub field_values
{my $self=CORE
::shift;(do{[$self->arguments, $self->invocant]})};
1221 sub irx1_describe
{my $self=CORE
::shift;(do{(((("Capture\(" . $self->arguments->irx1_describe()) . "\,") . $self->invocant->irx1_describe()) . "\)")})}})
1225 { package IRx1
::MultiSig
;
1226 use base
"Any";BEGIN{push(@IRx1::MultiSig
::ISA
,'IRx1::Base');}
1227 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1228 sub signatures
{ if(@_==2){$_[0]{'signatures'}=$_[1]}else{$_[0]{'signatures'}}};
1229 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1230 sub newp
{my $self=CORE
::shift;my($match,$signatures)=@_;
1231 (do{$self->new("match", $match, "signatures", $signatures)})};
1232 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1233 (do{$emitter->cb__MultiSig($self)})};
1234 sub node_name
{my $self=CORE
::shift;(do{"MultiSig"})};
1235 sub field_names
{my $self=CORE
::shift;(do{["signatures"]})};
1236 sub field_values
{my $self=CORE
::shift;(do{[$self->signatures]})};
1237 sub irx1_describe
{my $self=CORE
::shift;(do{(("MultiSig\(" . $self->signatures->irx1_describe()) . "\)")})}})
1241 { package IRx1
::Signature
;
1242 use base
"Any";BEGIN{push(@IRx1::Signature
::ISA
,'IRx1::Base');}
1243 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1244 sub parameters
{ if(@_==2){$_[0]{'parameters'}=$_[1]}else{$_[0]{'parameters'}}};
1245 sub return_type
{ if(@_==2){$_[0]{'return_type'}=$_[1]}else{$_[0]{'return_type'}}};
1246 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1247 sub newp
{my $self=CORE
::shift;my($match,$parameters,$return_type)=@_;
1248 (do{$self->new("match", $match, "parameters", $parameters, "return_type", $return_type)})};
1249 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1250 (do{$emitter->cb__Signature($self)})};
1251 sub node_name
{my $self=CORE
::shift;(do{"Signature"})};
1252 sub field_names
{my $self=CORE
::shift;(do{["parameters", "return_type"]})};
1253 sub field_values
{my $self=CORE
::shift;(do{[$self->parameters, $self->return_type]})};
1254 sub irx1_describe
{my $self=CORE
::shift;(do{(((("Signature\(" . $self->parameters->irx1_describe()) . "\,") . $self->return_type->irx1_describe()) . "\)")})}})
1258 { package IRx1
::Parameter
;
1259 use base
"Any";BEGIN{push(@IRx1::Parameter
::ISA
,'IRx1::Base');}
1260 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1261 sub type_constraints
{ if(@_==2){$_[0]{'type_constraints'}=$_[1]}else{$_[0]{'type_constraints'}}};
1262 sub quant
{ if(@_==2){$_[0]{'quant'}=$_[1]}else{$_[0]{'quant'}}};
1263 sub param_var
{ if(@_==2){$_[0]{'param_var'}=$_[1]}else{$_[0]{'param_var'}}};
1264 sub ident
{ if(@_==2){$_[0]{'ident'}=$_[1]}else{$_[0]{'ident'}}};
1265 sub traits
{ if(@_==2){$_[0]{'traits'}=$_[1]}else{$_[0]{'traits'}}};
1266 sub post_constraints
{ if(@_==2){$_[0]{'post_constraints'}=$_[1]}else{$_[0]{'post_constraints'}}};
1267 sub default_expr
{ if(@_==2){$_[0]{'default_expr'}=$_[1]}else{$_[0]{'default_expr'}}};
1268 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1269 sub newp
{my $self=CORE
::shift;my($match,$type_constraints,$quant,$param_var,$ident,$traits,$post_constraints,$default_expr)=@_;
1270 (do{$self->new("match", $match, "type_constraints", $type_constraints, "quant", $quant, "param_var", $param_var, "ident", $ident, "traits", $traits, "post_constraints", $post_constraints, "default_expr", $default_expr)})};
1271 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1272 (do{$emitter->cb__Parameter($self)})};
1273 sub node_name
{my $self=CORE
::shift;(do{"Parameter"})};
1274 sub field_names
{my $self=CORE
::shift;(do{["type_constraints", "quant", "param_var", "ident", "traits", "post_constraints", "default_expr"]})};
1275 sub field_values
{my $self=CORE
::shift;(do{[$self->type_constraints, $self->quant, $self->param_var, $self->ident, $self->traits, $self->post_constraints, $self->default_expr]})};
1276 sub irx1_describe
{my $self=CORE
::shift;(do{(((((((((((((("Parameter\(" . $self->type_constraints->irx1_describe()) . "\,") . $self->quant->irx1_describe()) . "\,") . $self->param_var->irx1_describe()) . "\,") . $self->ident->irx1_describe()) . "\,") . $self->traits->irx1_describe()) . "\,") . $self->post_constraints->irx1_describe()) . "\,") . $self->default_expr->irx1_describe()) . "\)")})}})
1280 { package IRx1
::TypeConstraint
;
1281 use base
"Any";BEGIN{push(@IRx1::TypeConstraint
::ISA
,'IRx1::Base');}
1282 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1283 sub value
{ if(@_==2){$_[0]{'value'}=$_[1]}else{$_[0]{'value'}}};
1284 sub where_expr
{ if(@_==2){$_[0]{'where_expr'}=$_[1]}else{$_[0]{'where_expr'}}};
1285 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1286 sub newp
{my $self=CORE
::shift;my($match,$value,$where_expr)=@_;
1287 (do{$self->new("match", $match, "value", $value, "where_expr", $where_expr)})};
1288 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1289 (do{$emitter->cb__TypeConstraint($self)})};
1290 sub node_name
{my $self=CORE
::shift;(do{"TypeConstraint"})};
1291 sub field_names
{my $self=CORE
::shift;(do{["value", "where_expr"]})};
1292 sub field_values
{my $self=CORE
::shift;(do{[$self->value, $self->where_expr]})};
1293 sub irx1_describe
{my $self=CORE
::shift;(do{(((("TypeConstraint\(" . $self->value->irx1_describe()) . "\,") . $self->where_expr->irx1_describe()) . "\)")})}})
1297 { package IRx1
::PostConstraint
;
1298 use base
"Any";BEGIN{push(@IRx1::PostConstraint
::ISA
,'IRx1::Base');}
1299 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1300 sub multisig
{ if(@_==2){$_[0]{'multisig'}=$_[1]}else{$_[0]{'multisig'}}};
1301 sub where_expr
{ if(@_==2){$_[0]{'where_expr'}=$_[1]}else{$_[0]{'where_expr'}}};
1302 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1303 sub newp
{my $self=CORE
::shift;my($match,$multisig,$where_expr)=@_;
1304 (do{$self->new("match", $match, "multisig", $multisig, "where_expr", $where_expr)})};
1305 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1306 (do{$emitter->cb__PostConstraint($self)})};
1307 sub node_name
{my $self=CORE
::shift;(do{"PostConstraint"})};
1308 sub field_names
{my $self=CORE
::shift;(do{["multisig", "where_expr"]})};
1309 sub field_values
{my $self=CORE
::shift;(do{[$self->multisig, $self->where_expr]})};
1310 sub irx1_describe
{my $self=CORE
::shift;(do{(((("PostConstraint\(" . $self->multisig->irx1_describe()) . "\,") . $self->where_expr->irx1_describe()) . "\)")})}})
1314 { package IRx1
::ParamVar
;
1315 use base
"Any";BEGIN{push(@IRx1::ParamVar
::ISA
,'IRx1::Base');}
1316 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1317 sub sigil
{ if(@_==2){$_[0]{'sigil'}=$_[1]}else{$_[0]{'sigil'}}};
1318 sub twigil
{ if(@_==2){$_[0]{'twigil'}=$_[1]}else{$_[0]{'twigil'}}};
1319 sub name
{ if(@_==2){$_[0]{'name'}=$_[1]}else{$_[0]{'name'}}};
1320 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1321 sub newp
{my $self=CORE
::shift;my($match,$sigil,$twigil,$name)=@_;
1322 (do{$self->new("match", $match, "sigil", $sigil, "twigil", $twigil, "name", $name)})};
1323 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1324 (do{$emitter->cb__ParamVar($self)})};
1325 sub node_name
{my $self=CORE
::shift;(do{"ParamVar"})};
1326 sub field_names
{my $self=CORE
::shift;(do{["sigil", "twigil", "name"]})};
1327 sub field_values
{my $self=CORE
::shift;(do{[$self->sigil, $self->twigil, $self->name]})};
1328 sub irx1_describe
{my $self=CORE
::shift;(do{(((((("ParamVar\(" . $self->sigil->irx1_describe()) . "\,") . $self->twigil->irx1_describe()) . "\,") . $self->name->irx1_describe()) . "\)")})}})
1332 { package IRx1
::Undef
;
1333 use base
"Any";BEGIN{push(@IRx1::Undef
::ISA
,'IRx1::Base');}
1334 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1335 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1336 sub newp
{my $self=CORE
::shift;my($match)=@_;
1337 (do{$self->new("match", $match)})};
1338 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1339 (do{$emitter->cb__Undef($self)})};
1340 sub node_name
{my $self=CORE
::shift;(do{"Undef"})};
1341 sub field_names
{my $self=CORE
::shift;(do{[]})};
1342 sub field_values
{my $self=CORE
::shift;(do{[]})};
1343 sub irx1_describe
{my $self=CORE
::shift;(do{("Undef\(" . "\)")})}})
1347 { package IRx1
::NumInt
;
1348 use base
"Any";BEGIN{push(@IRx1::NumInt
::ISA
,'IRx1::Base');}
1349 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1350 sub text
{ if(@_==2){$_[0]{'text'}=$_[1]}else{$_[0]{'text'}}};
1351 sub base
{ if(@_==2){$_[0]{'base'}=$_[1]}else{$_[0]{'base'}}};
1352 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1353 sub newp
{my $self=CORE
::shift;my($match,$text,$base)=@_;
1354 (do{$self->new("match", $match, "text", $text, "base", $base)})};
1355 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1356 (do{$emitter->cb__NumInt($self)})};
1357 sub node_name
{my $self=CORE
::shift;(do{"NumInt"})};
1358 sub field_names
{my $self=CORE
::shift;(do{["text", "base"]})};
1359 sub field_values
{my $self=CORE
::shift;(do{[$self->text, $self->base]})};
1360 sub irx1_describe
{my $self=CORE
::shift;(do{(((("NumInt\(" . $self->text->irx1_describe()) . "\,") . $self->base->irx1_describe()) . "\)")})}})
1364 { package IRx1
::NumDec
;
1365 use base
"Any";BEGIN{push(@IRx1::NumDec
::ISA
,'IRx1::Base');}
1366 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1367 sub intpart
{ if(@_==2){$_[0]{'intpart'}=$_[1]}else{$_[0]{'intpart'}}};
1368 sub fracpart
{ if(@_==2){$_[0]{'fracpart'}=$_[1]}else{$_[0]{'fracpart'}}};
1369 sub exp { if(@_==2){$_[0]{'exp'}=$_[1]}else{$_[0]{'exp'}}};
1370 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1371 sub newp
{my $self=CORE
::shift;my($match,$intpart,$fracpart,$exp)=@_;
1372 (do{$self->new("match", $match, "intpart", $intpart, "fracpart", $fracpart, "exp", $exp)})};
1373 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1374 (do{$emitter->cb__NumDec($self)})};
1375 sub node_name
{my $self=CORE
::shift;(do{"NumDec"})};
1376 sub field_names
{my $self=CORE
::shift;(do{["intpart", "fracpart", "exp"]})};
1377 sub field_values
{my $self=CORE
::shift;(do{[$self->intpart, $self->fracpart, $self->exp]})};
1378 sub irx1_describe
{my $self=CORE
::shift;(do{(((((("NumDec\(" . $self->intpart->irx1_describe()) . "\,") . $self->fracpart->irx1_describe()) . "\,") . $self->exp->irx1_describe()) . "\)")})}})
1382 { package IRx1
::NumRad
;
1383 use base
"Any";BEGIN{push(@IRx1::NumRad
::ISA
,'IRx1::Base');}
1384 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1385 sub radix
{ if(@_==2){$_[0]{'radix'}=$_[1]}else{$_[0]{'radix'}}};
1386 sub intpart
{ if(@_==2){$_[0]{'intpart'}=$_[1]}else{$_[0]{'intpart'}}};
1387 sub fracpart
{ if(@_==2){$_[0]{'fracpart'}=$_[1]}else{$_[0]{'fracpart'}}};
1388 sub base
{ if(@_==2){$_[0]{'base'}=$_[1]}else{$_[0]{'base'}}};
1389 sub exp { if(@_==2){$_[0]{'exp'}=$_[1]}else{$_[0]{'exp'}}};
1390 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1391 sub newp
{my $self=CORE
::shift;my($match,$radix,$intpart,$fracpart,$base,$exp)=@_;
1392 (do{$self->new("match", $match, "radix", $radix, "intpart", $intpart, "fracpart", $fracpart, "base", $base, "exp", $exp)})};
1393 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1394 (do{$emitter->cb__NumRad($self)})};
1395 sub node_name
{my $self=CORE
::shift;(do{"NumRad"})};
1396 sub field_names
{my $self=CORE
::shift;(do{["radix", "intpart", "fracpart", "base", "exp"]})};
1397 sub field_values
{my $self=CORE
::shift;(do{[$self->radix, $self->intpart, $self->fracpart, $self->base, $self->exp]})};
1398 sub irx1_describe
{my $self=CORE
::shift;(do{(((((((((("NumRad\(" . $self->radix->irx1_describe()) . "\,") . $self->intpart->irx1_describe()) . "\,") . $self->fracpart->irx1_describe()) . "\,") . $self->base->irx1_describe()) . "\,") . $self->exp->irx1_describe()) . "\)")})}})
1402 { package IRx1
::Array
;
1403 use base
"Any";BEGIN{push(@IRx1::Array
::ISA
,'IRx1::Base');}
1404 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1405 sub array
{ if(@_==2){$_[0]{'array'}=$_[1]}else{$_[0]{'array'}}};
1406 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1407 sub newp
{my $self=CORE
::shift;my($match,$array)=@_;
1408 (do{$self->new("match", $match, "array", $array)})};
1409 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1410 (do{$emitter->cb__Array($self)})};
1411 sub node_name
{my $self=CORE
::shift;(do{"Array"})};
1412 sub field_names
{my $self=CORE
::shift;(do{["array"]})};
1413 sub field_values
{my $self=CORE
::shift;(do{[$self->array]})};
1414 sub irx1_describe
{my $self=CORE
::shift;(do{(("Array\(" . $self->array->irx1_describe()) . "\)")})}})
1418 { package IRx1
::Hash
;
1419 use base
"Any";BEGIN{push(@IRx1::Hash
::ISA
,'IRx1::Base');}
1420 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1421 sub hash
{ if(@_==2){$_[0]{'hash'}=$_[1]}else{$_[0]{'hash'}}};
1422 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1423 sub newp
{my $self=CORE
::shift;my($match,$hash)=@_;
1424 (do{$self->new("match", $match, "hash", $hash)})};
1425 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1426 (do{$emitter->cb__Hash($self)})};
1427 sub node_name
{my $self=CORE
::shift;(do{"Hash"})};
1428 sub field_names
{my $self=CORE
::shift;(do{["hash"]})};
1429 sub field_values
{my $self=CORE
::shift;(do{[$self->hash]})};
1430 sub irx1_describe
{my $self=CORE
::shift;(do{(("Hash\(" . $self->hash->irx1_describe()) . "\)")})}})
1434 { package IRx1
::Pair
;
1435 use base
"Any";BEGIN{push(@IRx1::Pair
::ISA
,'IRx1::Base');}
1436 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1437 sub key
{ if(@_==2){$_[0]{'key'}=$_[1]}else{$_[0]{'key'}}};
1438 sub value
{ if(@_==2){$_[0]{'value'}=$_[1]}else{$_[0]{'value'}}};
1439 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1440 sub newp
{my $self=CORE
::shift;my($match,$key,$value)=@_;
1441 (do{$self->new("match", $match, "key", $key, "value", $value)})};
1442 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1443 (do{$emitter->cb__Pair($self)})};
1444 sub node_name
{my $self=CORE
::shift;(do{"Pair"})};
1445 sub field_names
{my $self=CORE
::shift;(do{["key", "value"]})};
1446 sub field_values
{my $self=CORE
::shift;(do{[$self->key, $self->value]})};
1447 sub irx1_describe
{my $self=CORE
::shift;(do{(((("Pair\(" . $self->key->irx1_describe()) . "\,") . $self->value->irx1_describe()) . "\)")})}})
1451 { package IRx1
::Type
;
1452 use base
"Any";BEGIN{push(@IRx1::Type
::ISA
,'IRx1::Base');}
1453 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1454 sub typename
{ if(@_==2){$_[0]{'typename'}=$_[1]}else{$_[0]{'typename'}}};
1455 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1456 sub newp
{my $self=CORE
::shift;my($match,$typename)=@_;
1457 (do{$self->new("match", $match, "typename", $typename)})};
1458 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1459 (do{$emitter->cb__Type($self)})};
1460 sub node_name
{my $self=CORE
::shift;(do{"Type"})};
1461 sub field_names
{my $self=CORE
::shift;(do{["typename"]})};
1462 sub field_values
{my $self=CORE
::shift;(do{[$self->typename]})};
1463 sub irx1_describe
{my $self=CORE
::shift;(do{(("Type\(" . $self->typename->irx1_describe()) . "\)")})}})
1468 use base
"Any";BEGIN{push(@IRx1::Rx
::ISA
,'IRx1::Base');}
1469 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1470 sub pat
{ if(@_==2){$_[0]{'pat'}=$_[1]}else{$_[0]{'pat'}}};
1471 sub modifiers
{ if(@_==2){$_[0]{'modifiers'}=$_[1]}else{$_[0]{'modifiers'}}};
1472 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1473 sub newp
{my $self=CORE
::shift;my($match,$pat,$modifiers)=@_;
1474 (do{$self->new("match", $match, "pat", $pat, "modifiers", $modifiers)})};
1475 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1476 (do{$emitter->cb__Rx($self)})};
1477 sub node_name
{my $self=CORE
::shift;(do{"Rx"})};
1478 sub field_names
{my $self=CORE
::shift;(do{["pat", "modifiers"]})};
1479 sub field_values
{my $self=CORE
::shift;(do{[$self->pat, $self->modifiers]})};
1480 sub irx1_describe
{my $self=CORE
::shift;(do{(((("Rx\(" . $self->pat->irx1_describe()) . "\,") . $self->modifiers->irx1_describe()) . "\)")})}})
1484 { package IRx1
::Buf
;
1485 use base
"Any";BEGIN{push(@IRx1::Buf
::ISA
,'IRx1::Base');}
1486 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1487 sub buf
{ if(@_==2){$_[0]{'buf'}=$_[1]}else{$_[0]{'buf'}}};
1488 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1489 sub newp
{my $self=CORE
::shift;my($match,$buf)=@_;
1490 (do{$self->new("match", $match, "buf", $buf)})};
1491 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1492 (do{$emitter->cb__Buf($self)})};
1493 sub node_name
{my $self=CORE
::shift;(do{"Buf"})};
1494 sub field_names
{my $self=CORE
::shift;(do{["buf"]})};
1495 sub field_values
{my $self=CORE
::shift;(do{[$self->buf]})};
1496 sub irx1_describe
{my $self=CORE
::shift;(do{(("Buf\(" . $self->buf->irx1_describe()) . "\)")})}})
1500 { package IRx1
::For
;
1501 use base
"Any";BEGIN{push(@IRx1::For
::ISA
,'IRx1::Base');}
1502 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1503 sub expr
{ if(@_==2){$_[0]{'expr'}=$_[1]}else{$_[0]{'expr'}}};
1504 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
1505 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1506 sub newp
{my $self=CORE
::shift;my($match,$expr,$block)=@_;
1507 (do{$self->new("match", $match, "expr", $expr, "block", $block)})};
1508 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1509 (do{$emitter->cb__For($self)})};
1510 sub node_name
{my $self=CORE
::shift;(do{"For"})};
1511 sub field_names
{my $self=CORE
::shift;(do{["expr", "block"]})};
1512 sub field_values
{my $self=CORE
::shift;(do{[$self->expr, $self->block]})};
1513 sub irx1_describe
{my $self=CORE
::shift;(do{(((("For\(" . $self->expr->irx1_describe()) . "\,") . $self->block->irx1_describe()) . "\)")})}})
1517 { package IRx1
::Cond
;
1518 use base
"Any";BEGIN{push(@IRx1::Cond
::ISA
,'IRx1::Base');}
1519 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1520 sub clauses
{ if(@_==2){$_[0]{'clauses'}=$_[1]}else{$_[0]{'clauses'}}};
1521 sub default { if(@_==2){$_[0]{'default'}=$_[1]}else{$_[0]{'default'}}};
1522 sub invert_first_test
{ if(@_==2){$_[0]{'invert_first_test'}=$_[1]}else{$_[0]{'invert_first_test'}}};
1523 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1524 sub newp
{my $self=CORE
::shift;my($match,$clauses,$default,$invert_first_test)=@_;
1525 (do{$self->new("match", $match, "clauses", $clauses, "default", $default, "invert_first_test", $invert_first_test)})};
1526 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1527 (do{$emitter->cb__Cond($self)})};
1528 sub node_name
{my $self=CORE
::shift;(do{"Cond"})};
1529 sub field_names
{my $self=CORE
::shift;(do{["clauses", "default", "invert_first_test"]})};
1530 sub field_values
{my $self=CORE
::shift;(do{[$self->clauses, $self->default, $self->invert_first_test]})};
1531 sub irx1_describe
{my $self=CORE
::shift;(do{(((((("Cond\(" . $self->clauses->irx1_describe()) . "\,") . $self->default->irx1_describe()) . "\,") . $self->invert_first_test->irx1_describe()) . "\)")})}})
1535 { package IRx1
::Loop
;
1536 use base
"Any";BEGIN{push(@IRx1::Loop
::ISA
,'IRx1::Base');}
1537 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1538 sub pretest
{ if(@_==2){$_[0]{'pretest'}=$_[1]}else{$_[0]{'pretest'}}};
1539 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
1540 sub posttest
{ if(@_==2){$_[0]{'posttest'}=$_[1]}else{$_[0]{'posttest'}}};
1541 sub label
{ if(@_==2){$_[0]{'label'}=$_[1]}else{$_[0]{'label'}}};
1542 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1543 sub newp
{my $self=CORE
::shift;my($match,$pretest,$block,$posttest,$label)=@_;
1544 (do{$self->new("match", $match, "pretest", $pretest, "block", $block, "posttest", $posttest, "label", $label)})};
1545 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1546 (do{$emitter->cb__Loop($self)})};
1547 sub node_name
{my $self=CORE
::shift;(do{"Loop"})};
1548 sub field_names
{my $self=CORE
::shift;(do{["pretest", "block", "posttest", "label"]})};
1549 sub field_values
{my $self=CORE
::shift;(do{[$self->pretest, $self->block, $self->posttest, $self->label]})};
1550 sub irx1_describe
{my $self=CORE
::shift;(do{(((((((("Loop\(" . $self->pretest->irx1_describe()) . "\,") . $self->block->irx1_describe()) . "\,") . $self->posttest->irx1_describe()) . "\,") . $self->label->irx1_describe()) . "\)")})}})
1554 { package IRx1
::Given
;
1555 use base
"Any";BEGIN{push(@IRx1::Given
::ISA
,'IRx1::Base');}
1556 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1557 sub expr
{ if(@_==2){$_[0]{'expr'}=$_[1]}else{$_[0]{'expr'}}};
1558 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
1559 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1560 sub newp
{my $self=CORE
::shift;my($match,$expr,$block)=@_;
1561 (do{$self->new("match", $match, "expr", $expr, "block", $block)})};
1562 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1563 (do{$emitter->cb__Given($self)})};
1564 sub node_name
{my $self=CORE
::shift;(do{"Given"})};
1565 sub field_names
{my $self=CORE
::shift;(do{["expr", "block"]})};
1566 sub field_values
{my $self=CORE
::shift;(do{[$self->expr, $self->block]})};
1567 sub irx1_describe
{my $self=CORE
::shift;(do{(((("Given\(" . $self->expr->irx1_describe()) . "\,") . $self->block->irx1_describe()) . "\)")})}})
1571 { package IRx1
::When
;
1572 use base
"Any";BEGIN{push(@IRx1::When
::ISA
,'IRx1::Base');}
1573 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1574 sub expr
{ if(@_==2){$_[0]{'expr'}=$_[1]}else{$_[0]{'expr'}}};
1575 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
1576 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1577 sub newp
{my $self=CORE
::shift;my($match,$expr,$block)=@_;
1578 (do{$self->new("match", $match, "expr", $expr, "block", $block)})};
1579 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1580 (do{$emitter->cb__When($self)})};
1581 sub node_name
{my $self=CORE
::shift;(do{"When"})};
1582 sub field_names
{my $self=CORE
::shift;(do{["expr", "block"]})};
1583 sub field_values
{my $self=CORE
::shift;(do{[$self->expr, $self->block]})};
1584 sub irx1_describe
{my $self=CORE
::shift;(do{(((("When\(" . $self->expr->irx1_describe()) . "\,") . $self->block->irx1_describe()) . "\)")})}})
1588 { package IRx1
::Label
;
1589 use base
"Any";BEGIN{push(@IRx1::Label
::ISA
,'IRx1::Base');}
1590 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1591 sub labels
{ if(@_==2){$_[0]{'labels'}=$_[1]}else{$_[0]{'labels'}}};
1592 sub statement
{ if(@_==2){$_[0]{'statement'}=$_[1]}else{$_[0]{'statement'}}};
1593 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1594 sub newp
{my $self=CORE
::shift;my($match,$labels,$statement)=@_;
1595 (do{$self->new("match", $match, "labels", $labels, "statement", $statement)})};
1596 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1597 (do{$emitter->cb__Label($self)})};
1598 sub node_name
{my $self=CORE
::shift;(do{"Label"})};
1599 sub field_names
{my $self=CORE
::shift;(do{["labels", "statement"]})};
1600 sub field_values
{my $self=CORE
::shift;(do{[$self->labels, $self->statement]})};
1601 sub irx1_describe
{my $self=CORE
::shift;(do{(((("Label\(" . $self->labels->irx1_describe()) . "\,") . $self->statement->irx1_describe()) . "\)")})}})
1605 { package IRx1
::RegexDef
;
1606 use base
"Any";BEGIN{push(@IRx1::RegexDef
::ISA
,'IRx1::Base');}
1607 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1608 sub ident
{ if(@_==2){$_[0]{'ident'}=$_[1]}else{$_[0]{'ident'}}};
1609 sub pattern
{ if(@_==2){$_[0]{'pattern'}=$_[1]}else{$_[0]{'pattern'}}};
1610 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1611 sub newp
{my $self=CORE
::shift;my($match,$ident,$pattern)=@_;
1612 (do{$self->new("match", $match, "ident", $ident, "pattern", $pattern)})};
1613 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1614 (do{$emitter->cb__RegexDef($self)})};
1615 sub node_name
{my $self=CORE
::shift;(do{"RegexDef"})};
1616 sub field_names
{my $self=CORE
::shift;(do{["ident", "pattern"]})};
1617 sub field_values
{my $self=CORE
::shift;(do{[$self->ident, $self->pattern]})};
1618 sub irx1_describe
{my $self=CORE
::shift;(do{(((("RegexDef\(" . $self->ident->irx1_describe()) . "\,") . $self->pattern->irx1_describe()) . "\)")})}})
1622 { package IRx1
::Regex
;
1623 use base
"Any";BEGIN{push(@IRx1::Regex
::ISA
,'IRx1::Base');}
1624 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1625 sub patterns
{ if(@_==2){$_[0]{'patterns'}=$_[1]}else{$_[0]{'patterns'}}};
1626 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1627 sub newp
{my $self=CORE
::shift;my($match,$patterns)=@_;
1628 (do{$self->new("match", $match, "patterns", $patterns)})};
1629 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1630 (do{$emitter->cb__Regex($self)})};
1631 sub node_name
{my $self=CORE
::shift;(do{"Regex"})};
1632 sub field_names
{my $self=CORE
::shift;(do{["patterns"]})};
1633 sub field_values
{my $self=CORE
::shift;(do{[$self->patterns]})};
1634 sub irx1_describe
{my $self=CORE
::shift;(do{(("Regex\(" . $self->patterns->irx1_describe()) . "\)")})}})
1638 { package IRx1
::RxFirst
;
1639 use base
"Any";BEGIN{push(@IRx1::RxFirst
::ISA
,'IRx1::Base');}
1640 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1641 sub patterns
{ if(@_==2){$_[0]{'patterns'}=$_[1]}else{$_[0]{'patterns'}}};
1642 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1643 sub newp
{my $self=CORE
::shift;my($match,$patterns)=@_;
1644 (do{$self->new("match", $match, "patterns", $patterns)})};
1645 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1646 (do{$emitter->cb__RxFirst($self)})};
1647 sub node_name
{my $self=CORE
::shift;(do{"RxFirst"})};
1648 sub field_names
{my $self=CORE
::shift;(do{["patterns"]})};
1649 sub field_values
{my $self=CORE
::shift;(do{[$self->patterns]})};
1650 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxFirst\(" . $self->patterns->irx1_describe()) . "\)")})}})
1654 { package IRx1
::RxEvery
;
1655 use base
"Any";BEGIN{push(@IRx1::RxEvery
::ISA
,'IRx1::Base');}
1656 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1657 sub patterns
{ if(@_==2){$_[0]{'patterns'}=$_[1]}else{$_[0]{'patterns'}}};
1658 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1659 sub newp
{my $self=CORE
::shift;my($match,$patterns)=@_;
1660 (do{$self->new("match", $match, "patterns", $patterns)})};
1661 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1662 (do{$emitter->cb__RxEvery($self)})};
1663 sub node_name
{my $self=CORE
::shift;(do{"RxEvery"})};
1664 sub field_names
{my $self=CORE
::shift;(do{["patterns"]})};
1665 sub field_values
{my $self=CORE
::shift;(do{[$self->patterns]})};
1666 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxEvery\(" . $self->patterns->irx1_describe()) . "\)")})}})
1670 { package IRx1
::RxSubmatch
;
1671 use base
"Any";BEGIN{push(@IRx1::RxSubmatch
::ISA
,'IRx1::Base');}
1672 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1673 sub patterns
{ if(@_==2){$_[0]{'patterns'}=$_[1]}else{$_[0]{'patterns'}}};
1674 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1675 sub newp
{my $self=CORE
::shift;my($match,$patterns)=@_;
1676 (do{$self->new("match", $match, "patterns", $patterns)})};
1677 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1678 (do{$emitter->cb__RxSubmatch($self)})};
1679 sub node_name
{my $self=CORE
::shift;(do{"RxSubmatch"})};
1680 sub field_names
{my $self=CORE
::shift;(do{["patterns"]})};
1681 sub field_values
{my $self=CORE
::shift;(do{[$self->patterns]})};
1682 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxSubmatch\(" . $self->patterns->irx1_describe()) . "\)")})}})
1686 { package IRx1
::RxAny
;
1687 use base
"Any";BEGIN{push(@IRx1::RxAny
::ISA
,'IRx1::Base');}
1688 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1689 sub patterns
{ if(@_==2){$_[0]{'patterns'}=$_[1]}else{$_[0]{'patterns'}}};
1690 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1691 sub newp
{my $self=CORE
::shift;my($match,$patterns)=@_;
1692 (do{$self->new("match", $match, "patterns", $patterns)})};
1693 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1694 (do{$emitter->cb__RxAny($self)})};
1695 sub node_name
{my $self=CORE
::shift;(do{"RxAny"})};
1696 sub field_names
{my $self=CORE
::shift;(do{["patterns"]})};
1697 sub field_values
{my $self=CORE
::shift;(do{[$self->patterns]})};
1698 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxAny\(" . $self->patterns->irx1_describe()) . "\)")})}})
1702 { package IRx1
::RxAll
;
1703 use base
"Any";BEGIN{push(@IRx1::RxAll
::ISA
,'IRx1::Base');}
1704 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1705 sub patterns
{ if(@_==2){$_[0]{'patterns'}=$_[1]}else{$_[0]{'patterns'}}};
1706 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1707 sub newp
{my $self=CORE
::shift;my($match,$patterns)=@_;
1708 (do{$self->new("match", $match, "patterns", $patterns)})};
1709 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1710 (do{$emitter->cb__RxAll($self)})};
1711 sub node_name
{my $self=CORE
::shift;(do{"RxAll"})};
1712 sub field_names
{my $self=CORE
::shift;(do{["patterns"]})};
1713 sub field_values
{my $self=CORE
::shift;(do{[$self->patterns]})};
1714 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxAll\(" . $self->patterns->irx1_describe()) . "\)")})}})
1718 { package IRx1
::RxSequence
;
1719 use base
"Any";BEGIN{push(@IRx1::RxSequence
::ISA
,'IRx1::Base');}
1720 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1721 sub patterns
{ if(@_==2){$_[0]{'patterns'}=$_[1]}else{$_[0]{'patterns'}}};
1722 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1723 sub newp
{my $self=CORE
::shift;my($match,$patterns)=@_;
1724 (do{$self->new("match", $match, "patterns", $patterns)})};
1725 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1726 (do{$emitter->cb__RxSequence($self)})};
1727 sub node_name
{my $self=CORE
::shift;(do{"RxSequence"})};
1728 sub field_names
{my $self=CORE
::shift;(do{["patterns"]})};
1729 sub field_values
{my $self=CORE
::shift;(do{[$self->patterns]})};
1730 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxSequence\(" . $self->patterns->irx1_describe()) . "\)")})}})
1734 { package IRx1
::RxQuantifiedAtom
;
1735 use base
"Any";BEGIN{push(@IRx1::RxQuantifiedAtom
::ISA
,'IRx1::Base');}
1736 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1737 sub atom
{ if(@_==2){$_[0]{'atom'}=$_[1]}else{$_[0]{'atom'}}};
1738 sub quantifier
{ if(@_==2){$_[0]{'quantifier'}=$_[1]}else{$_[0]{'quantifier'}}};
1739 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1740 sub newp
{my $self=CORE
::shift;my($match,$atom,$quantifier)=@_;
1741 (do{$self->new("match", $match, "atom", $atom, "quantifier", $quantifier)})};
1742 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1743 (do{$emitter->cb__RxQuantifiedAtom($self)})};
1744 sub node_name
{my $self=CORE
::shift;(do{"RxQuantifiedAtom"})};
1745 sub field_names
{my $self=CORE
::shift;(do{["atom", "quantifier"]})};
1746 sub field_values
{my $self=CORE
::shift;(do{[$self->atom, $self->quantifier]})};
1747 sub irx1_describe
{my $self=CORE
::shift;(do{(((("RxQuantifiedAtom\(" . $self->atom->irx1_describe()) . "\,") . $self->quantifier->irx1_describe()) . "\)")})}})
1751 { package IRx1
::RxBackslash
;
1752 use base
"Any";BEGIN{push(@IRx1::RxBackslash
::ISA
,'IRx1::Base');}
1753 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1754 sub char
{ if(@_==2){$_[0]{'char'}=$_[1]}else{$_[0]{'char'}}};
1755 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1756 sub newp
{my $self=CORE
::shift;my($match,$char)=@_;
1757 (do{$self->new("match", $match, "char", $char)})};
1758 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1759 (do{$emitter->cb__RxBackslash($self)})};
1760 sub node_name
{my $self=CORE
::shift;(do{"RxBackslash"})};
1761 sub field_names
{my $self=CORE
::shift;(do{["char"]})};
1762 sub field_values
{my $self=CORE
::shift;(do{[$self->char]})};
1763 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxBackslash\(" . $self->char->irx1_describe()) . "\)")})}})
1767 { package IRx1
::RxAssertion
;
1768 use base
"Any";BEGIN{push(@IRx1::RxAssertion
::ISA
,'IRx1::Base');}
1769 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1770 sub ident
{ if(@_==2){$_[0]{'ident'}=$_[1]}else{$_[0]{'ident'}}};
1771 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1772 sub newp
{my $self=CORE
::shift;my($match,$ident)=@_;
1773 (do{$self->new("match", $match, "ident", $ident)})};
1774 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1775 (do{$emitter->cb__RxAssertion($self)})};
1776 sub node_name
{my $self=CORE
::shift;(do{"RxAssertion"})};
1777 sub field_names
{my $self=CORE
::shift;(do{["ident"]})};
1778 sub field_values
{my $self=CORE
::shift;(do{[$self->ident]})};
1779 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxAssertion\(" . $self->ident->irx1_describe()) . "\)")})}})
1783 { package IRx1
::RxModInternal
;
1784 use base
"Any";BEGIN{push(@IRx1::RxModInternal
::ISA
,'IRx1::Base');}
1785 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1786 sub mod
{ if(@_==2){$_[0]{'mod'}=$_[1]}else{$_[0]{'mod'}}};
1787 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1788 sub newp
{my $self=CORE
::shift;my($match,$mod)=@_;
1789 (do{$self->new("match", $match, "mod", $mod)})};
1790 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1791 (do{$emitter->cb__RxModInternal($self)})};
1792 sub node_name
{my $self=CORE
::shift;(do{"RxModInternal"})};
1793 sub field_names
{my $self=CORE
::shift;(do{["mod"]})};
1794 sub field_values
{my $self=CORE
::shift;(do{[$self->mod]})};
1795 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxModInternal\(" . $self->mod->irx1_describe()) . "\)")})}})
1799 { package IRx1
::RxCapture
;
1800 use base
"Any";BEGIN{push(@IRx1::RxCapture
::ISA
,'IRx1::Base');}
1801 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1802 sub pattern
{ if(@_==2){$_[0]{'pattern'}=$_[1]}else{$_[0]{'pattern'}}};
1803 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1804 sub newp
{my $self=CORE
::shift;my($match,$pattern)=@_;
1805 (do{$self->new("match", $match, "pattern", $pattern)})};
1806 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1807 (do{$emitter->cb__RxCapture($self)})};
1808 sub node_name
{my $self=CORE
::shift;(do{"RxCapture"})};
1809 sub field_names
{my $self=CORE
::shift;(do{["pattern"]})};
1810 sub field_values
{my $self=CORE
::shift;(do{[$self->pattern]})};
1811 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxCapture\(" . $self->pattern->irx1_describe()) . "\)")})}})
1815 { package IRx1
::RxGroup
;
1816 use base
"Any";BEGIN{push(@IRx1::RxGroup
::ISA
,'IRx1::Base');}
1817 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1818 sub pattern
{ if(@_==2){$_[0]{'pattern'}=$_[1]}else{$_[0]{'pattern'}}};
1819 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1820 sub newp
{my $self=CORE
::shift;my($match,$pattern)=@_;
1821 (do{$self->new("match", $match, "pattern", $pattern)})};
1822 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1823 (do{$emitter->cb__RxGroup($self)})};
1824 sub node_name
{my $self=CORE
::shift;(do{"RxGroup"})};
1825 sub field_names
{my $self=CORE
::shift;(do{["pattern"]})};
1826 sub field_values
{my $self=CORE
::shift;(do{[$self->pattern]})};
1827 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxGroup\(" . $self->pattern->irx1_describe()) . "\)")})}})
1831 { package IRx1
::RxBlock
;
1832 use base
"Any";BEGIN{push(@IRx1::RxBlock
::ISA
,'IRx1::Base');}
1833 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1834 sub block
{ if(@_==2){$_[0]{'block'}=$_[1]}else{$_[0]{'block'}}};
1835 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1836 sub newp
{my $self=CORE
::shift;my($match,$block)=@_;
1837 (do{$self->new("match", $match, "block", $block)})};
1838 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1839 (do{$emitter->cb__RxBlock($self)})};
1840 sub node_name
{my $self=CORE
::shift;(do{"RxBlock"})};
1841 sub field_names
{my $self=CORE
::shift;(do{["block"]})};
1842 sub field_values
{my $self=CORE
::shift;(do{[$self->block]})};
1843 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxBlock\(" . $self->block->irx1_describe()) . "\)")})}})
1847 { package IRx1
::RxBind
;
1848 use base
"Any";BEGIN{push(@IRx1::RxBind
::ISA
,'IRx1::Base');}
1849 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1850 sub var
{ if(@_==2){$_[0]{'var'}=$_[1]}else{$_[0]{'var'}}};
1851 sub binding
{ if(@_==2){$_[0]{'binding'}=$_[1]}else{$_[0]{'binding'}}};
1852 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1853 sub newp
{my $self=CORE
::shift;my($match,$var,$binding)=@_;
1854 (do{$self->new("match", $match, "var", $var, "binding", $binding)})};
1855 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1856 (do{$emitter->cb__RxBind($self)})};
1857 sub node_name
{my $self=CORE
::shift;(do{"RxBind"})};
1858 sub field_names
{my $self=CORE
::shift;(do{["var", "binding"]})};
1859 sub field_values
{my $self=CORE
::shift;(do{[$self->var, $self->binding]})};
1860 sub irx1_describe
{my $self=CORE
::shift;(do{(((("RxBind\(" . $self->var->irx1_describe()) . "\,") . $self->binding->irx1_describe()) . "\)")})}})
1864 { package IRx1
::RxLiteral
;
1865 use base
"Any";BEGIN{push(@IRx1::RxLiteral
::ISA
,'IRx1::Base');}
1866 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1867 sub text
{ if(@_==2){$_[0]{'text'}=$_[1]}else{$_[0]{'text'}}};
1868 sub quote
{ if(@_==2){$_[0]{'quote'}=$_[1]}else{$_[0]{'quote'}}};
1869 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1870 sub newp
{my $self=CORE
::shift;my($match,$text,$quote)=@_;
1871 (do{$self->new("match", $match, "text", $text, "quote", $quote)})};
1872 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1873 (do{$emitter->cb__RxLiteral($self)})};
1874 sub node_name
{my $self=CORE
::shift;(do{"RxLiteral"})};
1875 sub field_names
{my $self=CORE
::shift;(do{["text", "quote"]})};
1876 sub field_values
{my $self=CORE
::shift;(do{[$self->text, $self->quote]})};
1877 sub irx1_describe
{my $self=CORE
::shift;(do{(((("RxLiteral\(" . $self->text->irx1_describe()) . "\,") . $self->quote->irx1_describe()) . "\)")})}})
1881 { package IRx1
::RxSymbol
;
1882 use base
"Any";BEGIN{push(@IRx1::RxSymbol
::ISA
,'IRx1::Base');}
1883 (do{sub match
{ if(@_==2){$_[0]{'match'}=$_[1]}else{$_[0]{'match'}}};
1884 sub symbol
{ if(@_==2){$_[0]{'symbol'}=$_[1]}else{$_[0]{'symbol'}}};
1885 sub notes
{ if(@_==2){$_[0]{'notes'}=$_[1]}else{$_[0]{'notes'}}};
1886 sub newp
{my $self=CORE
::shift;my($match,$symbol)=@_;
1887 (do{$self->new("match", $match, "symbol", $symbol)})};
1888 sub callback
{my $self=CORE
::shift;my($emitter)=@_;
1889 (do{$emitter->cb__RxSymbol($self)})};
1890 sub node_name
{my $self=CORE
::shift;(do{"RxSymbol"})};
1891 sub field_names
{my $self=CORE
::shift;(do{["symbol"]})};
1892 sub field_values
{my $self=CORE
::shift;(do{[$self->symbol]})};
1893 sub irx1_describe
{my $self=CORE
::shift;(do{(("RxSymbol\(" . $self->symbol->irx1_describe()) . "\)")})}})
1900 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
1903 { package IRx1_Build
;
1904 use base
"Any";(do{sub constructors
{ if(@_==2){$_[0]{'constructors'}=$_[1]}else{$_[0]{'constructors'}}};
1905 sub add_constructor
{my $self=CORE
::shift;my($k,$constructor)=@_;
1906 (do{if($self->constructors) {
1910 $self->constructors($h)})
1912 ($self->constructors->{$k} = $constructor)})};
1913 sub make_ir_from_Match_tree
{my $self=CORE
::shift;my($m)=@_;
1914 (do{my $rule = $m->rule();
1915 my $constructor = $self->constructors->{$rule};
1916 if(($constructor)) {
1917 (do{$constructor->($m)})
1919 (do{GLOBAL
::die((("Unknown\ rule\:\ " . $rule) . "\
1920 It\ needs\ to\ be\ added\ to\ ast_handlers\.\
1927 use base
"Any";(do{sub make_ir_from_Match_tree
{my $self=CORE
::shift;(do{$main::irbuilder
->make_ir_from_Match_tree($self)})}})
1932 use base
"Any";(do{sub make_ir_from_Match_tree
{my $self=CORE
::shift;(do{$self->map(sub {my($e)=@_;
1933 (do{$e->make_ir_from_Match_tree()})})})}})
1938 use base
"Any";(do{sub make_ir_from_Match_tree
{my $self=CORE
::shift;(do{$self})}})
1943 use base
"Any";(do{sub make_ir_from_Match_tree
{my $self=CORE
::shift;(do{$self})}})
1948 use base
"Any";(do{sub make_ir_from_Match_tree
{my $self=CORE
::shift;(do{$self})}})
1953 use base
"Any";(do{sub make_ir_from_Match_tree
{my $self=CORE
::shift;(do{$self})}})
1956 if(GLOBAL
::not($GLOBAL::ast2ir_0
)) {
1957 (do{($GLOBAL::ast2ir_0
= IRx1_Build
->new()->init())})
1959 ($GLOBAL::ast2ir_1
= IRx1_Build
->new()->init());
1961 { package IRx1_Build
;
1962 use base
"Any";(do{sub irbuild_ir
{my($x)=@_;
1963 (do{$x->make_ir_from_Match_tree()})};
1964 sub init
{my $self=CORE
::shift;(do{$self->add_constructor("comp_unit", sub {my($m)=@_;
1965 (do{IRx1
::CompUnit
->newp($m, irbuild_ir
($m->{"hash"}->{"statementlist"}))})});
1966 $self->add_constructor("statement", sub {my($m)=@_;
1967 (do{my $labels = irbuild_ir
($m->{"hash"}->{"label"});
1968 my $result = (irbuild_ir
($m->{"hash"}->{"expr"}) || irbuild_ir
($m->{"hash"}->{"control"}));
1969 if(($m->{"hash"}->{"expr"} && (($m->{"hash"}->{"mod_loop"} || $m->{"hash"}->{"mod_cond"})))) {
1970 (do{{ package blackboard
; use vars
'$statement_expr'};local $blackboard::statement_expr
= $result;
1971 ($result = (irbuild_ir
($m->{"hash"}->{"mod_loop"}) || irbuild_ir
($m->{"hash"}->{"mod_cond"})));
1972 if($m->{"hash"}->{"mod_condloop"}) {
1973 (do{($blackboard::statement_expr
= $result);
1974 ($result = irbuild_ir
($m->{"hash"}->{"mod_condloop"}))})
1978 (do{IRx1
::Label
->newp($m, $labels, $result)})
1982 $self->add_constructor("expect_infix", sub {my($m)=@_;
1983 (do{if(irbuild_ir
($m->{"hash"}->{"infix"})) {
1984 (do{if(irbuild_ir
($m->{"hash"}->{"infix_postfix_meta_operator"})) {
1985 (do{GLOBAL
::die("Unimplemented\ infix_postfix_meta_operator")})
1987 my $op = irbuild_ir
($m->{"hash"}->{"infix"}->{"hash"}->{"sym"});
1988 if(($op eq "\=\>")) {
1989 (do{my $args = irbuild_ir
($m->{"hash"}->{"args"});
1991 (do{GLOBAL
::die("chained\ \=\>\ unimplemented")})
1993 IRx1
::Pair
->newp($m, $args->[0], $args->[1])})
1995 (do{IRx1
::Apply
->newp($m, ("infix\:" . $op), IRx1
::Capture
->newp($m, (irbuild_ir
($m->{"hash"}->{"args"}) || [])))})
1998 (do{GLOBAL
::die("Unimplemented\ infix_prefix_meta_operator\ or\ infix_circumfix_meta_operator")})
2000 $self->add_constructor("fatarrow", sub {my($m)=@_;
2001 (do{IRx1
::Pair
->newp($m, irbuild_ir
($m->{"hash"}->{"key"}), irbuild_ir
($m->{"hash"}->{"val"}))})});
2002 $self->add_constructor("expect_term", sub {my($m)=@_;
2003 (do{{ package blackboard
; use vars
'$expect_term_base'};local $blackboard::expect_term_base
= irbuild_ir
($m->{"hash"}->{"noun"});
2005 if($m->{"hash"}->{"pre"}) {
2006 (do{$ops->push($m->{"hash"}->{"pre"}->flatten())})
2008 if($m->{"hash"}->{"post"}) {
2009 (do{$ops->push($m->{"hash"}->{"post"}->flatten())})
2011 for(($ops)->flatten){
2012 (do{($blackboard::expect_term_base
= irbuild_ir
($_))})
2014 $blackboard::expect_term_base
})});
2015 $self->add_constructor("term\:expect_term", sub {my($m)=@_;
2016 (do{irbuild_ir
($m->{"hash"}->{"noun"})})});
2017 $self->add_constructor("post", sub {my($m)=@_;
2018 (do{if($m->{"hash"}->{"args"}) {
2019 (do{irbuild_ir
($m->{"hash"}->{"args"})->[0]})
2021 (do{(irbuild_ir
($m->{"hash"}->{"dotty"}) or irbuild_ir
($m->{"hash"}->{"postop"}))})
2023 $self->add_constructor("pre", sub {my($m)=@_;
2024 (do{if($m->{"hash"}->{"args"}) {
2025 (do{irbuild_ir
($m->{"hash"}->{"args"})->[0]})
2026 }elsif($m->{"hash"}->{"prefix"}) {
2027 (do{irbuild_ir
($m->{"hash"}->{"prefix"})})
2029 (do{GLOBAL
::die("pre\ without\ a\ prefix\ is\ unimplemented")})
2031 $self->add_constructor("dotty\:methodop", sub {my($m)=@_;
2032 (do{IRx1
::Call
->newp($m, $blackboard::expect_term_base
, irbuild_ir
($m->{"hash"}->{"ident"}), IRx1
::Capture
->newp($m, (irbuild_ir
($m->{"hash"}->{"semilist"}) || [])))})});
2033 $self->add_constructor("dotty\:\.\^\!", sub {my($m)=@_;
2034 (do{IRx1
::Call
->newp($m, $blackboard::expect_term_base
, ("\^\!" . irbuild_ir
($m->{"hash"}->{"methodop"}->{"hash"}->{"ident"})), IRx1
::Capture
->newp($m, (irbuild_ir
($m->{"hash"}->{"methodop"}->{"hash"}->{"semilist"}) || [])))})});
2035 $self->add_constructor("dotty\:postcircumfix", sub {my($m)=@_;
2036 (do{my $s = ($m->match_string());
2037 my $name = ((GLOBAL
::substr($s, 0, 1) . "\ ") . GLOBAL
::substr($s, (-1), 1));
2038 my $ident = ("postcircumfix\:" . $name);
2039 my $args = irbuild_ir
($m->{"hash"}->{"kludge_name"});
2040 if(($args && (($args->ref() ne "ARRAY")))) {
2041 (do{($args = [$args])})
2043 IRx1
::Call
->newp($m, $blackboard::expect_term_base
, $ident, IRx1
::Capture
->newp($m, ($args || [])))})});
2044 $self->add_constructor("postcircumfix", sub {my($m)=@_;
2045 (do{my $s = ($m->match_string());
2046 my $name = ((GLOBAL
::substr($s, 0, 1) . "\ ") . GLOBAL
::substr($s, (-1), 1));
2047 my $ident = ("postcircumfix\:" . $name);
2048 my $args = irbuild_ir
($m->{"hash"}->{"kludge_name"});
2049 if(($args && (($args->ref() ne "ARRAY")))) {
2050 (do{($args = [$args])})
2052 IRx1
::Call
->newp($m, $blackboard::expect_term_base
, $ident, IRx1
::Capture
->newp($m, ($args || [])))})});
2053 $self->add_constructor("postfix", sub {my($m)=@_;
2054 (do{my $op = ($m->match_string());
2055 IRx1
::Apply
->newp($m, ("postfix\:" . $op), IRx1
::Capture
->newp($m, [$blackboard::expect_term_base
]))})});
2056 $self->add_constructor("prefix", sub {my($m)=@_;
2057 (do{my $op = ($m->match_string());
2058 IRx1
::Apply
->newp($m, ("prefix\:" . $op), IRx1
::Capture
->newp($m, [$blackboard::expect_term_base
]))})});
2059 $self->add_constructor("infix", sub {my($m)=@_;
2060 (do{my $op = ($m->match_string());
2061 IRx1
::Apply
->newp($m, ("infix\:" . $op), IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"left"}), irbuild_ir
($m->{"hash"}->{"right"})]))})});
2062 $self->add_constructor("term", sub {my($m)=@_;
2063 (do{my $text = ($m->match_string());
2064 if(($text eq "self")) {
2065 (do{IRx1
::Apply
->newp($m, "self", IRx1
::Capture
->newp($m, []))})
2066 }elsif(($text eq "\*")) {
2067 (do{IRx1
::Apply
->newp($m, "whatever", IRx1
::Capture
->newp($m, []))})
2069 (do{GLOBAL
::die("AST\ term\ partially\ unimplemented\.\
2072 $self->add_constructor("integer", sub {my($m)=@_;
2073 (do{IRx1
::NumInt
->newp($m, ($m->match_string()))})});
2074 $self->add_constructor("subcall", sub {my($m)=@_;
2075 (do{my $t = irbuild_ir
($m->{"hash"}->{"subshortname"}->{"hash"}->{"twigil"});
2076 if(($t && ($t eq "\."))) {
2077 (do{IRx1
::Call
->newp($m, IRx1
::Apply
->newp($m, "self", IRx1
::Capture
->newp($m, [])), irbuild_ir
($m->{"hash"}->{"subshortname"}->{"hash"}->{"desigilname"}->{"hash"}->{"ident"}), IRx1
::Capture
->newp($m, (irbuild_ir
($m->{"hash"}->{"semilist"}) || [])))})
2079 (do{IRx1
::Apply
->newp($m, irbuild_ir
($m->{"hash"}->{"subshortname"}), IRx1
::Capture
->newp($m, (irbuild_ir
($m->{"hash"}->{"semilist"}) || [])))})
2081 $self->add_constructor("name", sub {my($m)=@_;
2082 (do{($m->match_string())})});
2083 $self->add_constructor("subshortname", sub {my($m)=@_;
2084 (do{if($m->{"hash"}->{"category"}) {
2085 (do{my $cat = $m->{"hash"}->{"category"}->match_string();
2086 my $op = $m->{"hash"}->{"colonpair"}->[0]->{"hash"}->{"structural"}->{"hash"}->{"kludge_name"};
2087 if(($op->WHAT() eq "Array")) {
2088 (do{($op = $op->join(""))})
2090 (($cat . "\:") . $op)})
2092 (do{($m->match_string())})
2094 $self->add_constructor("statement_control\:use", sub {my($m)=@_;
2095 (do{IRx1
::Use
->newp($m, "use", irbuild_ir
($m->{"hash"}->{"module_name"}), irbuild_ir
($m->{"hash"}->{"EXPR"}))})});
2096 $self->add_constructor("module_name\:depreciated", sub {my($m)=@_;
2097 (do{($m->match_string())})});
2098 $self->add_constructor("module_name\:normal", sub {my($m)=@_;
2099 (do{($m->match_string())})});
2100 $self->add_constructor("role_name", sub {my($m)=@_;
2101 (do{($m->match_string())})});
2102 $self->add_constructor("statement_control\:BEGIN", sub {my($m)=@_;
2103 (do{IRx1
::ClosureTrait
->newp($m, "BEGIN", irbuild_ir
($m->{"hash"}->{"block"}))})});
2104 $self->add_constructor("term\:listop", sub {my($m)=@_;
2105 (do{my $not_really_an_arglist = irbuild_ir
($m->{"hash"}->{"arglist"});
2106 if(irbuild_ir
($m->{"hash"}->{"arglist"})) {
2107 (do{IRx1
::Apply
->newp($m, irbuild_ir
($m->{"hash"}->{"ident"}), IRx1
::Capture
->newp($m, [$not_really_an_arglist]))})
2109 (do{IRx1
::Apply
->newp($m, irbuild_ir
($m->{"hash"}->{"ident"}), IRx1
::Capture
->newp($m, []))})
2111 $self->add_constructor("quote\:q", sub {my($m)=@_;
2112 (do{my $s = irbuild_ir
($m->{"hash"}->{"text"});
2113 $s->re_sub_g("\\\\\(\[\\\\\'\]\)", "\$1");
2114 IRx1
::Buf
->newp($m, $s)})});
2115 $self->add_constructor("quote\:qq", sub {my($m)=@_;
2116 (do{my $s = irbuild_ir
($m->{"hash"}->{"text"});
2117 $s->re_gsub(qr/(?<!\\)\\n/, "\
2119 $s->re_gsub(qr/(?<!\\)\\t/, "\ ");
2120 $s->re_sub_g("\\\\\(\.\)", "\$1");
2121 IRx1
::Buf
->newp($m, $s)})});
2122 $self->add_constructor("quote\:regex", sub {my($m)=@_;
2123 (do{my $s = (irbuild_ir
($m->{"hash"}->{"text"}) || irbuild_ir
($m->{"hash"}->{"quotesnabber"}->{"hash"}->{"text"}));
2124 IRx1
::Rx
->newp($m, $s, irbuild_ir
($m->{"hash"}->{"quotepair"}))})});
2125 $self->add_constructor("scope_declarator\:my", sub {my($m)=@_;
2126 (do{{ package blackboard
; use vars
'$scope'};local $blackboard::scope
= "my";
2127 irbuild_ir
($m->{"hash"}->{"scoped"})})});
2128 $self->add_constructor("scope_declarator\:has", sub {my($m)=@_;
2129 (do{{ package blackboard
; use vars
'$scope'};local $blackboard::scope
= "has";
2130 irbuild_ir
($m->{"hash"}->{"scoped"})})});
2131 $self->add_constructor("scope_declarator\:our", sub {my($m)=@_;
2132 (do{{ package blackboard
; use vars
'$scope'};local $blackboard::scope
= "our";
2133 irbuild_ir
($m->{"hash"}->{"scoped"})})});
2134 $self->add_constructor("scope_declarator\:temp", sub {my($m)=@_;
2135 (do{{ package blackboard
; use vars
'$scope'};local $blackboard::scope
= "temp";
2136 irbuild_ir
($m->{"hash"}->{"scoped"})})});
2137 $self->add_constructor("scoped", sub {my($m)=@_;
2138 (do{{ package blackboard
; use vars
'$typenames'};local $blackboard::typenames
= irbuild_ir
($m->{"hash"}->{"fulltypename"});
2139 ((((irbuild_ir
($m->{"hash"}->{"variable_decl"}) || irbuild_ir
($m->{"hash"}->{"signature"})) || irbuild_ir
($m->{"hash"}->{"plurality_declarator"})) || irbuild_ir
($m->{"hash"}->{"routine_declarator"})) || irbuild_ir
($m->{"hash"}->{"type_declarator"}))})});
2140 $self->add_constructor("variable_decl", sub {my($m)=@_;
2141 (do{my $scope = $blackboard::scope
;
2142 { package blackboard
; use vars
'$scope'};local $blackboard::scope
;
2143 my $typenames = $blackboard::typenames
;
2144 { package blackboard
; use vars
'$typenames'};local $blackboard::typenames
= GLOBAL
::undef();
2145 IRx1
::VarDecl
->newp($m, $scope, $typenames, GLOBAL
::undef(), irbuild_ir
($m->{"hash"}->{"variable"}), GLOBAL
::undef(), irbuild_ir
($m->{"hash"}->{"traits"}), "\=", irbuild_ir
($m->{"hash"}->{"default_value"}))})});
2146 $self->add_constructor("variable", sub {my($m)=@_;
2147 (do{my $tw = irbuild_ir
($m->{"hash"}->{"twigil"});
2148 if($m->{"hash"}->{"postcircumfix"}) {
2149 (do{if(($tw eq "\.")) {
2150 (do{my $slf = IRx1
::Apply
->newp($m, "self", IRx1
::Capture
->newp($m, []));
2151 my $args = irbuild_ir
($m->{"hash"}->{"postcircumfix"}->{"hash"}->{"kludge_name"});
2152 if(($args && (($args->ref() ne "ARRAY")))) {
2153 (do{($args = [$args])})
2155 IRx1
::Call
->newp($m, $slf, irbuild_ir
($m->{"hash"}->{"desigilname"}), IRx1
::Capture
->newp($m, ($args || [])))})
2157 (do{my $v = IRx1
::Var
->newp($m, irbuild_ir
($m->{"hash"}->{"sigil"}), $tw, irbuild_ir
($m->{"hash"}->{"desigilname"}));
2158 { package blackboard
; use vars
'$expect_term_base'};local $blackboard::expect_term_base
= $v;
2159 irbuild_ir
($m->{"hash"}->{"postcircumfix"})})
2162 (do{IRx1
::Var
->newp($m, irbuild_ir
($m->{"hash"}->{"sigil"}), $tw, irbuild_ir
($m->{"hash"}->{"desigilname"}))})
2164 $self->add_constructor("sigil", sub {my($m)=@_;
2165 (do{($m->match_string())})});
2166 $self->add_constructor("twigil", sub {my($m)=@_;
2167 (do{($m->match_string())})});
2168 $self->add_constructor("special_variable", sub {my($m)=@_;
2169 (do{my $v = ($m->match_string());
2170 my $s = GLOBAL
::substr($v, 0, 1);
2171 my $n = GLOBAL
::substr($v, 1, $v->length());
2172 IRx1
::Var
->newp($m, $s, GLOBAL
::undef(), $n)})});
2173 $self->add_constructor("circumfix", sub {my($m)=@_;
2174 (do{my $s = ($m->match_string());
2175 my $name = ((GLOBAL
::substr($s, 0, 1) . "\ ") . GLOBAL
::substr($s, (-1), 1));
2176 my $args = irbuild_ir
($m->{"hash"}->{"kludge_name"});
2177 if(($args && (($args->ref() ne "ARRAY")))) {
2178 (do{($args = [$args])})
2180 IRx1
::Apply
->newp($m, ("circumfix\:" . $name), IRx1
::Capture
->newp($m, ($args || [])))})});
2181 $self->add_constructor("statement_control\:for", sub {my($m)=@_;
2182 (do{IRx1
::For
->newp($m, irbuild_ir
($m->{"hash"}->{"expr"}), irbuild_ir
($m->{"hash"}->{"block"}))})});
2183 $self->add_constructor("statement_mod_loop\:for", sub {my($m)=@_;
2184 (do{IRx1
::For
->newp($m, irbuild_ir
($m->{"hash"}->{"modifier_expr"}), $blackboard::statement_expr
)})});
2185 $self->add_constructor("statement_control\:while", sub {my($m)=@_;
2186 (do{IRx1
::Loop
->newp($m, irbuild_ir
($m->{"hash"}->{"expr"}), irbuild_ir
($m->{"hash"}->{"block"}))})});
2187 $self->add_constructor("statement_mod_loop\:while", sub {my($m)=@_;
2188 (do{IRx1
::Loop
->newp($m, irbuild_ir
($m->{"hash"}->{"modifier_expr"}), $blackboard::statement_expr
)})});
2189 $self->add_constructor("statement_control\:until", sub {my($m)=@_;
2190 (do{my $test = IRx1
::Apply
->newp($m, "not", IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"expr"})]));
2191 IRx1
::Loop
->newp($m, $test, irbuild_ir
($m->{"hash"}->{"block"}))})});
2192 $self->add_constructor("statement_mod_loop\:until", sub {my($m)=@_;
2193 (do{my $test = IRx1
::Apply
->newp($m, "not", IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"modifier_expr"})]));
2194 IRx1
::Loop
->newp($m, $test, $blackboard::statement_expr
)})});
2195 $self->add_constructor("statement_control\:loop", sub {my($m)=@_;
2196 (do{my $e1 = irbuild_ir
($m->{"hash"}->{"loop_eee"}->{"hash"}->{"loop_e1"});
2197 my $e2 = irbuild_ir
($m->{"hash"}->{"loop_eee"}->{"hash"}->{"loop_e2"});
2198 my $e3 = irbuild_ir
($m->{"hash"}->{"loop_eee"}->{"hash"}->{"loop_e3"});
2199 my $block = irbuild_ir
($m->{"hash"}->{"loop_block"});
2200 my $body = IRx1
::Loop
->newp($m, $e2, IRx1
::Block
->newp($m, [$block, $e3]));
2201 IRx1
::Block
->newp($m, [$e1, $body])})});
2202 $self->add_constructor("statement_control\:if", sub {my($m)=@_;
2203 (do{my $els = irbuild_ir
($m->{"hash"}->{"else"});
2205 (do{($els = $els->[0])})
2207 IRx1
::Cond
->newp($m, [[irbuild_ir
($m->{"hash"}->{"if_expr"}), irbuild_ir
($m->{"hash"}->{"if_block"})]]->push(irbuild_ir
($m->{"hash"}->{"elsif"})->flatten()), $els)})});
2208 $self->add_constructor("elsif", sub {my($m)=@_;
2209 (do{[irbuild_ir
($m->{"hash"}->{"elsif_expr"}), irbuild_ir
($m->{"hash"}->{"elsif_block"})]})});
2210 $self->add_constructor("if__else", sub {my($m)=@_;
2212 for(($m->{"hash"}->keys())->flatten){
2213 (do{if(($_ ne "match")) {
2215 (do{GLOBAL
::die("Unexpectedly\ more\ than\ 1\ field\ \-\ dont\ know\ which\ to\ choose\
2221 my $one = irbuild_ir
($m->{"hash"}->{$key});
2223 $self->add_constructor("statement_mod_cond\:if", sub {my($m)=@_;
2224 (do{IRx1
::Cond
->newp($m, [[irbuild_ir
($m->{"hash"}->{"modifier_expr"}), $blackboard::statement_expr
]], GLOBAL
::undef())})});
2225 $self->add_constructor("statement_control\:unless", sub {my($m)=@_;
2226 (do{IRx1
::Cond
->newp($m, [[irbuild_ir
($m->{"hash"}->{"expr"}), irbuild_ir
($m->{"hash"}->{"block"})]], GLOBAL
::undef(), 1)})});
2227 $self->add_constructor("statement_mod_cond\:unless", sub {my($m)=@_;
2228 (do{IRx1
::Cond
->newp($m, [[irbuild_ir
($m->{"hash"}->{"modifier_expr"}), $blackboard::statement_expr
]], GLOBAL
::undef(), 1)})});
2229 $self->add_constructor("statement_control\:given", sub {my($m)=@_;
2230 (do{IRx1
::Given
->newp($m, irbuild_ir
($m->{"hash"}->{"expr"}), irbuild_ir
($m->{"hash"}->{"block"}))})});
2231 $self->add_constructor("statement_mod_loop\:given", sub {my($m)=@_;
2232 (do{IRx1
::Given
->newp($m, irbuild_ir
($m->{"hash"}->{"modifier_expr"}), $blackboard::statement_expr
)})});
2233 $self->add_constructor("statement_control\:when", sub {my($m)=@_;
2234 (do{IRx1
::When
->newp($m, irbuild_ir
($m->{"hash"}->{"expr"}), irbuild_ir
($m->{"hash"}->{"block"}))})});
2235 $self->add_constructor("statement_mod_cond\:when", sub {my($m)=@_;
2236 (do{IRx1
::When
->newp($m, irbuild_ir
($m->{"hash"}->{"modifier_expr"}), $blackboard::statement_expr
)})});
2237 $self->add_constructor("statement_control\:default", sub {my($m)=@_;
2238 (do{IRx1
::When
->newp($m, GLOBAL
::undef(), irbuild_ir
($m->{"hash"}->{"block"}))})});
2239 $self->add_constructor("statement_prefix\:do", sub {my($m)=@_;
2240 (do{IRx1
::Apply
->newp($m, "statement_prefix\:do", IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"statement"})]))})});
2241 $self->add_constructor("statement_prefix\:try", sub {my($m)=@_;
2242 (do{IRx1
::Apply
->newp($m, "statement_prefix\:try", IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"statement"})]))})});
2243 $self->add_constructor("statement_prefix\:gather", sub {my($m)=@_;
2244 (do{IRx1
::Apply
->newp($m, "statement_prefix\:gather", IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"statement"})]))})});
2245 $self->add_constructor("statement_prefix\:contend", sub {my($m)=@_;
2246 (do{IRx1
::Apply
->newp($m, "statement_prefix\:contend", IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"statement"})]))})});
2247 $self->add_constructor("statement_prefix\:async", sub {my($m)=@_;
2248 (do{IRx1
::Apply
->newp($m, "statement_prefix\:async", IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"statement"})]))})});
2249 $self->add_constructor("statement_prefix\:lazy", sub {my($m)=@_;
2250 (do{IRx1
::Apply
->newp($m, "statement_prefix\:lazy", IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"statement"})]))})});
2251 $self->add_constructor("pblock", sub {my($m)=@_;
2252 (do{if($m->{"hash"}->{"signature"}) {
2253 (do{IRx1
::SubDecl
->newp($m, GLOBAL
::undef(), GLOBAL
::undef(), GLOBAL
::undef(), GLOBAL
::undef(), irbuild_ir
($m->{"hash"}->{"signature"}), GLOBAL
::undef(), irbuild_ir
($m->{"hash"}->{"block"}))})
2255 (do{irbuild_ir
($m->{"hash"}->{"block"})})
2257 $self->add_constructor("block", sub {my($m)=@_;
2258 (do{IRx1
::Block
->newp($m, irbuild_ir
($m->{"hash"}->{"statementlist"}))})});
2259 $self->add_constructor("plurality_declarator\:multi", sub {my($m)=@_;
2260 (do{{ package blackboard
; use vars
'$plurality'};local $blackboard::plurality
= "multi";
2261 (irbuild_ir
($m->{"hash"}->{"pluralized"}) || irbuild_ir
($m->{"hash"}->{"routine_def"}))})});
2262 $self->add_constructor("routine_declarator\:routine_def", sub {my($m)=@_;
2263 (do{my $scope = $blackboard::scope
;
2264 { package blackboard
; use vars
'$scope'};local $blackboard::scope
;
2265 my $plurality = $blackboard::plurality
;
2266 { package blackboard
; use vars
'$plurality'};local $blackboard::plurality
;
2268 if($m->{"hash"}->{"ident"}) {
2269 (do{($ident = irbuild_ir
($m->{"hash"}->{"ident"}))})
2271 if((($m->{"hash"}->{"ident"} && GLOBAL
::not($scope)))) {
2272 (do{($scope = "our")})
2274 my $sig = IRx1
::Signature
->newp($m, [], GLOBAL
::undef());
2275 if(irbuild_ir
($m->{"hash"}->{"multisig"})) {
2276 (do{($sig = irbuild_ir
($m->{"hash"}->{"multisig"})->[0])})
2278 IRx1
::SubDecl
->newp($m, $scope, GLOBAL
::undef(), $plurality, $ident, $sig, irbuild_ir
($m->{"hash"}->{"trait"}), irbuild_ir
($m->{"hash"}->{"block"}))})});
2279 $self->add_constructor("routine_def", sub {my($m)=@_;
2280 (do{my $scope = $blackboard::scope
;
2281 { package blackboard
; use vars
'$scope'};local $blackboard::scope
;
2282 my $plurality = $blackboard::plurality
;
2283 { package blackboard
; use vars
'$plurality'};local $blackboard::plurality
;
2285 if($m->{"hash"}->{"ident"}) {
2286 (do{($ident = irbuild_ir
($m->{"hash"}->{"ident"}))})
2288 if((($m->{"hash"}->{"ident"} && GLOBAL
::not($scope)))) {
2289 (do{($scope = "our")})
2291 my $sig = IRx1
::Signature
->newp($m, [], GLOBAL
::undef());
2292 if(irbuild_ir
($m->{"hash"}->{"multisig"})) {
2293 (do{($sig = irbuild_ir
($m->{"hash"}->{"multisig"})->[0])})
2295 IRx1
::SubDecl
->newp($m, $scope, GLOBAL
::undef(), $plurality, $ident, $sig, irbuild_ir
($m->{"hash"}->{"trait"}), irbuild_ir
($m->{"hash"}->{"block"}))})});
2296 $self->add_constructor("routine_declarator\:method_def", sub {my($m)=@_;
2297 (do{my $plurality = $blackboard::plurality
;
2298 { package blackboard
; use vars
'$plurality'};local $blackboard::plurality
;
2299 my $multisig = irbuild_ir
($m->{"hash"}->{"multisig"});
2300 if(GLOBAL
::not($multisig)) {
2301 (do{($multisig = [IRx1
::Signature
->newp($m, [], GLOBAL
::undef())])})
2303 IRx1
::MethodDecl
->newp($m, GLOBAL
::undef(), GLOBAL
::undef(), $plurality, irbuild_ir
($m->{"hash"}->{"ident"}), $multisig->[0], irbuild_ir
($m->{"hash"}->{"trait"}), irbuild_ir
($m->{"hash"}->{"block"}))})});
2304 $self->add_constructor("signature", sub {my($m)=@_;
2305 (do{IRx1
::Signature
->newp($m, irbuild_ir
($m->{"hash"}->{"parsep"}), GLOBAL
::undef())})});
2306 $self->add_constructor("parameter", sub {my($m)=@_;
2307 (do{IRx1
::Parameter
->newp($m, irbuild_ir
($m->{"hash"}->{"type_constraint"}), irbuild_ir
($m->{"hash"}->{"quantchar"}), irbuild_ir
($m->{"hash"}->{"param_var"}))})});
2308 $self->add_constructor("param_var", sub {my($m)=@_;
2309 (do{IRx1
::ParamVar
->newp($m, irbuild_ir
($m->{"hash"}->{"sigil"}), irbuild_ir
($m->{"hash"}->{"twigil"}), irbuild_ir
($m->{"hash"}->{"ident"}))})});
2310 $self->add_constructor("capture", sub {my($m)=@_;
2311 (do{if(GLOBAL
::not($m->{"hash"}->{"EXPR"})) {
2312 (do{IRx1
::Capture
->newp($m, [])})
2313 }elsif($m->{"hash"}->{"EXPR"}->{"hash"}->{"noun"}) {
2314 (do{IRx1
::Capture
->newp($m, [irbuild_ir
($m->{"hash"}->{"EXPR"}->{"hash"}->{"noun"})])})
2315 }elsif(($m->{"hash"}->{"EXPR"}->{"hash"}->{"sym"} && ($m->{"hash"}->{"EXPR"}->{"hash"}->{"sym"} eq "\:"))) {
2316 (do{my $args = irbuild_ir
($m->{"hash"}->{"EXPR"}->{"hash"}->{"args"});
2317 my $inv = $args->shift();
2318 IRx1
::Capture
->newp($m, ($args || []), $inv)})
2319 }elsif(($m->{"hash"}->{"EXPR"}->{"hash"}->{"sym"} && ($m->{"hash"}->{"EXPR"}->{"hash"}->{"sym"} eq "\,"))) {
2320 (do{my $args = $m->{"hash"}->{"EXPR"}->{"hash"}->{"args"};
2321 my $arg0 = ($args && $args->[0]);
2322 my $inv = GLOBAL
::undef();
2323 if((($arg0 && $arg0->{"hash"}->{"sym"}) && ($arg0->{"hash"}->{"sym"} eq "\:"))) {
2325 ($inv = $arg0->{"hash"}->{"args"}->[0]);
2326 if($arg0->{"hash"}->{"args"}->[1]) {
2327 (do{$args->unshift($arg0->{"hash"}->{"args"}->[1])})
2330 IRx1
::Capture
->newp($m, (irbuild_ir
($args) || []), irbuild_ir
($inv))})
2332 (do{GLOBAL
::die("capture\ AST\ form\ not\ recognized")})
2334 $self->add_constructor("colonpair", sub {my($m)=@_;
2336 for(($m->{"hash"}->keys())->flatten){
2337 (do{if(($_ ne "match")) {
2339 (do{GLOBAL
::die("Unexpectedly\ more\ than\ 1\ field\ \-\ dont\ know\ which\ to\ choose\
2345 my $one = irbuild_ir
($m->{"hash"}->{$key});
2347 $self->add_constructor("colonpair__false", sub {my($m)=@_;
2348 (do{IRx1
::Pair
->newp($m, irbuild_ir
($m->{"hash"}->{"ident"}), IRx1
::NumInt
->newp($m, 0))})});
2349 $self->add_constructor("colonpair__value", sub {my($m)=@_;
2351 if($m->{"hash"}->{"postcircumfix"}) {
2352 (do{($value = irbuild_ir
($m->{"hash"}->{"postcircumfix"}->{"hash"}->{"kludge_name"}))})
2354 (do{($value = IRx1
::NumInt
->newp($m, 1))})
2356 IRx1
::Pair
->newp($m, irbuild_ir
($m->{"hash"}->{"ident"}), $value)})});
2357 $self->add_constructor("quotepair", sub {my($m)=@_;
2359 for(($m->{"hash"}->keys())->flatten){
2360 (do{if(($_ ne "match")) {
2362 (do{GLOBAL
::die("Unexpectedly\ more\ than\ 1\ field\ \-\ dont\ know\ which\ to\ choose\
2368 my $one = irbuild_ir
($m->{"hash"}->{$key});
2370 $self->add_constructor("quotepair__false", sub {my($m)=@_;
2371 (do{IRx1
::Pair
->newp($m, irbuild_ir
($m->{"hash"}->{"ident"}), IRx1
::NumInt
->newp($m, 0))})});
2372 $self->add_constructor("quotepair__value", sub {my($m)=@_;
2374 if($m->{"hash"}->{"postcircumfix"}) {
2375 (do{($value = irbuild_ir
($m->{"hash"}->{"postcircumfix"}->{"hash"}->{"kludge_name"}))})
2377 (do{($value = IRx1
::NumInt
->newp($m, 1))})
2379 IRx1
::Pair
->newp($m, irbuild_ir
($m->{"hash"}->{"ident"}), $value)})});
2380 $self->add_constructor("quotepair__nth", sub {my($m)=@_;
2381 (do{IRx1
::Pair
->newp($m, "nth", irbuild_ir
($m->{"hash"}->{"n"}))})});
2382 $self->add_constructor("package_declarator\:role", sub {my($m)=@_;
2383 (do{{ package blackboard
; use vars
'$package_declarator'};local $blackboard::package_declarator
= "role";
2384 irbuild_ir
($m->{"hash"}->{"package_def"})})});
2385 $self->add_constructor("package_declarator\:class", sub {my($m)=@_;
2386 (do{{ package blackboard
; use vars
'$package_declarator'};local $blackboard::package_declarator
= "class";
2387 irbuild_ir
($m->{"hash"}->{"package_def"})})});
2388 $self->add_constructor("package_declarator\:module", sub {my($m)=@_;
2389 (do{{ package blackboard
; use vars
'$package_declarator'};local $blackboard::package_declarator
= "module";
2390 irbuild_ir
($m->{"hash"}->{"package_def"})})});
2391 $self->add_constructor("package_declarator\:package", sub {my($m)=@_;
2392 (do{{ package blackboard
; use vars
'$package_declarator'};local $blackboard::package_declarator
= "package";
2393 irbuild_ir
($m->{"hash"}->{"package_def"})})});
2394 $self->add_constructor("package_declarator\:grammar", sub {my($m)=@_;
2395 (do{{ package blackboard
; use vars
'$package_declarator'};local $blackboard::package_declarator
= "grammar";
2396 irbuild_ir
($m->{"hash"}->{"package_def"})})});
2397 $self->add_constructor("package_def", sub {my($m)=@_;
2398 (do{IRx1
::PackageDecl
->newp($m, GLOBAL
::undef(), GLOBAL
::undef(), $blackboard::package_declarator
, irbuild_ir
($m->{"hash"}->{"module_name"})->[0], irbuild_ir
($m->{"hash"}->{"traits"}), irbuild_ir
($m->{"hash"}->{"block"}))})});
2399 $self->add_constructor("fulltypename", sub {my($m)=@_;
2400 (do{irbuild_ir
($m->{"hash"}->{"typename"})->join("\:\:")})});
2401 $self->add_constructor("typename", sub {my($m)=@_;
2402 (do{($m->match_string())})});
2403 $self->add_constructor("trait_verb\:is", sub {my($m)=@_;
2404 (do{IRx1
::Trait
->newp($m, "is", irbuild_ir
($m->{"hash"}->{"ident"}))})});
2405 $self->add_constructor("trait_verb\:does", sub {my($m)=@_;
2406 (do{IRx1
::Trait
->newp($m, "does", irbuild_ir
($m->{"hash"}->{"role_name"}))})});
2407 $self->add_constructor("circumfix\:pblock", sub {my($m)=@_;
2408 (do{if((($m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}->elems() == 0) or $m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}->[0]->match_string()->re_matchp("\^\:"))) {
2409 (do{IRx1
::Hash
->newp($m, irbuild_ir
($m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}))})
2410 }elsif((($m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}->[0]->{"hash"}->{"expr"} and $m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}->[0]->{"hash"}->{"expr"}->{"hash"}->{"sym"}) and ($m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}->[0]->{"hash"}->{"expr"}->{"hash"}->{"sym"} eq "\,"))) {
2411 (do{IRx1
::Hash
->newp($m, irbuild_ir
($m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}))})
2412 }elsif((($m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}->[0]->{"hash"}->{"expr"} and $m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}->[0]->{"hash"}->{"expr"}->{"hash"}->{"sym"}) and ($m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}->[0]->{"hash"}->{"expr"}->{"hash"}->{"sym"} eq "\=\>"))) {
2413 (do{IRx1
::Hash
->newp($m, irbuild_ir
($m->{"hash"}->{"block"}->{"hash"}->{"statementlist"}))})
2414 }elsif((GLOBAL
::not(irbuild_ir
($m->{"hash"}->{"lambda"})) and GLOBAL
::not(irbuild_ir
($m->{"hash"}->{"signature"})))) {
2415 (do{irbuild_ir
($m->{"hash"}->{"block"})})
2417 (do{GLOBAL
::die("AST\ handler\ circumfix\:pblock\ partially\ unimplemented")})
2419 $self->add_constructor("regex_declarator\:regex_def", sub {my($m)=@_;
2420 (do{IRx1
::RegexDef
->newp($m, irbuild_ir
($m->{"hash"}->{"ident"}), irbuild_ir
($m->{"hash"}->{"regex_block"}))})});
2421 $self->add_constructor("regex_block", sub {my($m)=@_;
2422 (do{irbuild_ir
($m->{"hash"}->{"regex"})})});
2423 $self->add_constructor("regex", sub {my($m)=@_;
2424 (do{IRx1
::Regex
->newp($m, irbuild_ir
($m->{"hash"}->{"pattern"}))})});
2425 $self->add_constructor("regex_first", sub {my($m)=@_;
2426 (do{IRx1
::RxFirst
->newp($m, irbuild_ir
($m->{"hash"}->{"patterns"}))})});
2427 $self->add_constructor("regex_every", sub {my($m)=@_;
2428 (do{IRx1
::RxEvery
->newp($m, irbuild_ir
($m->{"hash"}->{"patterns"}))})});
2429 $self->add_constructor("regex_submatch", sub {my($m)=@_;
2430 (do{IRx1
::RxSubmatch
->newp($m, irbuild_ir
($m->{"hash"}->{"patterns"}))})});
2431 $self->add_constructor("regex_any", sub {my($m)=@_;
2432 (do{IRx1
::RxAny
->newp($m, irbuild_ir
($m->{"hash"}->{"patterns"}))})});
2433 $self->add_constructor("regex_all", sub {my($m)=@_;
2434 (do{IRx1
::RxAll
->newp($m, irbuild_ir
($m->{"hash"}->{"patterns"}))})});
2435 $self->add_constructor("regex_sequence", sub {my($m)=@_;
2436 (do{IRx1
::RxSequence
->newp($m, irbuild_ir
($m->{"hash"}->{"patterns"}))})});
2437 $self->add_constructor("regex_quantified_atom", sub {my($m)=@_;
2438 (do{IRx1
::RxQuantifiedAtom
->newp($m, irbuild_ir
($m->{"hash"}->{"regex_atom"}), irbuild_ir
($m->{"hash"}->{"regex_quantifier"}))})});
2439 $self->add_constructor("regex_quantifier", sub {my($m)=@_;
2440 (do{($m->match_string())})});
2441 $self->add_constructor("regex_atom", sub {my($m)=@_;
2443 for(($m->{"hash"}->keys())->flatten){
2444 (do{if(($_ ne "match")) {
2446 (do{GLOBAL
::die("Unexpectedly\ more\ than\ 1\ field\ \-\ dont\ know\ which\ to\ choose\
2452 my $one = irbuild_ir
($m->{"hash"}->{$key});
2453 if(irbuild_ir
($m->{"hash"}->{"char"})) {
2454 (do{IRx1
::RxLiteral
->newp($m, irbuild_ir
($m->{"hash"}->{"char"}), "\'")})
2458 $self->add_constructor("regex_metachar\:regex_backslash", sub {my($m)=@_;
2459 (do{IRx1
::RxBackslash
->newp($m, ($m->match_string()))})});
2460 $self->add_constructor("regex_metachar\:regex_mod_internal", sub {my($m)=@_;
2461 (do{IRx1
::RxModInternal
->newp($m, ($m->match_string()))})});
2462 $self->add_constructor("regex_assertion\:ident", sub {my($m)=@_;
2463 (do{IRx1
::RxAssertion
->newp($m, irbuild_ir
($m->{"hash"}->{"ident"}))})});
2464 $self->add_constructor("regex_metachar\:capture", sub {my($m)=@_;
2465 (do{IRx1
::RxCapture
->newp($m, irbuild_ir
($m->{"hash"}->{"regex"}->{"hash"}->{"pattern"}))})});
2466 $self->add_constructor("regex_metachar\:group", sub {my($m)=@_;
2467 (do{IRx1
::RxGroup
->newp($m, irbuild_ir
($m->{"hash"}->{"regex"}->{"hash"}->{"pattern"}))})});
2468 $self->add_constructor("regex_metachar\:block", sub {my($m)=@_;
2469 (do{IRx1
::RxBlock
->newp($m, irbuild_ir
($m->{"hash"}->{"block"}))})});
2470 $self->add_constructor("regex_metachar\:var", sub {my($m)=@_;
2471 (do{IRx1
::RxBind
->newp($m, irbuild_ir
($m->{"hash"}->{"variable"}), irbuild_ir
($m->{"hash"}->{"binding"}))})});
2472 $self->add_constructor("regex_metachar\:q", sub {my($m)=@_;
2473 (do{IRx1
::RxLiteral
->newp($m, irbuild_ir
($m->{"hash"}->{"text"}), "\'")})});
2474 $self->add_constructor("regex_metachar\:qq", sub {my($m)=@_;
2475 (do{IRx1
::RxLiteral
->newp($m, irbuild_ir
($m->{"hash"}->{"text"}), "\"")})});
2476 $self->add_constructor("regex_metachar", sub {my($m)=@_;
2477 (do{IRx1
::RxSymbol
->newp($m, ($m->match_string()))})});
2483 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
2486 { package IRx1
::CompUnit
;
2487 use base
"Any";(do{sub do_all_analysis
{my $self=CORE
::shift;(do{$self->initialize_notes;
2488 $self->note_parents;
2489 $self->note_block_lexical_variable_decls;
2490 $self->note_environment})}})
2494 { package IRx1
::Base
;
2495 use base
"Any";(do{sub is_IR_node
{my $self=CORE
::shift;(do{1})};
2496 sub initialize_notes
{my $self=CORE
::shift;(do{$self->notes({});
2498 for(($self->field_values)->flatten){
2499 (do{if($_->can("is_IR_node")) {
2501 }elsif(($_->WHAT() eq "Array")) {
2502 (do{for(($_)->flatten){
2503 (do{if($_->can("is_IR_node")) {
2505 }elsif(($_->WHAT() eq "Array")) {
2506 (do{for(($_)->flatten){
2507 (do{if($_->can("is_IR_node")) {
2515 ($self->notes->{'child_nodes'} = $a);
2516 for(($self->child_nodes)->flatten){
2517 (do{$_->initialize_notes()})
2519 sub destroy_notes
{my $self=CORE
::shift;(do{for(($self->notes->{'child_nodes'})->flatten){
2520 (do{$_->destroy_notes()})
2522 $self->notes(GLOBAL
::undef())})};
2523 sub child_nodes
{my $self=CORE
::shift;(do{$self->notes->{'child_nodes'}})}})
2527 { package IRx1
::CompUnit
;
2528 use base
"Any";(do{sub note_parents
{my $self=CORE
::shift;(do{{ package whiteboard
; use vars
'$parent'};local $whiteboard::parent
= $self;
2529 for(($self->child_nodes)->flatten){
2530 (do{$_->note_parents()})
2535 { package IRx1
::Base
;
2536 use base
"Any";(do{sub note_parents
{my $self=CORE
::shift;(do{($self->notes->{'parent'} = $whiteboard::parent
);
2537 { package whiteboard
; use vars
'$parent'};local $whiteboard::parent
= $self;
2538 for(($self->child_nodes)->flatten){
2539 (do{$_->note_parents()})
2544 { package IRx1
::CompUnit_and_Block
;
2545 use base
"Any";(do{sub note_block_lexical_variable_decls
{my $self=CORE
::shift;(do{my $a = [];
2546 { package whiteboard
; use vars
'$lexical_variable_decls'};local $whiteboard::lexical_variable_decls
= $a;
2547 ($self->notes->{'lexical_variable_decls'} = $a);
2548 for(($self->child_nodes)->flatten){
2549 (do{$_->note_block_lexical_variable_decls()})
2554 { package IRx1
::VarDecl
;
2555 use base
"Any";(do{sub note_block_lexical_variable_decls
{my $self=CORE
::shift;(do{if($self->is_lexical) {
2556 (do{$whiteboard::lexical_variable_decls
->push($self)})
2558 ($self->notes->{'is'} = {});
2559 my $traits = ($self->traits || []);
2560 for(($traits)->flatten){
2561 (do{if(($_->verb() eq "is")) {
2562 (do{($self->notes->{'is'}->{$_->expr()} = 1)})
2565 if(((($self->{'var'}->{'twigil'} || "")) eq "\+")) {
2566 (do{($self->notes->{'is'}->{'context'} = 1)})
2568 if(($self->scope() eq "temp")) {
2569 (do{($self->notes->{'is'}->{'temp'} = 1)})
2571 for(($self->child_nodes)->flatten){
2572 (do{$_->note_block_lexical_variable_decls()})
2577 { package IRx1
::SubDecl
;
2578 use base
"Any";(do{sub note_block_lexical_variable_decls
{my $self=CORE
::shift;(do{if($self->name) {
2579 (do{$whiteboard::lexical_variable_decls
->push($self)})
2581 for(($self->child_nodes)->flatten){
2582 (do{$_->note_block_lexical_variable_decls()})
2587 { package IRx1
::Base
;
2588 use base
"Any";(do{sub note_block_lexical_variable_decls
{my $self=CORE
::shift;(do{for(($self->child_nodes)->flatten){
2589 (do{$_->note_block_lexical_variable_decls()})
2594 { package IRx1
::CompUnit
;
2595 use base
"Any";(do{sub note_environment
{my $self=CORE
::shift;(do{{ package whiteboard
; use vars
'$package_chain'};local $whiteboard::package_chain
= [];
2596 { package whiteboard
; use vars
'$lexical_bindings'};local $whiteboard::lexical_bindings
= $self->update_lexical_bindings({}, $self->notes->{'lexical_variable_decls'});
2597 for(($self->child_nodes)->flatten){
2598 (do{$_->note_environment()})
2603 { package IRx1
::Block
;
2604 use base
"Any";(do{sub note_environment
{my $self=CORE
::shift;(do{{ package whiteboard
; use vars
'$lexical_bindings'};local $whiteboard::lexical_bindings
= $self->update_lexical_bindings($whiteboard::lexical_bindings
, $self->notes->{'lexical_variable_decls'});
2605 for(($self->child_nodes)->flatten){
2606 (do{$_->note_environment()})
2611 { package IRx1
::CompUnit_and_Block
;
2612 use base
"Any";(do{sub update_lexical_bindings
{my $self=CORE
::shift;my($h,$decls)=@_;
2613 (do{my $h1 = $h->dup();
2614 for(($decls)->flatten){
2615 (do{my $k = ($_->sigil() . $_->name());
2622 { package IRx1
::PackageDecl
;
2623 use base
"Any";(do{sub note_environment
{my $self=CORE
::shift;(do{my $new_chain;
2624 if($self->path_is_absolute) {
2625 (do{($new_chain = [$self])})
2627 (do{($new_chain = [$whiteboard::package_chain
->flatten(), $self])})
2629 { package whiteboard
; use vars
'$package_chain'};local $whiteboard::package_chain
= $new_chain;
2630 for(($self->child_nodes)->flatten){
2631 (do{$_->note_environment()})
2636 { package IRx1
::SubDecl
;
2637 use base
"Any";(do{sub note_environment
{my $self=CORE
::shift;(do{$self->record_crnt_package;
2638 for(($self->child_nodes)->flatten){
2639 (do{$_->note_environment()})
2644 { package IRx1
::MethodDecl
;
2645 use base
"Any";(do{sub note_environment
{my $self=CORE
::shift;(do{$self->record_crnt_package;
2646 for(($self->child_nodes)->flatten){
2647 (do{$_->note_environment()})
2652 { package IRx1
::Apply
;
2653 use base
"Any";(do{sub note_environment
{my $self=CORE
::shift;(do{($self->notes->{'lexical_bindings'} = $whiteboard::lexical_bindings
);
2654 for(($self->child_nodes)->flatten){
2655 (do{$_->note_environment()})
2660 { package IRx1
::Var
;
2661 use base
"Any";(do{sub note_environment
{my $self=CORE
::shift;(do{my $key = ($self->{'sigil'} . $self->{'name'});
2662 ($self->notes->{'decl'} = $whiteboard::lexical_bindings
->{$key});
2663 if($self->notes->{'decl'}) {
2664 (do{($self->notes->{'is'} = $self->notes->{'decl'}->notes()->{'is'})})
2666 (do{($self->notes->{'is'} = {})})
2668 $self->record_crnt_package;
2669 my $g = $self->name->re_groups("\(\?\:\(\.\+\)\:\:\)\?\(\[\^\:\]\+\)\$");
2670 ($self->notes->{'package'} = ($g->[0] || $self->notes->{'crnt_package'}));
2671 ($self->notes->{'bare_name'} = $g->[1]);
2672 for(($self->child_nodes)->flatten){
2673 (do{$_->note_environment()})
2678 { package IRx1
::Base
;
2679 use base
"Any";(do{sub record_crnt_package
{my $self=CORE
::shift;(do{($self->notes->{'crnt_package_chain'} = $whiteboard::package_chain
);
2680 ($self->notes->{'crnt_package'} = $self->notes->{'crnt_package_chain'}->map(sub {my($n)=@_;
2681 (do{$n->name()})})->join("\:\:"));
2682 if(($self->notes->{'crnt_package_chain'}->elems() == 0)) {
2683 (do{($self->notes->{'crnt_package'} = "Main")})
2688 { package IRx1
::Base
;
2689 use base
"Any";(do{sub note_environment
{my $self=CORE
::shift;(do{for(($self->child_nodes)->flatten){
2690 (do{$_->note_environment()})
2695 { package IRx1
::VarDecl
;
2696 use base
"Any";(do{sub is_lexical
{my $self=CORE
::shift;(do{($self->scope eq "my")})};
2697 sub is_context
{my $self=CORE
::shift;(do{$self->notes->{'is'}->{'context'}})};
2698 sub is_temp
{my $self=CORE
::shift;(do{$self->notes->{'is'}->{'temp'}})};
2699 sub name
{my $self=CORE
::shift;(do{$self->{'var'}->{'name'}})};
2700 sub bare_name
{my $self=CORE
::shift;(do{$self->var()->bare_name()})};
2701 sub package{my $self=CORE
::shift;(do{$self->var()->package()})};
2702 sub crnt_package
{my $self=CORE
::shift;(do{$self->var()->crnt_package()})};
2703 sub sigil
{my $self=CORE
::shift;(do{$self->{'var'}->{'sigil'}})};
2704 sub twigil
{my $self=CORE
::shift;(do{$self->{'var'}->{'twigil'}})};
2705 sub is_scalar
{my $self=CORE
::shift;(do{($self->{'var'}->{'sigil'} eq "\$")})};
2706 sub is_array
{my $self=CORE
::shift;(do{($self->{'var'}->{'sigil'} eq "\@")})};
2707 sub is_hash
{my $self=CORE
::shift;(do{($self->{'var'}->{'sigil'} eq "\%")})}})
2711 { package IRx1
::SubDecl
;
2712 use base
"Any";(do{sub sigil
{my $self=CORE
::shift;(do{"\&"})};
2713 sub twigil
{my $self=CORE
::shift;(do{""})};
2714 sub is_scalar
{my $self=CORE
::shift;(do{GLOBAL
::undef()})};
2715 sub is_array
{my $self=CORE
::shift;(do{GLOBAL
::undef()})};
2716 sub is_hash
{my $self=CORE
::shift;(do{GLOBAL
::undef()})}})
2720 { package IRx1
::Var
;
2721 use base
"Any";(do{sub decl
{my $self=CORE
::shift;(do{$self->notes->{'decl'}})};
2722 sub bare_name
{my $self=CORE
::shift;(do{$self->notes()->{'bare_name'}})};
2723 sub package{my $self=CORE
::shift;(do{$self->notes()->{'package'}})};
2724 sub crnt_package
{my $self=CORE
::shift;(do{$self->notes()->{'crnt_package'}})};
2725 sub is_context
{my $self=CORE
::shift;(do{(((($self->{'twigil'} || "")) eq "\+") || $self->notes->{'is'}->{'context'})})};
2726 sub is_temp
{my $self=CORE
::shift;(do{$self->notes->{'is'}->{'context'}})}})
2730 { package IRx1
::PackageDecl
;
2731 use base
"Any";(do{sub path_is_absolute
{my $self=CORE
::shift;(do{($self->name() && $self->name()->re_matchp("\^GLOBAL\\b"))})}})
2736 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
2739 { package EmitSimpleP5
;
2740 use base
"Any";(do{sub new_emitter
{my $self=CORE
::shift;my($ignore,$compiler,$ignore2,$filename)=@_;
2741 (do{$self->new("compiler", $compiler, "filename", $filename)})};
2742 sub compiler
{ if(@_==2){$_[0]{'compiler'}=$_[1]}else{$_[0]{'compiler'}}};
2743 sub filename
{ if(@_==2){$_[0]{'filename'}=$_[1]}else{$_[0]{'filename'}}};
2744 sub tidy
{my $self=CORE
::shift;my($source)=@_;
2745 (do{GLOBAL
::private_tidy
($source)})};
2746 sub prelude_for_entering_a_package
{my $self=CORE
::shift;(do{""})};
2747 sub prelude_lexical
{my $self=CORE
::shift;(do{"use\ autobox\ ARRAY\ \=\>\ \'ARRAY\'\,\ HASH\ \=\>\ \'HASH\'\,\ CODE\ \=\>\ \'CODE\'\,\ INTEGER\ \=\>\ \'INTEGER\'\,\ FLOAT\ \=\>\ \'FLOAT\'\,\ STRING\ \=\>\ \'STRING\'\,\ UNDEF\ \=\>\ \'UNDEF\'\;\ \ use\ encoding\ \'utf8\'\;\
2749 sub using_Moose
{my $self=CORE
::shift;(do{0})};
2750 sub create_default_for
{my $self=CORE
::shift;my($cls,$field_name,$default)=@_;
2751 (do{(((((("\$Object\:\:DEFAULTS\{" . $cls) . "\}\{\'") . $field_name) . "\'\}\ \=\ sub\ \{") . $default) . "\}\;")})};
2752 sub prelude_oo
{my $self=CORE
::shift;(do{if($self->using_Moose) {
2753 (do{"\{package\ AssertCurrentModuleVersions\;\ \ use\ Moose\ 0\.44\;\ \}"})
2756 \{package\ Object\;\
2757 \ \ \ \ our\ \%DEFAULTS\;\
2758 \ \ \ \ sub\ new\ \{\
2759 \ \ \ \ \ \ \ \ my\ \$self\ \=\ shift\;\
2760 \ \ \ \ \ \ \ \ my\ \$class\ \=\ ref\ \$self\ \|\|\ \$self\;\
2761 \ \ \ \ \ \ \ \ my\ \$obj\ \=\ bless\ \{\@_\}\,\ \$class\;\
2762 \ \ \ \ \ \ \ \ for\ \(keys\ \%\{\$DEFAULTS\{\$class\}\}\)\ \{\
2763 \ \ \ \ \ \ \ \ \ \ \ \ \$obj\-\>\{\$_\}\ \=\ \$DEFAULTS\{\$class\}\{\$_\}\-\>\(\)\ unless\ \$obj\-\>\{\$_\}\;\
2765 \ \ \ \ \ \ \ \ \$obj\;\
2767 \ \ \ \ sub\ become\ \{\
2768 \ \ \ \ \ \ my\(\$self\,\$cls\)\=\@_\;\
2769 \ \ \ \ \ \ bless\ \$self\,\$cls\;\
2774 sub prelude
{my $self=CORE
::shift;my($n)=@_;
2775 (do{((("\#\!\/usr\/bin\/env\ perl\
2777 no\ strict\ \"subs\"\;\ \#\ XXX\ remove\ once\ Type\-names\ are\ quoted\.\ \#\ say\ Int\.isa\(Any\)\
2780 \{package\ AssertCurrentModuleVersions\;\
2781 \ use\ autobox\ 2\.51\;\
2783 \{\ package\ NoSideEffects\;\
2784 \ \ use\ Class\:\:Multimethods\;\
2785 \ \ use\ Data\:\:Dumper\;\
2787 " . $self->prelude_oo()) . $self->prelude_lexical()) . "\
2789 \#\ Workaround\ autobox\ 2\.53\ api\ change\.\ \:\(\
2790 if\(\!defined\(\&autobox\:\:universal\:\:type\)\)\ \{\
2791 \ \ eval\ q\{package\ autobox\:\:universal\;\ sub\ type\ \{\ autobox\-\>type\(\$_\[0\]\)\ \}\}\;\
2793 \{package\ UNDEF\;\ sub\ WHAT\ \{\"Undef\"\}\}\
2794 \{package\ UNIVERSAL\;\ sub\ ref\ \{CORE\:\:ref\(\$_\[0\]\)\ \|\|\ autobox\:\:universal\:\:type\(\$_\[0\]\)\ \}\ \}\ \#\ For\ IRx1_FromAST\.pm\.\
2795 \{package\ UNIVERSAL\;\ sub\ WHAT\ \{CORE\:\:ref\(\$_\[0\]\)\ \|\|\ autobox\:\:universal\:\:type\(\$_\[0\]\)\ \}\ \}\
2797 \{\ package\ UNDEF\;\
2798 \ \ sub\ perl\ \{\ \"undef\"\ \}\
2802 \ \ sub\ can\ \{\ UNIVERSAL\:\:can\(\$_\[0\]\,\$_\[1\]\)\ \}\
2803 \ \ sub\ isa\ \{\ UNIVERSAL\:\:isa\(\$_\[0\]\,\$_\[1\]\)\ \}\
2804 \ \ sub\ does\ \{\ UNIVERSAL\:\:isa\(\$_\[0\]\,\$_\[1\]\)\ \}\
2807 \#\ Avoid\ \"use\ base\"\ error\:\ Base\ class\ package\ \"Xxx\"\ is\ empty\.\ \:\/\
2808 \{\ package\ Num\;\ our\ \$_tell_use_base_i_am_not_empty_\;\ \}\
2809 \{\ package\ Int\;\ our\ \$_tell_use_base_i_am_not_empty_\;\ \}\
2810 \{\ package\ Str\;\ our\ \$_tell_use_base_i_am_not_empty_\;\ \}\
2811 \{\ package\ Array\;\ our\ \$_tell_use_base_i_am_not_empty_\;\ \}\
2812 \{\ package\ Hash\;\ our\ \$_tell_use_base_i_am_not_empty_\;\ \}\
2813 \{\ package\ Code\;\ our\ \$_tell_use_base_i_am_not_empty_\;\ \}\
2815 no\ warnings\ qw\(redefine\ prototype\)\;\
2816 \{\ package\ STRING\;\
2817 \ \ use\ base\ \"Str\"\;\
2818 \ \ sub\ WHAT\ \{\ \"Str\"\ \}\
2820 \ \ sub\ re_matchp\ \{\ \(\$_\[0\]\ \=\~\ m\{\$_\[1\]\}\)\ \?\ 1\ \:\ 0\ \}\
2821 \ \ sub\ re_groups\ \{\
2822 \ \ \ \ my\ \@g\ \=\ \$_\[0\]\ \=\~\ m\{\$_\[1\]\}\;\
2823 \ \ \ \ \@g\ \?\ \\\@g\ \:\ undef\;\
2826 \ \ \#\ randomness\ taken\ from\ autobox\:\:Core\
2828 \ \ sub\ chomp\ \ \ \ \{\ CORE\:\:chomp\(\$_\[0\]\)\;\ \}\
2829 \ \ sub\ chop\ \ \ \ \ \{\ CORE\:\:chop\(\$_\[0\]\)\;\ \}\
2830 \ \ sub\ chr\ \ \ \ \ \ \{\ CORE\:\:chr\(\$_\[0\]\)\;\ \}\
2831 \ \ sub\ crypt\ \ \ \ \{\ CORE\:\:crypt\(\$_\[0\]\,\ \$_\[1\]\)\;\ \}\
2832 \ \ sub\ index\ \ \ \ \{\ CORE\:\:index\(\$_\[0\]\,\ \$_\[1\]\,\ \@_\[2\.\.\ \$\#_\]\)\;\ \}\
2833 \ \ sub\ lc\ \ \ \ \ \ \ \{\ CORE\:\:lc\(\$_\[0\]\)\;\ \}\
2834 \ \ sub\ lcfirst\ \ \{\ CORE\:\:lcfirst\(\$_\[0\]\)\;\ \}\
2836 \ \ sub\ length\ \ \ \{\ CORE\:\:length\(\$_\[0\]\)\;\ \}\
2837 \ \ sub\ bytes\ \ \ \ \{\ use\ bytes\;\ CORE\:\:length\(\$_\[0\]\)\;\ \}\
2838 \ \ sub\ chars\ \ \ \ \{\ CORE\:\:length\(\$_\[0\]\)\;\ \}\
2839 \ \ sub\ codes\ \ \ \ \{\ my\ \@c\ \=\ unpack\(\"U\*\"\,\$_\[0\]\)\;\ 0\+\@c\ \}\
2840 \ \ sub\ graphs\ \ \ \{\ require\ String\:\:Multibyte\;\ String\:\:Multibyte\-\>new\(\"Grapheme\"\)\-\>length\(\$_\[0\]\)\ \}\
2842 \ \ sub\ ord\ \ \ \ \ \ \{\ CORE\:\:ord\(\$_\[0\]\)\;\ \}\
2843 \ \ sub\ pack\ \ \ \ \ \{\ CORE\:\:pack\(\@_\)\;\ \}\
2844 \ \ sub\ reverse\ \ \{\ CORE\:\:reverse\(\$_\[0\]\)\;\ \}\
2845 \ \ sub\ rindex\ \ \ \{\ CORE\:\:rindex\(\$_\[0\]\,\ \$_\[1\]\,\ \@_\[2\.\.\ \$\#_\]\)\;\ \}\
2846 \ \ sub\ sprintf\ \ \{\ CORE\:\:sprintf\(\$_\[0\]\,\ \$_\[1\]\,\ \@_\[2\.\.\ \$\#_\]\)\;\ \}\
2847 \ \ sub\ substr\ \ \ \{\ CORE\:\:substr\(\$_\[0\]\,\ \$_\[1\]\,\ \@_\[2\ \.\.\ \$\#_\]\)\;\ \}\
2848 \ \ sub\ uc\ \ \ \ \ \ \ \{\ CORE\:\:uc\(\$_\[0\]\)\;\ \}\
2849 \ \ sub\ ucfirst\ \ \{\ CORE\:\:ucfirst\(\$_\[0\]\)\;\ \}\
2850 \ \ sub\ unpack\ \ \ \{\ CORE\:\:unpack\(\$_\[0\]\,\ \@_\[1\.\.\$\#_\]\)\;\ \}\
2851 \ \ sub\ quotemet\ \{\ CORE\:\:quotemeta\(\$_\[0\]\)\;\ \}\
2852 \ \ sub\ undef\ \ \ \ \{\ \$_\[0\]\ \=\ undef\ \}\
2853 \ \ sub\ m\ \ \ \ \ \ \ \ \{\ \[\ \$_\[0\]\ \=\~\ m\{\$_\[1\]\}\ \]\ \}\
2854 \ \ sub\ nm\ \ \ \ \ \ \ \ \{\ \[\ \$_\[0\]\ \!\~\ m\{\$_\[1\]\}\ \]\ \}\
2855 \ \ sub\ s\ \ \ \ \ \ \ \ \{\ \$_\[0\]\ \=\~\ s\{\$_\[1\]\}\{\$_\[2\]\}\ \}\
2856 \ \ sub\ split\ \ \ \ \{\ \[\ split\ \$_\[1\]\,\ \$_\[0\]\ \]\ \}\
2858 \ \ sub\ primitive_Num\ \{\ no\ warnings\ \"numeric\"\;\ 0\+\$_\[0\]\ \}\
2861 \{\ package\ FLOAT_and_INTEGER\;\
2862 \ \ use\ base\ \"Num\"\;\
2863 \ \ sub\ abs\ \ \ \{\ CORE\:\:abs\(\$_\[0\]\)\ \}\
2864 \ \ sub\ atan2\ \{\ CORE\:\:atan2\(\$_\[0\]\,\ \$_\[1\]\)\ \}\
2865 \ \ sub\ cos\ \ \ \{\ CORE\:\:cos\(\$_\[0\]\)\ \}\
2866 \ \ sub\ exp\ \ \ \{\ CORE\:\:exp\(\$_\[0\]\)\ \}\
2867 \ \ sub\ int\ \ \ \{\ CORE\:\:int\(\$_\[0\]\)\ \}\
2868 \ \ sub\ log\ \ \ \{\ CORE\:\:log\(\$_\[0\]\)\ \}\
2869 \ \ sub\ oct\ \ \ \{\ CORE\:\:oct\(\$_\[0\]\)\ \}\
2870 \ \ sub\ hex\ \ \ \{\ CORE\:\:hex\(\$_\[0\]\)\;\ \}\
2871 \ \ sub\ rand\ \ \{\ CORE\:\:rand\(\$_\[0\]\)\ \}\
2872 \ \ sub\ sin\ \ \ \{\ CORE\:\:sin\(\$_\[0\]\)\ \}\
2873 \ \ sub\ sqrt\ \ \{\ CORE\:\:sqrt\(\$_\[0\]\)\ \}\
2876 \{\ package\ FLOAT\;\
2877 \ \ use\ base\ \"FLOAT_and_INTEGER\"\;\
2878 \ \ sub\ WHAT\ \{\ \"Num\"\ \}\
2880 \{\ package\ INTEGER\;\
2881 \ \ use\ base\ \"FLOAT_and_INTEGER\"\;\
2882 \ \ use\ base\ \"Int\"\;\
2884 \ \ sub\ WHAT\ \{\ \"Int\"\ \}\
2885 \ \ sub\ to\ \(\$\$\)\ \{\ \$_\[0\]\ \<\ \$_\[1\]\ \?\ \[\$_\[0\]\.\.\$_\[1\]\]\ \:\ \[CORE\:\:reverse\ \$_\[1\]\.\.\$_\[0\]\]\}\
2886 \ \ sub\ upto\ \(\$\$\)\ \{\ \[\ \$_\[0\]\.\.\$_\[1\]\ \]\ \}\
2887 \ \ sub\ downto\ \(\$\$\)\ \{\ \[\ CORE\:\:reverse\ \$_\[1\]\.\.\$_\[0\]\ \]\ \}\
2889 \{\ package\ ARRAY\;\
2890 \ \ use\ base\ \"Array\"\;\
2891 \ \ sub\ WHAT\ \{\"Array\"\}\
2893 \ \ sub\ shape\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ 0\+\@\$a\ \}\ \#\ \?\
2894 \ \ sub\ end\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ \-1\+\@\$a\ \}\ \#\ \?\
2895 \ \ sub\ elems\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ CORE\:\:scalar\ \@\$a\ \}\
2896 \ \ sub\ delete\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ \@_\ \?\ CORE\:\:delete\(\$a\-\>\[\$_\[0\]\]\)\ \:\ undef\ \}\
2897 \ \ sub\ exists\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ \@_\ \?\ CORE\:\:exists\(\$a\-\>\[\$_\[0\]\]\)\ \:\ undef\ \}\
2898 \ \ sub\ pop\ \ \ \{\ CORE\:\:pop\ \@\{\$_\[0\]\}\;\ \}\
2899 \ \ sub\ shift\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ CORE\:\:shift\(\@\$a\)\ \}\
2900 \ \ sub\ push\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ CORE\:\:push\(\@\$a\,\@_\)\;\ \$a\ \}\
2901 \ \ sub\ unshift\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ CORE\:\:unshift\(\@\$a\,\@_\)\ \}\
2902 \ \ sub\ splice\ \{\
2903 \ \ \ \ my\ \$a\ \=\ CORE\:\:shift\;\
2904 \ \ \ \ my\ \$offset\ \=\ CORE\:\:shift\ \|\|\ 0\;\
2905 \ \ \ \ my\ \$size\ \=\ CORE\:\:shift\ \|\|\ 0\;\
2906 \ \ \ \ \[CORE\:\:splice\(\@\{\$a\}\,\$offset\,\$size\,\@_\)\]\
2908 \ \ sub\ keys\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ \[0\.\.\(\@\$a\-1\)\]\ \}\
2909 \ \ sub\ kv\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ my\ \$idx\ \=\ 0\;\ \[map\{\(\$idx\+\+\,\$_\)\}\@\$a\]\ \}\
2910 \ \ sub\ pairs\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ my\ \$idx\ \=\ 0\;\ \[map\{Pair\-\>new\(\"key\"\=\>\$idx\+\+\,\"value\"\=\>\$_\)\}\@\$a\]\ \}\
2911 \ \ sub\ values\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ \@\$a\ \}\
2913 \ \ \#\ Speculative\
2915 \ \ sub\ clone\ \{\ my\ \$a\ \=\ CORE\:\:shift\;\ \[\@\$a\]\ \}\
2919 \ \ sub\ grep\ \ \{\ my\ \$arr\ \=\ CORE\:\:shift\;\ my\ \$sub\ \=\ CORE\:\:shift\;\ \[\ CORE\:\:grep\ \{\ \$sub\-\>\(\$_\)\ \}\ \@\$arr\ \]\;\ \}\
2920 \ \ sub\ join\ \ \{\ my\ \$arr\ \=\ CORE\:\:shift\;\ my\ \$sep\ \=\ CORE\:\:shift\;\ CORE\:\:join\ \$sep\,\ \@\$arr\;\ \}\
2921 \ \ sub\ map\ \ \{\ my\ \$arr\ \=\ CORE\:\:shift\;\ my\ \$sub\ \=\ CORE\:\:shift\;\ \[\ CORE\:\:map\ \{\ \$sub\-\>\(\$_\)\ \}\ \@\$arr\ \]\;\ \}\
2922 \ \ sub\ reverse\ \ \{\ \[\ CORE\:\:reverse\ \@\{\$_\[0\]\}\ \]\ \}\
2923 \ \ sub\ sort\ \ \{\ my\ \$arr\ \=\ CORE\:\:shift\;\ my\ \$sub\ \=\ CORE\:\:shift\(\)\ \|\|\ sub\ \{\ \$a\ cmp\ \$b\ \}\;\ \[\ CORE\:\:sort\ \{\ \$sub\-\>\(\$a\,\ \$b\)\ \}\ \@\$arr\ \]\;\ \}\
2924 \ \ sub\ max\ \{\ my\ \$arr\ \=\ CORE\:\:shift\;\ my\ \$max\ \=\ \$arr\-\>\[0\]\;\ foreach\ \(\@\$arr\)\ \{\$max\ \=\ \$_\ if\ \$_\ \>\ \$max\ \}\;\ \$max\;\ \}\
2925 \ \ sub\ min\ \{\ my\ \$arr\ \=\ CORE\:\:shift\;\ my\ \$min\ \=\ \$arr\-\>\[0\]\;\ foreach\ \(\@\$arr\)\ \{\$min\ \=\ \$_\ if\ \$_\ \<\ \$min\ \}\;\ \$min\;\ \}\
2929 \ \ sub\ flatten\ \ \{\ \(\ \@\{\$_\[0\]\}\ \)\ \}\
2930 \ \ sub\ flatten_recursively\ \{\
2931 \ \ \ \ map\ \{\ my\ \$ref\ \=\ ref\(\$_\)\;\ \(\$ref\ \&\&\ \$ref\ eq\ \"ARRAY\"\)\ \?\ \$_\-\>flatten_recursively\ \:\ \$_\ \}\ \@\{\$_\[0\]\}\
2935 \{\ package\ HASH\;\
2936 \ \ use\ base\ \"Hash\"\;\
2937 \ \ sub\ WHAT\ \{\"Hash\"\}\
2939 \ \ \#\ randomness\ taken\ from\ autobox\:\:Core\
2941 \ \ sub\ delete\ \ \{\ my\ \$hash\ \=\ CORE\:\:shift\;\ my\ \@res\ \=\ \(\)\;\ CORE\:\:foreach\(\@_\)\ \{\ push\ \@res\,\ CORE\:\:delete\ \$hash\-\>\{\$_\}\;\ \}\ CORE\:\:wantarray\ \?\ \@res\ \:\ \\\@res\ \}\
2942 \ \ sub\ exists\ \ \{\ my\ \$hash\ \=\ CORE\:\:shift\;\ CORE\:\:exists\ \$hash\-\>\{\$_\[0\]\}\;\ \}\
2943 \ \ sub\ keys\ \ \{\ \[\ CORE\:\:keys\ \%\{\$_\[0\]\}\ \]\ \}\
2944 \ \ sub\ values\ \ \{\ \[\ CORE\:\:values\ \%\{\$_\[0\]\}\ \]\ \}\
2946 \ \ sub\ each\ \ \{\
2947 \ \ \ \ my\ \$hash\ \=\ CORE\:\:shift\;\
2948 \ \ \ \ my\ \$cb\ \=\ CORE\:\:shift\;\
2949 \ \ \ \ while\(\(my\ \$k\,\ my\ \$v\)\ \=\ CORE\:\:each\(\%\$hash\)\)\ \{\
2950 \ \ \ \ \ \ \$cb\-\>\(\$k\,\ \$v\)\;\
2956 \ \ sub\ kv\ \{\ my\ \$h\ \=\ CORE\:\:shift\;\ \[map\{\(\$_\,\$h\-\>\{\$_\}\)\}\ CORE\:\:keys\ \%\$h\]\ \}\
2957 \ \ sub\ pairs\ \{\ my\ \$h\ \=\ CORE\:\:shift\;\ \[map\{Pair\-\>new\(\"key\"\=\>\$_\,\"value\"\=\>\$h\-\>\{\$_\}\)\}\ CORE\:\:keys\ \%\$h\]\ \}\
2959 \ \ \#\ Speculative\
2962 \ \ \ \ my\ \$h\ \=\ CORE\:\:shift\;\
2963 \ \ \ \ \#\ Do\ not\ simplify\ this\ to\ \"\.\.\.ift\;\ \{\%\$h\}\ \}\"\.\ \ returns\ 0\.\ \ autobox\ issue\?\
2964 \ \ \ \ my\ \$h1\ \=\ \{\%\$h\}\;\ \$h1\
2969 \ \ sub\ dup\ \{\ my\ \$h\ \=\ CORE\:\:shift\;\ my\ \$h1\ \=\ \{\%\$h\}\;\ \$h1\}\ \#\ obsolete\
2971 \{\ package\ CODE\;\
2972 \ \ use\ base\ \"Code\"\;\
2973 \ \ sub\ WHAT\ \{\"Code\"\}\
2978 \{\ package\ Any\;\ sub\ __make_not_empty_for_use_base\{\}\}\
2979 \{\ package\ STRING\;\ use\ base\ \"Any\"\;\}\
2980 \{\ package\ INTEGER\;\ use\ base\ \"Any\"\;\}\
2981 \{\ package\ FLOAT\;\ use\ base\ \"Any\"\;\}\
2982 \{\ package\ ARRAY\;\ use\ base\ \"Any\"\;\}\
2983 \{\ package\ HASH\;\ use\ base\ \"Any\"\;\}\
2984 \{\ package\ CODE\;\ use\ base\ \"Any\"\;\}\
2986 \{\ package\ Private\;\
2987 \ \ \#\ Taken\ from\ Perl6\:\:Take\ 0\.04\.\
2988 \ \ our\ \@GATHER\;\
2989 \ \ sub\ gather\ \(\&\)\ \{local\ \@GATHER\ \=\ \(\@GATHER\,\ \[\]\)\;\ shift\-\>\(\)\;\ \$GATHER\[\-1\]\ \}\
2990 \ \ sub\ take\ \(\@\)\ \{push\ \@\{\ \$GATHER\[\-1\]\ \}\,\ \@_\;\ undef\ \}\
2993 \{\ package\ GLOBAL\;\
2994 \ \ \{\ no\ warnings\;\
2995 \ \ \ \ \*gather\ \=\ \\\&Private\:\:gather\;\
2996 \ \ \ \ \*take\ \ \ \=\ \\\&Private\:\:take\;\}\
2998 \ \ our\ \$a_ARGS\ \=\ \[map\ \{encoding\:\:decode\(\"utf8\"\,\$_\)\}\ \@ARGV\]\;\
3000 \ \ sub\ undef\{undef\}\
3004 \ \ \ \ my\(\$file\)\=\@_\;\
3005 \ \ \ \ local\ \$\/\;\
3006 \ \ \ \ open\(my\ \$fh\,\"\<\:utf8\"\,\$file\)\;\
3007 \ \ \ \ my\ \$s\ \=\ \<\$fh\>\;\
3010 \ \ sub\ unslurp\ \{\
3011 \ \ \ \ my\(\$text\,\$file\)\=\@_\;\
3012 \ \ \ \ open\(my\ \$fh\,\"\>\:utf8\"\,\$file\)\ or\ CORE\:\:die\ \$\!\;\
3013 \ \ \ \ CORE\:\:print\ \$fh\ \$text\;\
3014 \ \ \ \ close\ \$fh\;\
3016 \ \ sub\ file_exists\{\-e\ \$_\[0\]\}\
3017 \ \ sub\ system\{CORE\:\:system\(\@_\)\}\
3018 \ \ sub\ eval_perl5\{\
3019 \ \ \ \ my\(\$p5\,\$env\)\=\@_\;\
3020 \ \ \ \ if\(\$env\)\ \{\ \$env\-\>\(\$p5\)\ \}\
3022 \ \ \ \ \ \ my\ \$code\ \=\ \"package\ Main\;\ \"\.\$p5\;\
3023 \ \ \ \ \ \ my\ \$res\ \=\ eval\(\$code\)\;\ croak\(\$\@\)\ if\ \$\@\;\
3027 \ \ sub\ die\{croak\ \@_\}\
3028 \ \ sub\ exit\{CORE\:\:exit\(\@_\)\}\
3029 \ \ sub\ defined\{CORE\:\:defined\(\$_\[0\]\)\}\
3030 \ \ sub\ substr\ \(\$\$\$\)\{CORE\:\:substr\(\$_\[0\]\,\$_\[1\]\,\$_\[2\]\)\}\
3031 \ \ sub\ not\ \(\$\)\{CORE\:\:not\ \$_\[0\]\}\
3032 \ \ sub\ exec\{CORE\:\:exec\(\@_\)\}\
3033 \ \ sub\ sleep\{CORE\:\:sleep\(\@_\)\}\
3035 \ \ sub\ split\{\[CORE\:\:split\(\$_\[0\]\,\$_\[1\]\)\]\}\
3037 \ \ sub\ unlink\{CORE\:\:unlink\(\@_\)\}\
3038 \ \ sub\ sprintf\{CORE\:\:sprintf\(shift\,\@_\)\}\
3039 \ \ sub\ print\ \{\ CORE\:\:print\ \@_\ \}\
3040 \ \ sub\ quotemeta\ \{\ CORE\:\:quotemeta\(\$_\[0\]\)\ \}\
3042 \ \ sub\ chmod_exe\ \{\ CORE\:\:chmod\(0755\,\$_\[0\]\)\ \}\ \#\ Hack\ for\ Compiler\.\
3044 \ \ sub\ private_tidy\ \{\
3045 \ \ \ \ eval\(\"use\ Perl\:\:Tidy\"\)\;\
3046 \ \ \ \ if\ \(\$\@\)\ \{\ \$_\[0\]\ \}\
3048 \ \ \ \ \ \ my\ \$source\ \=\ \$_\[0\]\;\
3049 \ \ \ \ \ \ my\ \$dest\;\
3050 \ \ \ \ \ \ Perl\:\:Tidy\:\:perltidy\(argv\=\>\[\]\,source\=\>\\\$source\,destination\=\>\\\$dest\)\;\
3051 \ \ \ \ \ \ \$dest\;\
3057 \{\ package\ STRING\;\
3058 \ \ sub\ re_sub\ \ \ \ \ \ \ \ \ \{\
3059 \ \ \ \ my\ \$expr\ \=\ \"\\\$_\[0\]\ \=\~\ s\/\$_\[1\]\/\$_\[2\]\/\"\.\(\$_\[3\]\|\|\"\"\)\;\
3060 \ \ \ \ eval\ \$expr\;\
3061 \ \ \ \ Carp\:\:confess\(\$\@\)\ if\ \$\@\;\
3064 \ \ sub\ re_sub_g\ \(\$\$\$\)\ \{\
3065 \ \ \ \ eval\ \"\\\$_\[0\]\ \=\~\ s\/\$_\[1\]\/\$_\[2\]\/g\"\;\
3066 \ \ \ \ Carp\:\:confess\(\$\@\)\ if\ \$\@\;\
3070 \ \ sub\ re_gsub\ \(\$\$\$\)\ \{\$_\[0\]\ \=\~\ s\/\$_\[1\]\/\$_\[2\]\/g\;\ \$_\[0\]\}\
3073 \{\ package\ GLOBAL\;\
3075 \ \ sub\ parser_name\{\
3076 \ \ \ \ my\ \$e\ \=\ \$ENV\{ELF_STD_RED_RUN\}\;\
3077 \ \ \ \ return\ \$e\ if\ \$e\;\
3078 \ \ \ \ my\ \$f\ \=\ \$0\;\
3079 \ \ \ \ \$f\ \=\~\ s\/\[\^\\\/\]\+\$\/\/\;\
3080 \ \ \ \ \$f\.\"elf_g_src\/STD_red\/STD_red_run\"\
3081 \ \ \ \ \#\ \$f\.\"\.\.\/STD_red\/STD_red_run\"\
3084 \ \ our\ \$a_INC\ \=\ \[\"\.\"\]\;\
3085 \ \ our\ \$h_ENV\ \=\ \\\%ENV\;\
3087 \ \ sub\ module_require\ \{\
3088 \ \ \ \ my\(\$module\)\=\@_\;\
3089 \ \ \ \ my\ \$file\ \=\ find_required_module\(\$module\)\;\
3090 \ \ \ \ \$file\ \|\|\ CORE\:\:die\ \"Cant\ locate\ \$module\ in\ \(\ \"\.CORE\:\:join\(\"\ \"\,\@\$GLOBAL\:\:a_INC\)\.\"\ \)\.\\n\"\;\
3091 \ \ \ \ eval_file\(\$file\)\;\
3093 \ \ sub\ find_required_module\ \{\
3094 \ \ \ \ my\(\$module\)\=\@_\;\
3095 \ \ \ \ my\ \@names\ \=\ \(\$module\,\$module\.\"\.pm\"\,\$module\.\"\.p6\"\)\;\
3096 \ \ \ \ for\ my\ \$dir\ \(\@\$GLOBAL\:\:a_INC\)\ \{\
3097 \ \ \ \ \ \ for\ my\ \$name\ \(\@names\)\ \{\
3098 \ \ \ \ \ \ \ \ my\ \$file\ \=\ \$dir\.\"\/\"\.\$name\;\
3099 \ \ \ \ \ \ \ \ if\(\-f\ \$file\)\ \{\
3100 \ \ \ \ \ \ \ \ \ \ return\ \$file\;\
3104 \ \ \ \ return\ undef\;\
3106 \ \ sub\ import\ \{\
3107 \ \ \ \ my\(\$module\,\@args\)\=\@_\;\
3108 \ \ \ \ my\ \$args\ \=\ \\\@args\;\
3109 \ \ \ \ my\ \$import\ \=\ \"if\(defined\(\&\"\.\$module\.\"\:\:import\)\)\ \{\ \"\.\$module\.\"\-\>import\(\\\$args\)\;\ \}\"\;\
3110 \ \ \ \ my\ \$result\ \=\ eval\ \$import\;\
3111 \ \ \ \ Carp\:\:confess\(\$\@\)\ if\ \$\@\;\
3115 \ \ \ \ my\(\$dir\)\ \=\ \@_\;\
3116 \ \ \ \ mkdir\(\$dir\)\;\
3119 \ \ our\ \$compiler0\;\
3120 \ \ our\ \$compiler1\;\
3121 \ \ our\ \$parser0\;\
3122 \ \ our\ \$parser1\;\
3123 \ \ our\ \$ast2ir_0\;\
3124 \ \ our\ \$ast2ir_1\;\
3125 \ \ our\ \$emitter0\;\
3126 \ \ our\ \$emitter1\;\
3128 \ \ sub\ eval_file\ \{\
3129 \ \ \ \ my\(\$file\)\=\@_\;\
3130 \ \ \ \ \$GLOBAL\:\:compiler0\-\>eval_file\(\$file\)\;\
3132 \ \ sub\ eval_perl6\ \{\
3133 \ \ \ \ my\(\$code\,\$env\)\=\@_\;\
3134 \ \ \ \ \$GLOBAL\:\:compiler0\-\>eval_perl6\(\$code\,\$env\)\;\
3137 \ \ \ \ my\(\$code\,\$env\)\=\@_\;\
3138 \ \ \ \ eval_perl6\(\$code\,\$env\)\;\
3144 sub e
{my $self=CORE
::shift;my($x)=@_;
3145 (do{my $ref = $x->WHAT();
3146 if(($ref eq "Undef")) {
3148 }elsif(((($ref eq "Str") || ($ref eq "Int")) || ($ref eq "Num"))) {
3150 }elsif(($ref eq "Array")) {
3151 (do{$x->map(sub {my($ae)=@_;
3152 (do{$self->e($ae)})})})
3154 (do{$x->callback($self)})
3156 sub cb__CompUnit
{my $self=CORE
::shift;my($n)=@_;
3157 (do{$n->do_all_analysis();
3158 { package whiteboard
; use vars
'$in_package'};local $whiteboard::in_package
= [];
3159 { package whiteboard
; use vars
'$emit_pairs_inline'};local $whiteboard::emit_pairs_inline
= 0;
3160 { package whiteboard
; use vars
'$compunit_footer'};local $whiteboard::compunit_footer
= [];
3161 my $code = (("package\ Main\;\
3162 " . $self->prelude_for_entering_a_package()));
3163 my $stmts = $self->e($n->statements());
3164 my $foot = $whiteboard::compunit_footer
->join("\;\
3166 ((($code . $stmts->join("\;\
3169 sub cb__Block
{my $self=CORE
::shift;my($n)=@_;
3170 (do{{ package whiteboard
; use vars
'$emit_pairs_inline'};local $whiteboard::emit_pairs_inline
= 0;
3171 (("\(do\{" . $self->e($n->statements())->join("\;\
3173 sub cb__Use
{my $self=CORE
::shift;my($n)=@_;
3174 (do{my $module = $self->e($n->module_name());
3175 my $expr = $self->e($n->expr());
3176 if(($module eq "v6\-alpha")) {
3178 }elsif(($module eq "v6")) {
3180 }elsif(($module eq "lib")) {
3181 (do{my $name = $n->expr()->buf();
3182 if($self->compiler->hook_for_use_lib($name)) {
3187 }elsif($self->compiler->hook_for_use($module, $expr)) {
3190 (do{("use\ " . $module)})
3192 sub cb__ClosureTrait
{my $self=CORE
::shift;my($n)=@_;
3193 (do{{ package whiteboard
; use vars
'$emit_pairs_inline'};local $whiteboard::emit_pairs_inline
= 0;
3194 ((($n->kind() . "\{") . $self->e($n->block())) . "\}")})};
3195 sub cb__PackageDecl
{my $self=CORE
::shift;my($n)=@_;
3196 (do{my $in_package = [$whiteboard::in_package
->flatten(), $n->name()];
3197 my $name = $in_package->join("\:\:");
3198 my $base = "use\ base\ \"Any\"\;";
3199 if(($name eq "Any")) {
3202 if(($name eq "Object")) {
3205 if(($name eq "Junction")) {
3209 \{\ package\ " . $name) . "\;\
3214 if($self->using_Moose) {
3215 (do{($head = (($head . "use\ Moose\;") . "\ __PACKAGE__\-\>meta\-\>make_mutable\(\)\;\
3218 __PACKAGE__\-\>meta\-\>make_immutable\(\)\;\
3225 ($head = (($head . $base) . $self->prelude_for_entering_a_package()));
3227 (do{{ package whiteboard
; use vars
'$in_package'};local $whiteboard::in_package
= $in_package;
3228 ((($head . $self->e(($n->traits() || []))->join("\
3229 ")) . $self->e($n->block())) . $foot)})
3231 (do{($whiteboard::in_package
= $in_package);
3232 $whiteboard::compunit_footer
->unshift($foot);
3233 (($head . $self->e(($n->traits() || []))->join("\
3237 sub cb__Trait
{my $self=CORE
::shift;my($n)=@_;
3238 (do{if(((($n->verb() eq "is") or ($n->verb() eq "does")))) {
3239 (do{my $pkgname = $whiteboard::in_package
->join("\:\:");
3240 my $name = (($whiteboard::in_package
->splice(0, (-1))->join("\:\:") . "\:\:") . $self->e($n->expr()));
3241 $name->re_gsub("\^\:\:", "");
3242 (((("BEGIN\{push\(\@" . $pkgname) . "\:\:ISA\,\'") . $name) . "\'\)\;\}\
3245 (do{GLOBAL
::say((("ERROR\:\ Emitting\ p5\ for\ Trait\ verb\ " . $n->verb()) . "\ has\ not\ been\ implemented\.\
3247 "\*\*\*Trait\*\*\*"})
3249 sub do_VarDecl_has
{my $self=CORE
::shift;my($n,$default)=@_;
3250 (do{my $name = $self->e($n->var()->name());
3251 if($self->using_Moose) {
3252 (do{my $dflt = $default;
3254 (do{($dflt = (("\,\ default\ \=\>\ sub\{\ " . $default) . "\ \}"))})
3256 (((("has\ \'" . $name) . "\'\ \=\>\ \(is\ \=\>\ \'rw\'") . $dflt) . "\)\;")})
3258 (do{my $x = (((("\$_\[0\]\{" . "\'") . $name) . "\'") . "\}");
3259 my $code = (((((("sub\ " . $name) . "\ \{\ if\(\@_\=\=2\)\{") . $x) . "\=\$_\[1\]\}else\{") . $x) . "\}\}");
3261 (do{my $pkg = $whiteboard::in_package
->join("\:\:");
3262 ($code = (($code . "\;\
3263 ") . $self->create_default_for($pkg, $name, $default)))})
3267 sub cb__VarDecl
{my $self=CORE
::shift;my($n)=@_;
3268 (do{{ package whiteboard
; use vars
'$emit_pairs_inline'};local $whiteboard::emit_pairs_inline
= 0;
3269 if((($n->scope() eq "has"))) {
3270 (do{my $default = "";
3271 my $default_expr = $self->e($n->default_expr());
3273 (do{($default = $default_expr)})
3275 (do{if((($n->var()->sigil() eq "\@"))) {
3276 (do{($default = "\[\]")})
3278 if((($n->var()->sigil() eq "\%"))) {
3279 (do{($default = "\{\}")})
3282 $self->do_VarDecl_has($n, $default)})
3284 (do{my $default = "";
3285 if($n->default_expr()) {
3286 (do{if((((GLOBAL
::not(($n->var()->sigil() eq "\$")) && $n->default_expr()->isa("IRx1\:\:Apply")) && ((($n->default_expr()->function() eq "circumfix\:\(\ \)") || ($n->default_expr()->function() eq "infix\:\,")))))) {
3289 if($n->is_array()) {
3297 { package whiteboard
; use vars
'$emit_pairs_inline'};local $whiteboard::emit_pairs_inline
= 1;
3298 ($default = ((("\ \=\ " . $pre) . $self->e($n->default_expr())) . $post))})
3300 (do{($default = ("\ \=\ " . $self->e($n->default_expr())))})
3303 (do{if((($n->var()->sigil() eq "\@"))) {
3304 (do{($default = "\ \=\ \[\]\;")})
3306 if((($n->var()->sigil() eq "\%"))) {
3307 (do{($default = "\ \=\ \{\}\;")})
3310 if(($n->is_context())) {
3311 (do{my $name = $self->e($n->var());
3312 $name->re_sub_g("\^\(\.\)\:\:", "\$1");
3313 ((((((("\{package\ main\;\ use\ vars\ \'" . $name) . "\'\}\;") . "local") . "\ ") . $self->e($n->var())) . $default))})
3314 }elsif(($n->is_temp())) {
3315 (do{my $var = $n->var();
3316 my $nam = $self->encode_varname($var->sigil(), $var->twigil(), $var->bare_name());
3317 my $pkg = $n->var()->package();
3318 ((((((((("\{\ package\ " . $pkg) . "\;\ use\ vars\ \'") . $nam) . "\'\}\;") . "local") . "\ ") . $self->e($n->var())) . $default))})
3320 (do{((($n->scope() . "\ ") . $self->e($n->var())) . $default)})
3323 sub multimethods_using_hack
{my $self=CORE
::shift;my($n,$name,$param_types)=@_;
3324 (do{my $name = $self->e($n->name());
3325 my $param_types = $n->multisig()->parameters()->map(sub {my($p)=@_;
3326 (do{my $types = $self->e($p->type_constraints());
3328 (do{if(($types->elems() != 1)) {
3329 (do{GLOBAL
::die("unsupported\:\ parameter\ with\ \!\=1\ type\ constraint\.")})
3333 (do{GLOBAL
::undef()})
3335 my $type0 = $param_types->[0];
3336 if(GLOBAL
::not($type0)) {
3337 (do{GLOBAL
::die((("implementation\ limitation\:\ a\ multi\ method\'s\ first\ parameter\ must\ have\ a\ type\:\ " . $name) . "\
3340 my $stem = (("_mmd__" . $name) . "__");
3341 my $branch_name = ($stem . $type0);
3342 my $setup_name = ("_reset" . $stem);
3344 ($code = ((((((((((((($code . "\
3345 \{\ my\ \$setup\ \=\ sub\ \{\
3346 \ \ \ \ my\ \@meths\ \=\ __PACKAGE__\-\>meta\-\>compute_all_applicable_methods\;\
3347 \ \ \ \ my\ \$h\ \=\ \{\}\;\
3348 \ \ \ \ for\ my\ \$m\ \(\@meths\)\ \{\
3349 \ \ \ \ \ \ next\ if\ not\ \$m\-\>\{name\}\ \=\~\ \/\^") . $stem) . "\(\\w\+\)\/\;\
3350 \ \ \ \ \ \ my\ \$type\ \=\ \$1\;\
3351 \ \ \ \ \ \ \$h\-\>\{\$type\}\ \=\ \$m\-\>\{code\}\{q\{\&\!body\}\}\;\
3353 \ \ \ \ my\ \$s\ \=\ eval\ q\{sub\ \{\
3354 \ \ \ \ \ \ my\ \$ref\ \=\ ref\(\$_\[1\]\)\ \|\|\ \$_\[1\]\-\>WHAT\;\
3355 \ \ \ \ \ \ my\ \$f\ \=\ \$h\-\>\{\$ref\}\;\ goto\ \$f\ if\ \$f\;\
3356 \ \ \ \ \ \ Carp\:\:croak\ \"multi\ method\ ") . $name) . "\ cant\ dispatch\ on\ type\:\ \"\.\$ref\.\"\\n\"\;\
3358 \ \ \ \ die\ \$\@\ if\ \$\@\;\
3359 \ \ \ \ eval\ q\{\{no\ warnings\;\ \*") . $name) . "\ \=\ \$s\;\}\}\;\
3360 \ \ \ \ die\ \$\@\ if\ \$\@\;\
3361 \ \ \ \ goto\ \&") . $name) . "\;\
3363 \ \ eval\ q\{\{no\ warnings\;\ \*") . $setup_name) . "\ \=\ \$setup\;\}\}\;\
3364 \ \ die\ \$\@\ if\ \$\@\;\
3365 \ \ eval\ q\{\{no\ warnings\;\ \*") . $name) . "\ \=\ \$setup\;\}\}\;\
3366 \ \ die\ \$\@\ if\ \$\@\;\
3369 (((((("sub\ " . $branch_name) . "\{my\ \$self\=CORE\:\:shift\;") . $self->e($n->multisig())) . $self->e($n->block())) . "\}") . $code)})};
3370 sub multi_using_CM
{my $self=CORE
::shift;my($n,$is_method,$f_emitted)=@_;
3371 (do{my $name = $self->e($n->name());
3372 my $enc_name = $self->mangle_function_name($name);
3373 my $param_types = $n->multisig()->parameters()->map(sub {my($p)=@_;
3374 (do{my $types = $self->e($p->type_constraints());
3376 (do{if(($types->elems() != 1)) {
3377 (do{GLOBAL
::die("unsupported\:\ parameter\ with\ \!\=1\ type\ constraint\.")})
3384 (do{$param_types->unshift("Any")})
3386 my $sig = $param_types->map(sub {my($t)=@_;
3387 (do{if(($t eq "Any")) {
3389 }elsif(($t eq "Int")) {
3391 }elsif(($t eq "Num")) {
3393 }elsif(($t eq "Str")) {
3398 ((((((("Class\:\:Multimethods\:\:multimethod\ " . $enc_name) . "\ \=\>\ split\(\/\\s\+\/") . "\,\'") . $sig) . "\'\)\ \=\>\ ") . $f_emitted) . "\;")})};
3399 sub cb__MethodDecl
{my $self=CORE
::shift;my($n)=@_;
3401 if((($n->traits() && $n->traits()->[0]->expr()) && ($n->traits()->[0]->expr() eq "p5"))) {
3402 (do{($body = $n->block()->statements()->[0]->buf())})
3404 (do{($body = $self->e($n->block()))})
3406 if(($n->plurality() && ($n->plurality() eq "multi"))) {
3407 (do{my $ef = ((("sub\ \{my\ \$self\=CORE\:\:shift\;" . $self->e($n->multisig())) . $body) . "\}");
3408 $self->multi_using_CM($n, 1, $ef)})
3410 (do{my $enc_name = $self->mangle_function_name($self->e($n->name()));
3411 ((((("sub\ " . $enc_name) . "\{my\ \$self\=CORE\:\:shift\;") . $self->e($n->multisig())) . $body) . "\}")})
3413 sub cb__SubDecl
{my $self=CORE
::shift;my($n)=@_;
3414 (do{{ package whiteboard
; use vars
'$emit_pairs_inline'};local $whiteboard::emit_pairs_inline
= 0;
3415 my $name = $n->name();
3417 (do{($name = $self->e($name))})
3421 my $sig = $n->multisig();
3423 (do{($sig = $self->e($sig))})
3428 if((($n->traits() && $n->traits()->[0]->expr()) && ($n->traits()->[0]->expr() eq "p5"))) {
3429 (do{($body = $n->block()->statements()->[0]->buf())})
3431 (do{($body = $self->e($n->block()))})
3433 if(($n->plurality() && ($n->plurality() eq "multi"))) {
3434 (do{my $ef = ((("sub\ \{" . $sig) . $body) . "\}");
3435 $self->multi_using_CM($n, 0, $ef)})
3437 (do{my $enc_name = $self->mangle_function_name($name);
3438 ((((("sub\ " . $enc_name) . "\{") . $sig) . $body) . "\}")})
3440 sub cb__Signature
{my $self=CORE
::shift;my($n)=@_;
3441 (do{if((($n->parameters()->elems() == 0))) {
3444 (do{{ package whiteboard
; use vars
'$signature_inits'};local $whiteboard::signature_inits
= "";
3445 my $pl = $self->e($n->parameters())->join("\,");
3446 (((("my\(" . $pl) . "\)\=\@_\;") . $whiteboard::signature_inits
) . "\
3449 sub cb__Parameter
{my $self=CORE
::shift;my($n)=@_;
3450 (do{my $enc = $self->e($n->param_var());
3451 if(($n->quant() && ($n->quant() eq "\*"))) {
3452 (do{my $tmp = ("\@" . $n->param_var()->name());
3453 ($whiteboard::signature_inits
= ((((($whiteboard::signature_inits
. "\
3454 my\ ") . $enc) . "\ \=\ \\") . $tmp) . "\;"));
3459 sub cb__ParamVar
{my $self=CORE
::shift;my($n)=@_;
3460 (do{my $s = $n->sigil();
3462 my $dsn = $self->e($n->name());
3463 $self->encode_varname($s, $t, $dsn)})};
3464 sub cb__Call
{my $self=CORE
::shift;my($n)=@_;
3466 { package whiteboard
; use vars
'$emit_pairs_inline'};local $whiteboard::emit_pairs_inline
= 0;
3467 my $method = $self->e($n->method());
3468 if((($method eq "postcircumfix\:\<\ \>"))) {
3469 (do{(((($self->e($n->invocant()) . "\-\>") . "\{\'") . $self->e($n->capture())) . "\'\}")})
3470 }elsif(($g = $method->re_groups("postcircumfix\:\(\.\*\)"))) {
3471 (do{my $op = $g->[0];
3472 my $arg = $self->e($n->capture());
3473 $op->re_gsub("\ ", $arg);
3474 (($self->e($n->invocant()) . "\-\>") . $op)})
3476 (do{((((($self->e($n->invocant()) . "\-\>") . $self->e($n->method())) . "\(") . $self->e($n->capture())) . "\)")})
3478 sub mangle_function_name
{my $self=CORE
::shift;my($name)=@_;
3479 (do{$name->re_sub("\^\(\\w\+\)\:\(\?\!\:\)", "\$\{1\}_");
3480 $name->re_sub("\(\[\^\\w\]\)", "\"_\"\.CORE\:\:ord\(\$1\)", "eg");
3482 sub cb__Apply
{my $self=CORE
::shift;my($n)=@_;
3484 my $fun = $self->e($n->function());
3485 if($n->notes()->{'lexical_bindings'}->{("\&" . $fun)}) {
3486 (do{my $fe = $self->mangle_function_name($fun);
3487 return((((("" . $fe) . "\(") . $self->e($n->capture())) . "\)"))})
3489 if(($g = $fun->re_groups("\^infix\:\(\.\+\)\$"))) {
3490 (do{my $op = $g->[0];
3491 my $args = $n->capture()->arguments();
3492 if(((($args->elems() == 1) && $args->[0]->isa("IRx1\:\:Apply")) && ($args->[0]->function() eq "infix\:\,"))) {
3493 (do{($args = $args->[0]->capture()->arguments())})
3495 my $a = $self->e($args);
3498 if((($op eq "\~"))) {
3499 (do{return((((("\(" . $l) . "\ \.\ ") . $r) . "\)"))})
3501 if((($op eq "\,"))) {
3502 (do{my $s = $a->shift();
3503 while($a->elems()) {
3504 (do{($s = (($s . "\,\ ") . $a->shift()))})
3508 if((($op eq "\="))) {
3509 (do{if($args->[0]->isa("IRx1\:\:Var")) {
3510 (do{my $t = $args->[0]->twigil();
3511 if((($t && ($t eq "\.")))) {
3512 (do{return(((($l . "\(") . $r) . "\)"))})
3515 if((($args->[0]->isa("IRx1\:\:Call") && ($args->[0]->capture()->arguments()->elems() == 0)))) {
3516 (do{return(((((($self->e($args->[0]->invocant()) . "\-\>") . $self->e($args->[0]->method())) . "\(") . $r) . "\)"))})
3519 if($op->re_matchp("\^\(\<\|\>\|\=\=\|\!\=\|eq\|ne\|\\\+\|\-\|\\\*\|\\\/\|\\\|\\\|\|\\\&\\\&\|and\|or\|\=\|\=\~\|\:\=\)\$")) {
3520 (do{return((((((("\(" . $l) . "\ ") . $op) . "\ ") . $r) . "\)"))})
3522 }elsif(($g = $fun->re_groups("\^prefix\:\(\.\+\)\$"))) {
3523 (do{my $op = $g->[0];
3524 my $a = $self->e($n->capture()->arguments());
3527 (do{return((("\(\(" . $x) . "\)\?1\:0\)"))})
3529 if($op->re_matchp("\^\(\-\)\$")) {
3530 (do{return((((("\(" . $op) . "") . $x) . "\)"))})
3532 }elsif(($g = $fun->re_groups("\^statement_prefix\:\(\.\+\)\$"))) {
3533 (do{my $op = $g->[0];
3535 (do{return((("do\{" . $self->e($n->capture()->arguments()->[0])) . "\}"))})
3536 }elsif(($op eq "try")) {
3537 (do{return((("eval\{" . $self->e($n->capture())) . "\}"))})
3538 }elsif(($op eq "gather")) {
3539 (do{return((("GLOBAL\:\:gather" . $self->e($n->capture())) . ""))})
3541 (do{GLOBAL
::die(($fun . "\:\ unimplemented"))})
3543 }elsif(($g = $fun->re_groups("\^postfix\:\(\.\+\)\$"))) {
3544 (do{my $op = $g->[0];
3545 my $a = $self->e($n->capture()->arguments());
3547 if($op->re_matchp("\^\(\\\+\\\+\)\$")) {
3548 (do{return((((("\(" . $x) . "") . $op) . "\)"))})
3550 }elsif(($g = $fun->re_groups("\^circumfix\:\(\.\+\)"))) {
3551 (do{my $op = $g->[0];
3552 if(($op eq "\<\ \>")) {
3553 (do{my $s = $n->capture()->arguments()->[0];
3554 my $words = $s->split(qr/\s+/);
3555 if(($words->elems() == 0)) {
3556 (do{return("\[\]")})
3558 (do{return((("\[\'" . $words->join("\'\,\'")) . "\'\]"))})
3560 }elsif($op->re_matchp("\^\(\\\(\ \\\)\|\\\[\ \\\]\)\$")) {
3561 (do{my $arg = $self->e($n->capture());
3562 return($op->re_gsub("\ ", $arg))})
3564 }elsif((($fun eq "self"))) {
3565 (do{return("\$self")})
3566 }elsif((($fun eq "next"))) {
3567 (do{return("next")})
3568 }elsif((($fun eq "last"))) {
3569 (do{return("last")})
3570 }elsif((($fun eq "return"))) {
3571 (do{return((("return\(" . $self->e($n->capture())) . "\)"))})
3572 }elsif(($fun->re_matchp("\^\\\$\\w\+\$"))) {
3573 (do{return(((($fun . "\-\>\(") . $self->e($n->capture())) . "\)"))})
3574 }elsif(($fun->re_matchp("\^sub\\s\*\{"))) {
3575 (do{return((((("\(" . $fun) . "\)\-\>\(") . $self->e($n->capture())) . "\)"))})
3576 }elsif(($fun eq "eval")) {
3577 (do{my $env = "sub\{my\$s\=eval\(\$_\[0\]\)\;Carp\:\:carp\(\$\@\)if\$\@\;\$s\}";
3578 return((((((("GLOBAL\:\:" . $fun) . "\(") . $self->e($n->capture())) . "\,") . $env) . "\)"))})
3580 if($fun->re_matchp("\^\\w")) {
3581 (do{my $fe = $self->mangle_function_name($fun);
3582 return((((("GLOBAL\:\:" . $fe) . "\(") . $self->e($n->capture())) . "\)"))})
3584 (do{return(((($fun . "\(") . $self->e($n->capture())) . "\)"))})
3586 sub cb__Capture
{my $self=CORE
::shift;my($n)=@_;
3587 (do{my $a = $self->e(($n->arguments() || []))->join("\,");
3588 if($n->invocant()) {
3589 (do{my $inv = $self->e($n->invocant());
3591 (do{(($inv . "\,\ ") . $a)})
3598 sub cb__For
{my $self=CORE
::shift;my($n)=@_;
3600 if(($n->expr()->WHAT() ne "IRx1\:\:Apply")) {
3601 (do{($push = "\-\>flatten")})
3604 if(($n->block()->WHAT() eq "IRx1\:\:SubDecl")) {
3605 (do{($pull = "\-\>\(\$_\)")})
3607 ((((((("for\(\(" . $self->e($n->expr())) . "\)") . $push) . "\)\{\
3608 ") . $self->e($n->block())) . $pull) . "\
3610 sub cb__Cond
{my $self=CORE
::shift;my($n)=@_;
3613 (do{($els = (("else\ \{\
3614 " . $self->e($n->default())) . "\
3617 my $clauses = $self->e($n->clauses());
3618 my $first = $clauses->shift();
3619 my $first_test = $first->[0];
3620 if($n->invert_first_test()) {
3621 (do{($first_test = (("not\(" . $first_test) . "\)"))})
3623 ((((((("if\(" . $first_test) . "\)\ \{\
3624 ") . $first->[1]) . "\
3625 \}") . $clauses->map(sub {my($e)=@_;
3626 (do{(((("elsif\(" . $e->[0]) . "\)\ \{\
3628 \}")})})->join("")) . $els))})};
3629 sub cb__Loop
{my $self=CORE
::shift;my($n)=@_;
3630 (do{(((("while\(" . $self->e($n->pretest())) . "\)\ \{\
3631 ") . $self->e($n->block())) . "\
3633 sub encode_varname
{my $self=CORE
::shift;my($s,$t,$dsn)=@_;
3639 if((($s eq "\$") && ($env eq "x"))) {
3648 my $name = (($env . $pre) . $dsn);
3649 if((($t eq "\."))) {
3650 (do{("\$self\-\>" . $name)})
3651 }elsif((($t eq "\+"))) {
3652 (do{$name->re_gsub("\:\:", "__");
3653 (("\$" . "\:\:") . $name)})
3654 }elsif((($t eq "\*"))) {
3655 (do{$name->re_gsub("\:\:", "__");
3656 (("\$" . "GLOBAL\:\:") . $name)})
3658 (do{("\$" . $name)})
3660 sub cb__Var
{my $self=CORE
::shift;my($n)=@_;
3661 (do{my $s = $n->sigil();
3662 my $t = ($n->twigil() || "");
3663 if($n->is_context()) {
3666 my $dsn = $self->e($n->name());
3667 my $v = (($s . $t) . $dsn);
3668 if(((($v eq "\$\?PACKAGE") || ($v eq "\$\?MODULE")) || ($v eq "\$\?CLASS"))) {
3669 (do{my $pkgname = $whiteboard::in_package
->join("\:\:");
3670 ($pkgname = ($pkgname || "Main"));
3671 (("\'" . $pkgname) . "\'")})
3672 }elsif(($v eq "\$\?FILE")) {
3673 (do{(("\'" . $self->filename) . "\'")})
3674 }elsif(($v eq "\$\?LINE")) {
3676 }elsif(($v eq "\$\?PERLVER")) {
3677 (do{(((("\'elf\ \/\ " . GLOBAL
::primitive_runtime_version
()) . "\ \/\ ") . $self->WHAT) . "\'")})
3679 (do{$self->encode_varname($s, $t, $dsn)})
3681 sub cb__NumInt
{my $self=CORE
::shift;my($n)=@_;
3682 (do{$self->e($n->text())})};
3683 sub cb__Hash
{my $self=CORE
::shift;my($n)=@_;
3684 (do{{ package whiteboard
; use vars
'$emit_pairs_inline'};local $whiteboard::emit_pairs_inline
= 1;
3685 (("\{" . $self->e(($n->hash() || []))->join("\,")) . "\}")})};
3686 sub cb__Buf
{my $self=CORE
::shift;my($n)=@_;
3687 (do{my $s = $n->buf();
3688 (("\"" . GLOBAL
::quotemeta($s)) . "\"")})};
3689 sub cb__Rx
{my $self=CORE
::shift;my($n)=@_;
3690 (do{my $pat = ($n->pat() || "");
3691 (("qr\/" . $pat) . "\/")})};
3692 sub cb__Pair
{my $self=CORE
::shift;my($n)=@_;
3693 (do{if($whiteboard::emit_pairs_inline
) {
3694 (do{{ package whiteboard
; use vars
'$emit_pairs_inline'};local $whiteboard::emit_pairs_inline
= 0;
3695 (((("\(" . $self->e($n->key())) . "\ \=\>\ ") . $self->e($n->value())) . "\)")})
3697 (do{(((("Pair\-\>new\(\'key\'\," . $self->e($n->key())) . "\ \=\>\ \'value\'\,") . $self->e($n->value())) . "\)")})
3701 if(GLOBAL
::not($GLOBAL::emitter0
)) {
3702 (do{($GLOBAL::emitter0
= EmitSimpleP5
->new())})
3704 ($GLOBAL::emitter1
= EmitSimpleP5
->new());
3707 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
3709 sub header
{use Math
::Trig
qw();};
3713 use base
"Any";(do{sub pi
{Math
::Trig
::pi
();}})
3716 ($GLOBAL::PID
= (sub {$$})->());
3719 use base
"Any";(do{sub primitive_runtime_version
{CORE
::sprintf "perl %vd", $^V
}})
3724 (do{sub perl
{my $self=CORE
::shift;(do{($self->WHAT() . "\.new\(\!\!\!\)")})}})
3729 use base
"Any";(do{sub perl
{my $self=CORE
::shift;q{"} . CORE
::quotemeta($self) . q{"}}})
3734 use base
"Any";(do{sub perl
{my $self=CORE
::shift;(do{("" . $self)})}})
3739 use base
"Any";(do{sub perl
{my $self=CORE
::shift;(do{("" . $self)})}})
3744 use base
"Any";(do{sub perl
{my $self=CORE
::shift;(do{(("\[" . $self->map(sub {my($e)=@_;
3745 (do{$e->perl()})})->join("\,")) . "\]")})}})
3750 use base
"Any";(do{sub perl
{my $self=CORE
::shift;(do{(("\{" . $self->keys()->map(sub {my($k)=@_;
3751 (do{(($k->perl() . "\ \=\>\ ") . $self->{$k}->perl())})})->join("\,\ ")) . "\}")})}})
3756 use base
"Any";(do{sub Str
{my $self=CORE
::shift;(do{""})}})
3761 use base
"Any";(do{sub Str
{my $self=CORE
::shift;(do{("" . $self)})}})
3766 use base
"Any";(do{sub rand{my $self=CORE
::shift;my($max)=@_;
3767 CORE
::rand($max||1)};
3768 sub srand{my $self=CORE
::shift;my($seed)=@_;
3769 CORE
::srand($seed)}})
3774 use base
"Any";(do{sub mkdir{my $self=CORE
::shift;my($dirname)=@_;
3775 CORE
::mkdir($dirname)};
3776 sub rmdir{my $self=CORE
::shift;my($dirname)=@_;
3777 CORE
::rmdir($dirname)}})
3782 use base
"Any";(do{sub rmdir{my($dirname)=@_;
3783 CORE
::rmdir($dirname)}})
3788 use base
"Any";(do{Class
::Multimethods
::multimethod prefix__63
=> split(/\s+/,'*') => sub {my($a)=@_;
3790 Class
::Multimethods
::multimethod prefix__33
=> split(/\s+/,'*') => sub {my($a)=@_;
3792 Class
::Multimethods
::multimethod prefix__43
=> split(/\s+/,'*') => sub {my($a)=@_;
3794 Class
::Multimethods
::multimethod prefix__43
=> split(/\s+/,'#') => sub {my($a)=@_;
3796 Class
::Multimethods
::multimethod prefix__43
=> split(/\s+/,'Array') => sub {my($a)=@_;
3797 (do{$a->elems()})};;
3798 Class
::Multimethods
::multimethod prefix__126
=> split(/\s+/,'*') => sub {my($a)=@_;
3800 Class
::Multimethods
::multimethod prefix__126
=> split(/\s+/,'$') => sub {my($a)=@_;
3802 Class
::Multimethods
::multimethod prefix__45
=> split(/\s+/,'#') => sub {my($a)=@_;
3804 Class
::Multimethods
::multimethod prefix__43_43
=> split(/\s+/,'#') => sub {my($a)=@_;
3806 Class
::Multimethods
::multimethod prefix__45_45
=> split(/\s+/,'#') => sub {my($a)=@_;
3808 Class
::Multimethods
::multimethod postfix__43_43
=> split(/\s+/,'#') => sub {my($a)=@_;
3810 Class
::Multimethods
::multimethod postfix__45_45
=> split(/\s+/,'#') => sub {my($a)=@_;
3812 Class
::Multimethods
::multimethod postfix_i
=> split(/\s+/,'#') => sub {my($a)=@_;
3814 Class
::Multimethods
::multimethod infix__43
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3816 Class
::Multimethods
::multimethod infix__42
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3818 Class
::Multimethods
::multimethod infix__42_42
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3820 Class
::Multimethods
::multimethod infix_and
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3822 Class
::Multimethods
::multimethod infix_or
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3824 Class
::Multimethods
::multimethod infix_eq
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3826 Class
::Multimethods
::multimethod infix_ne
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3828 Class
::Multimethods
::multimethod infix__33_61
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3830 Class
::Multimethods
::multimethod infix__61_61
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3832 Class
::Multimethods
::multimethod infix__60
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3834 Class
::Multimethods
::multimethod infix__62
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3836 Class
::Multimethods
::multimethod infix__60_61
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3838 Class
::Multimethods
::multimethod infix__62_61
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3840 Class
::Multimethods
::multimethod infix__60_61_62
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3842 Class
::Multimethods
::multimethod infix_ge
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3844 Class
::Multimethods
::multimethod infix_gt
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3846 Class
::Multimethods
::multimethod infix_le
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3848 Class
::Multimethods
::multimethod infix_lt
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3850 Class
::Multimethods
::multimethod infix_cmp
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3852 Class
::Multimethods
::multimethod infix_xor
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3854 Class
::Multimethods
::multimethod infix__61_61_61
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3855 (do{GLOBAL
::undef()})};;
3856 Class
::Multimethods
::multimethod infix__61_58_61
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3857 (do{GLOBAL
::undef()})};;
3858 Class
::Multimethods
::multimethod infix__94
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3860 Class
::Multimethods
::multimethod infix__46_46
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3862 Class
::Multimethods
::multimethod infix__94_46_46
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3864 Class
::Multimethods
::multimethod infix__46_46_94
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3866 Class
::Multimethods
::multimethod infix__94_46_46_94
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3868 Class
::Multimethods
::multimethod infix__62_62
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3870 Class
::Multimethods
::multimethod infix__60_60
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3872 Class
::Multimethods
::multimethod infix__124
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3874 Class
::Multimethods
::multimethod infix__124_124
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3876 Class
::Multimethods
::multimethod infix__38
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3878 Class
::Multimethods
::multimethod infix__38_38
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3880 Class
::Multimethods
::multimethod infix_58_58_61
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3882 Class
::Multimethods
::multimethod infix__33_126
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3883 (do{GLOBAL
::undef()})};;
3884 Class
::Multimethods
::multimethod infix__126_126
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3885 (do{GLOBAL
::undef()})};;
3886 Class
::Multimethods
::multimethod infix__126_126
=> split(/\s+/,'$ Regexp') => sub {my($a,$b)=@_;
3888 Class
::Multimethods
::multimethod infix_x
=> split(/\s+/,'* *') => sub {my($a,$b)=@_;
3894 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
3898 use base
"Any";(do{sub is_for_active_runtime
{ if(@_==2){$_[0]{'is_for_active_runtime'}=$_[1]}else{$_[0]{'is_for_active_runtime'}}};
3899 sub parse
{my $self=CORE
::shift;my($p6_code,$claim_as_filename)=@_;
3900 (do{my $stem = ("deleteme" . $GLOBAL::PID
);
3901 my $input = ($stem . "\.p6");
3902 my $output = ($stem . "\.dump");
3903 GLOBAL
::unslurp
($p6_code, $input);
3904 my $parser = $self->parser_name();
3905 my $msg = (("Parse\ error\ in\:\ " . $claim_as_filename) . "\
3907 my $cmd = (((((($parser . "\ \-\-error\-message\=\'") . $msg) . "\'\ \-q\ \-\-format\=p5a\ ") . $input) . "\ \>\ ") . $output);
3908 ((GLOBAL
::system($cmd) == 0) or GLOBAL
::die("Parse\ failed\.\
3910 my $dump5 = GLOBAL
::slurp
($output);
3911 my $tree = GLOBAL
::eval_perl5
(("package\ Fastdump\;" . $dump5));
3912 GLOBAL
::unlink($input, $output);
3914 sub parser_name
{my $self=CORE
::shift;(do{GLOBAL
::parser_name
()})}})
3917 GLOBAL
::eval_perl5
("\
3918 \{\ package\ Fastdump\;\
3919 \ \ sub\ match\ \{my\(\$r\,\$s\,\$f\,\$t\,\$h\)\=\@_\;\ Match\-\>make_from_rsfth\(\$r\,\$s\,\$f\,\$t\,\$h\)\}\
3921 if(GLOBAL
::not($GLOBAL::parser0
)) {
3922 (do{($GLOBAL::parser0
= Parser
->new("is_for_active_runtime", 1))})
3924 ($GLOBAL::parser1
= Parser
->new());
3927 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
3931 use base
"Any";(do{sub is_for_active_runtime
{ if(@_==2){$_[0]{'is_for_active_runtime'}=$_[1]}else{$_[0]{'is_for_active_runtime'}}};
3932 sub eval_perl6
{my $self=CORE
::shift;my($code,$env)=@_;
3933 (do{$self->eval_fragment($code, "\-e", 0, $env)})};
3934 sub eval_file
{my $self=CORE
::shift;my($file)=@_;
3935 (do{$self->eval_fragment(GLOBAL
::slurp
($file), $file, 0)})};
3936 sub eval_fragment
{my $self=CORE
::shift;my($code,$filename,$verbose,$env)=@_;
3937 (do{my $p5 = $self->compile_fragment($code, $filename, $verbose);
3938 GLOBAL
::eval_perl5
($p5, $env)})};
3939 sub compile_fragment_cache_get
{my $self=CORE
::shift;my($code,$filename)=@_;
3940 (do{GLOBAL
::undef()})};
3941 sub compile_fragment_cache_set
{my $self=CORE
::shift;my($code,$filename,$value)=@_;
3943 sub dump_IRx1
{my($ast)=@_;
3944 (do{if($ast->isa("IRx1\:\:Base")) {
3945 (do{my $field_names = $ast->field_names();
3946 my $field_values = $ast->field_values();
3948 my $str = ($ast->node_name() . "\(");
3949 while(($i < $field_names->elems())) {
3951 (do{($str = ($str . "\,"))})
3953 ($str = ((($str . $field_names->[$i]) . "\=\>") . dump_IRx1
($field_values->[$i])));
3956 ($str = ($str . "\)"));
3958 }elsif(($ast->WHAT() eq "Array")) {
3959 (do{return((("\[" . $ast->map(sub {my($e)=@_;
3960 (do{dump_IRx1
($e)})})->join("\,")) . "\]"))})
3961 }elsif(($ast->WHAT() eq "Str")) {
3962 (do{return((("\'" . $ast) . "\'"))})
3963 }elsif(($ast->WHAT() eq "Undef")) {
3964 (do{return("undef")})
3968 sub compile_fragment
{my $self=CORE
::shift;my($code,$filename,$verbose)=@_;
3970 my $cached = $self->compile_fragment_cache_get($code, $filename);
3974 (do{{ package main
; use vars
'$irbuilder'};local $main::irbuilder
;
3975 if($self->is_for_active_runtime) {
3976 (do{($tree = $GLOBAL::parser0
->parse($code, $filename));
3977 ($main::irbuilder
= $GLOBAL::ast2ir_0
)})
3979 (do{($tree = $GLOBAL::parser1
->parse($code, $filename));
3980 ($main::irbuilder
= $GLOBAL::ast2ir_1
)})
3983 (do{GLOBAL
::say($tree->match_describe())})
3985 my $ir = $tree->make_ir_from_Match_tree();
3987 (do{GLOBAL
::say($GLOBAL::emitter1
->tidy(dump_IRx1
($ir)))})
3990 if($self->is_for_active_runtime) {
3991 (do{($p5 = (($GLOBAL::emitter0
->prelude_lexical() . $ir->callback($GLOBAL::emitter0
->new_emitter("compiler", $self, "filename", $filename)))))})
3993 (do{($p5 = (($GLOBAL::emitter1
->prelude_lexical() . $ir->callback($GLOBAL::emitter1
->new_emitter("compiler", $self, "filename", $filename)))))})
3996 (do{if($self->is_for_active_runtime) {
3997 (do{GLOBAL
::say($GLOBAL::emitter0
->tidy($p5))})
3999 (do{GLOBAL
::say($GLOBAL::emitter1
->tidy($p5))})
4002 $self->compile_fragment_cache_set($code, $filename, $p5);
4005 sub todo
{ if(@_==2){$_[0]{'todo'}=$_[1]}else{$_[0]{'todo'}}};
4006 $Object::DEFAULTS
{Compiler
}{'todo'} = sub {[]};;
4007 sub compile_executable
{my $self=CORE
::shift;my($sources,$output_file)=@_;
4008 (do{$self->todo([]);
4009 my $p5 = ($self->prelude() . "\
4011 for(($sources)->flatten){
4012 (do{my $code = $_->[0];
4014 my $verbose = $_->[2];
4015 my $more_p5 = $self->compile_fragment($code, $file, $verbose);
4016 while(($self->todo->elems() > 0)) {
4017 (do{my $filename = $self->todo->shift();
4018 my $module_p5 = $self->compile_fragment(GLOBAL
::slurp
($filename), $filename, $verbose);
4019 ($p5 = (($p5 . $module_p5) . "\
4023 ($p5 = (($p5 . $more_p5) . "\
4027 if(($output_file eq "\-")) {
4028 (do{GLOBAL
::say($p5)})
4030 (do{GLOBAL
::unslurp
($p5, $output_file);
4031 GLOBAL
::chmod_exe
($output_file)})
4034 sub prelude
{my $self=CORE
::shift;(do{if($self->is_for_active_runtime) {
4035 (do{$GLOBAL::emitter0
->prelude()})
4037 (do{$GLOBAL::emitter1
->prelude()})
4039 sub hook_for_use_lib
{my $self=CORE
::shift;my($expr)=@_;
4040 (do{$GLOBAL::a_INC
->unshift($expr);
4041 if($self->is_for_active_runtime) {
4046 sub hook_for_use
{my $self=CORE
::shift;my($module,$expr)=@_;
4047 (do{if($self->is_for_active_runtime) {
4048 (do{GLOBAL
::module_require
($module);
4049 GLOBAL
::import
($module, $expr)})
4051 (do{my $filename = (GLOBAL
::find_required_module
($module) || GLOBAL
::die((((("Didnt\ find\ " . $module) . "\ in\ \(\ ") . $GLOBAL::a_INC
->join("\ ")) . "\ \)\.\
4053 $self->todo->push($filename)})
4058 if(GLOBAL
::not($GLOBAL::compiler0
)) {
4059 (do{($GLOBAL::compiler0
= Compiler
->new("is_for_active_runtime", 1))})
4061 ($GLOBAL::compiler1
= Compiler
->new());
4064 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';
4068 use base
"Any";(do{sub print_usage_and_die
{my $self=CORE
::shift;(do{GLOBAL
::say("\
4069 Usage\:\ \[\-v\]\ \[\-s0\|\-s\|\-x\|\-xr\]\ \[\-o\ OUTPUT_FILE\]\ \[\-I\ dir\]\
4070 \ \ \ \ \ \ \ \ \ \[\ P6_FILE\ \|\ \-e\ P6_CODE\ \]\+\ \[\ \-\-\ ARGS\*\ \]\
4072 Unlike\ p5\,\ multiple\ P6_FILE\'s\ and\ \-e\ P6_CODE\'s\ and\ can\ be\ mixed\.\
4073 Use\ \-\-\ to\ stop\.\
4075 \ \-v\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ verbose\.\
4077 \ default\ \ Compile0\ and\ eval\.\
4078 \ \-s0\ \ \ \ \ \ Compile0\ and\ show\ the\ resulting\ framgent\.\
4079 \ \-s\ \ \ \ \ \ \ Compile1\ and\ show\ the\ resulting\ fragment\.\
4080 \ \-x\ \ \ \ \ \ \ Compile1\ to\ an\ executable\ form\.\
4081 \ \-xr\ \ \ \ \ \ Compile1\ to\ an\ executable\ form\,\ and\ run\.\
4084 \ \[\ P6_FILE\ \|\ \-e\ P6_CODE\ \]\+\ \ these\ are\ evaled\,\
4086 \ \[\ P6_FILE\ \|\ \-e\ P6_CODE\ \]\+\ \ these\ are\ compiled\.\
4090 sub main
{my $self=CORE
::shift;my($args)=@_;
4091 (do{if(($args->elems() == 0)) {
4092 (do{$self->print_usage_and_die()})
4098 my $output = sub {my($text)=@_;
4099 (do{if($output_file) {
4100 (do{GLOBAL
::unslurp
($text, $output_file)})
4102 (do{GLOBAL
::say($text)})
4105 my $handle = sub {my($filename,$code)=@_;
4106 (do{if(($mode eq "r")) {
4107 (do{$GLOBAL::compiler0
->eval_fragment($code, $filename, $verbose)})
4108 }elsif((($mode eq "s0") || ($mode eq "s1"))) {
4110 if(($mode eq "s0")) {
4111 (do{($comp = $GLOBAL::compiler0
)})
4113 (do{($comp = $GLOBAL::compiler1
)})
4115 $output->($comp->compile_fragment($code, $filename, $verbose))})
4117 (do{$sources->push([$code, $filename, $verbose])})
4119 my $at_end = sub {(do{if((($mode eq "x") && ($sources->elems() != 0))) {
4120 (do{if(GLOBAL
::not($output_file)) {
4121 (do{($output_file = "\-")})
4123 my $exec_args = $GLOBAL::compiler1
->compile_executable($sources, $output_file)})
4124 }elsif((($mode eq "xr") && ($sources->elems() != 0))) {
4125 (do{if(GLOBAL
::not($output_file)) {
4126 (do{($output_file = "\.\/deleteme_exe")})
4128 my $exec_args = $GLOBAL::compiler1
->compile_executable($sources, $output_file);
4129 GLOBAL
::say(((("\#\ " . $exec_args->join("\ ")) . "\ ") . $args->join("\ ")));
4130 GLOBAL
::exec($exec_args->flatten(), $args)})
4132 while($args->elems()) {
4133 (do{my $arg = $args->shift();
4134 if(($arg eq "\-v")) {
4135 (do{($verbose = 1)})
4136 }elsif(($arg eq "\-s0")) {
4137 (do{($mode = "s0")})
4138 }elsif(($arg eq "\-s")) {
4139 (do{($mode = "s1")})
4140 }elsif(($arg eq "\-x")) {
4142 }elsif(($arg eq "\-xr")) {
4143 (do{($mode = "xr")})
4144 }elsif(($arg eq "\-o")) {
4145 (do{($output_file = ($args->shift() || $self->print_usage_and_die()))})
4146 }elsif(($arg eq "\-e")) {
4147 (do{$GLOBAL::a_INC
->unshift($incs->flatten());
4149 my $p6_code = ($args->shift() || $self->print_usage_and_die());
4150 $handle->("\-e", $p6_code)})
4151 }elsif(GLOBAL
::file_exists
($arg)) {
4152 (do{$GLOBAL::a_INC
->unshift($incs->flatten());
4154 $handle->($arg, GLOBAL
::slurp
($arg))})
4155 }elsif(($arg eq "\-I")) {
4156 (do{my $dir = ($args->shift() || $self->print_usage_and_die());
4158 }elsif(($arg eq "\-\-")) {
4161 (do{$self->print_usage_and_die()})
4167 Program
->new()->main($GLOBAL::a_ARGS
);
4170 use autobox ARRAY
=> 'ARRAY', HASH
=> 'HASH', CODE
=> 'CODE', INTEGER
=> 'INTEGER', FLOAT
=> 'FLOAT', STRING
=> 'STRING', UNDEF
=> 'UNDEF'; use encoding
'utf8';