- Timestamp:
- 10/07/08 05:14:46 (3 months ago)
- Location:
- misc/elf
- Files:
-
- 8 modified
- 1 copied
-
elf_h (modified) (14 diffs)
-
elf_h_src/CommandLine.pm (modified) (1 diff)
-
elf_h_src/Elf.pm (modified) (1 diff)
-
elf_h_src/Elf_wo_main.pm (copied) (copied from misc/elf/elf_h_src/Elf.pm)
-
elf_h_src/IRx1_Analysis.pm (modified) (5 diffs)
-
elf_h_src/IRx1_FromAST.pm (modified) (4 diffs)
-
elf_h_src/IRx1_FromAST_create.pl (modified) (4 diffs)
-
elf_h_src/Prelude.pm (modified) (2 diffs)
-
elf_h_src/PrimitivesP5.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
misc/elf/elf_h
r22517 r22521 406 406 use autobox ARRAY => 'ARRAY', HASH => 'HASH', CODE => 'CODE', INTEGER => 'INTEGER', FLOAT => 'FLOAT', STRING => 'STRING', UNDEF => 'UNDEF'; use encoding 'utf8'; 407 407 package Main; 408 ; 409 ; 410 ; 411 ; 412 ; 413 ; 414 ; 415 ; 416 ; 417 ; 418 419 ; 420 use autobox ARRAY => 'ARRAY', HASH => 'HASH', CODE => 'CODE', INTEGER => 'INTEGER', FLOAT => 'FLOAT', STRING => 'STRING', UNDEF => 'UNDEF'; use encoding 'utf8'; 421 package Main; 408 422 409 423 { package Bit; … … 732 746 { package Hash; 733 747 use base "Any";(do{sub Str{my $self=CORE::shift;(do{$self->keys()->map(sub {my($k)=@_; 734 (do{(($k . "\ ") . $self->{ '$k'})})})->join("\748 (do{(($k . "\ ") . $self->{$k})})})->join("\ 735 749 ")})}}) 736 750 } … … 748 762 749 763 { package Any; 750 (do{sub true{my $self=CORE::shift;(do{GLOBAL::defined($self)})}}) 764 (do{sub true{my $self=CORE::shift;(do{GLOBAL::defined($self)})}; 765 sub defined{my $self=CORE::shift;(do{GLOBAL::defined($self)})}}) 751 766 } 752 767 ; … … 2225 2240 (do{($els = $els->[0])}) 2226 2241 }; 2227 IRx1::Cond->newp($m, [[irbuild_ir($m->hash()->{"if_expr"}), irbuild_ir($m->hash()->{"if_block"})]]->push(irbuild_ir($m->hash()->{"elsif"})->flatten()), $els )})};2242 IRx1::Cond->newp($m, [[irbuild_ir($m->hash()->{"if_expr"}), irbuild_ir($m->hash()->{"if_block"})]]->push(irbuild_ir($m->hash()->{"elsif"})->flatten()), $els, GLOBAL::undef())})}; 2228 2243 my $construct_elsif = sub {my($m)=@_; 2229 2244 (do{[irbuild_ir($m->hash()->{"elsif_expr"}), irbuild_ir($m->hash()->{"elsif_block"})]})}; … … 2242 2257 $one})}; 2243 2258 my $construct_statement_mod_cond_58if = sub {my($m)=@_; 2244 (do{IRx1::Cond->newp($m, [[irbuild_ir($m->hash()->{"modifier_expr"}), $blackboard::statement_expr]], GLOBAL::undef() )})};2259 (do{IRx1::Cond->newp($m, [[irbuild_ir($m->hash()->{"modifier_expr"}), $blackboard::statement_expr]], GLOBAL::undef(), GLOBAL::undef())})}; 2245 2260 my $construct_statement_control_58unless = sub {my($m)=@_; 2246 2261 (do{IRx1::Cond->newp($m, [[irbuild_ir($m->hash()->{"expr"}), irbuild_ir($m->hash()->{"block"})]], GLOBAL::undef(), 1)})}; … … 2325 2340 (do{IRx1::Signature->newp($m, irbuild_ir($m->hash()->{"parsep"}), GLOBAL::undef())})}; 2326 2341 my $construct_parameter = sub {my($m)=@_; 2327 (do{IRx1::Parameter->newp($m, irbuild_ir($m->hash()->{"type_constraint"}), irbuild_ir($m->hash()->{"quantchar"}), irbuild_ir($m->hash()->{"param_var"}) )})};2342 (do{IRx1::Parameter->newp($m, irbuild_ir($m->hash()->{"type_constraint"}), irbuild_ir($m->hash()->{"quantchar"}), irbuild_ir($m->hash()->{"param_var"}), GLOBAL::undef(), GLOBAL::undef(), GLOBAL::undef(), GLOBAL::undef())})}; 2328 2343 my $construct_param_var = sub {my($m)=@_; 2329 2344 (do{IRx1::ParamVar->newp($m, irbuild_ir($m->hash()->{"sigil"}), irbuild_ir($m->hash()->{"twigil"}), irbuild_ir($m->hash()->{"ident"}))})}; … … 2701 2716 }}) 2702 2717 }; 2703 if(((($self-> {'var'}->{'twigil'}|| "")) eq "\+")) {2718 if(((($self->var()->twigil() || "")) eq "\+")) { 2704 2719 (do{($self->notes->{'is'}->{'context'} = 1)}) 2705 2720 }; … … 2805 2820 2806 2821 { package IRx1::Var; 2807 use base "Any";(do{sub note_environment{my $self=CORE::shift;(do{my $key = ($self-> {'sigil'} . $self->{'name'});2822 use base "Any";(do{sub note_environment{my $self=CORE::shift;(do{my $key = ($self->sigil() . $self->name()); 2808 2823 ($self->notes->{'decl'} = $whiteboard::lexical_bindings->{$key}); 2809 2824 if($self->notes->{'decl'}) { … … 2843 2858 sub is_context{my $self=CORE::shift;(do{$self->notes->{'is'}->{'context'}})}; 2844 2859 sub is_temp{my $self=CORE::shift;(do{$self->notes->{'is'}->{'temp'}})}; 2845 sub name{my $self=CORE::shift;(do{$self-> {'var'}->{'name'}})};2860 sub name{my $self=CORE::shift;(do{$self->var()->name()})}; 2846 2861 sub bare_name{my $self=CORE::shift;(do{$self->var()->bare_name()})}; 2847 2862 sub package{my $self=CORE::shift;(do{$self->var()->package()})}; 2848 2863 sub crnt_package{my $self=CORE::shift;(do{$self->var()->crnt_package()})}; 2849 sub sigil{my $self=CORE::shift;(do{$self-> {'var'}->{'sigil'}})};2850 sub twigil{my $self=CORE::shift;(do{$self-> {'var'}->{'twigil'}})};2851 sub is_scalar{my $self=CORE::shift;(do{($self-> {'var'}->{'sigil'}eq "\$")})};2852 sub is_array{my $self=CORE::shift;(do{($self-> {'var'}->{'sigil'}eq "\@")})};2853 sub is_hash{my $self=CORE::shift;(do{($self-> {'var'}->{'sigil'}eq "\%")})}})2864 sub sigil{my $self=CORE::shift;(do{$self->var()->sigil()})}; 2865 sub twigil{my $self=CORE::shift;(do{$self->var()->twigil()})}; 2866 sub is_scalar{my $self=CORE::shift;(do{($self->var()->sigil() eq "\$")})}; 2867 sub is_array{my $self=CORE::shift;(do{($self->var()->sigil() eq "\@")})}; 2868 sub is_hash{my $self=CORE::shift;(do{($self->var()->sigil() eq "\%")})}}) 2854 2869 } 2855 2870 ; … … 2869 2884 sub package{my $self=CORE::shift;(do{$self->notes()->{'package'}})}; 2870 2885 sub crnt_package{my $self=CORE::shift;(do{$self->notes()->{'crnt_package'}})}; 2871 sub is_context{my $self=CORE::shift;(do{(((($self-> {'twigil'}|| "")) eq "\+") || $self->notes->{'is'}->{'context'})})};2886 sub is_context{my $self=CORE::shift;(do{(((($self->twigil() || "")) eq "\+") || $self->notes->{'is'}->{'context'})})}; 2872 2887 sub is_temp{my $self=CORE::shift;(do{$self->notes->{'is'}->{'temp'}})}}) 2873 2888 } … … 2876 2891 { package IRx1::PackageDecl; 2877 2892 use base "Any";(do{sub path_is_absolute{my $self=CORE::shift;(do{($self->name() && $self->name()->re_matchp("\^GLOBAL\\b"))})}}) 2893 } 2894 ; 2895 2896 { package IRx1::Base; 2897 use base "Any";(do{sub provides_a_list{my $self=CORE::shift;(do{GLOBAL::undef()})}}) 2898 } 2899 ; 2900 2901 { package IRx1::Call; 2902 use base "Any";(do{sub provides_a_list{my $self=CORE::shift;(do{($self->method() eq "flatten")})}}) 2903 } 2904 ; 2905 2906 { package IRx1::Capture; 2907 use base "Any";(do{sub contains_a_list{my $self=CORE::shift;(do{my $found; 2908 $self->arguments->map(sub {my($e)=@_; 2909 (do{if((($e->isa("IRx1\:\:Base") && $e->provides_a_list()))) { 2910 (do{($found = 1)}) 2911 }})}); 2912 $found})}}) 2878 2913 } 2879 2914 ; … … 4055 4090 ; 4056 4091 4092 { package GLOBAL; 4093 use base "Any";(do{sub elf_main{(do{Program->new()->main($GLOBAL::a_ARGS)})}}) 4094 } 4095 ; 4096 4057 4097 ; 4058 4098 use autobox ARRAY => 'ARRAY', HASH => 'HASH', CODE => 'CODE', INTEGER => 'INTEGER', FLOAT => 'FLOAT', STRING => 'STRING', UNDEF => 'UNDEF'; use encoding 'utf8'; … … 4325 4365 } 4326 4366 ; 4327 Program->new()->main($GLOBAL::a_ARGS);4328 4367 4329 4368 ; … … 4331 4370 package Main; 4332 4371 ; 4333 ; 4334 ; 4335 ; 4336 ; 4337 ; 4338 ; 4339 ; 4340 ; 4341 ; 4342 4343 ; 4372 GLOBAL::elf_main(); 4373 4374 ; -
misc/elf/elf_h_src/CommandLine.pm
r22465 r22521 119 119 }; 120 120 121 Program.new().main(@*ARGS); -
misc/elf/elf_h_src/Elf.pm
r20726 r22521 1 use Prelude; 2 use Match; 3 use IRx1_Nodes; 4 use IRx1_FromAST; 5 use IRx1_Analysis; 6 use EmitSimpleP5; 7 use PrimitivesP5; 8 use Parser; 9 use Compiler; 10 use CommandLine; 1 use Elf_wo_main; 2 elf_main(); -
misc/elf/elf_h_src/IRx1_Analysis.pm
r22341 r22521 82 82 } 83 83 } 84 if (self. <var><twigil>||'') eq '+' {$.notes<is><context> = 1}84 if (self.var.twigil||'') eq '+' {$.notes<is><context> = 1} 85 85 if self.scope eq 'temp' {$.notes<is><temp> = 1} 86 86 … … 169 169 class IRx1::Var { 170 170 method note_environment() { 171 my $key = self <sigil> ~ self<name>;171 my $key = self.sigil ~ self.name; 172 172 $.notes<decl> = $whiteboard::lexical_bindings{$key}; 173 173 if $.notes<decl> { … … 204 204 method is_context() { $.notes<is><context> } 205 205 method is_temp() { $.notes<is><temp> } 206 method name () { self. <var><name>}206 method name () { self.var.name } 207 207 method bare_name() { self.var.bare_name } 208 208 method package() { self.var.package } 209 209 method crnt_package() { self.var.crnt_package } 210 method sigil() { self. <var><sigil>}211 method twigil() { self. <var><twigil>}212 method is_scalar() { self. <var><sigil>eq '$' }213 method is_array() { self. <var><sigil>eq '@' }214 method is_hash() { self. <var><sigil>eq '%' }210 method sigil() { self.var.sigil } 211 method twigil() { self.var.twigil } 212 method is_scalar() { self.var.sigil eq '$' } 213 method is_array() { self.var.sigil eq '@' } 214 method is_hash() { self.var.sigil eq '%' } 215 215 } 216 216 class IRx1::SubDecl { … … 226 226 method package() { self.notes<package> } 227 227 method crnt_package() { self.notes<crnt_package> } 228 method is_context() { (self. <twigil>||'') eq '+' || $.notes<is><context> }228 method is_context() { (self.twigil||'') eq '+' || $.notes<is><context> } 229 229 method is_temp() { $.notes<is><temp> } 230 230 } … … 232 232 method path_is_absolute() { self.name && self.name.re_matchp('^GLOBAL\b') } 233 233 } 234 235 class IRx1::Base { 236 method provides_a_list { undef } 237 } 238 class IRx1::Call { 239 method provides_a_list { self.method eq "flatten" } 240 } 241 class IRx1::Capture { 242 method contains_a_list { 243 my $found; 244 $.arguments.map(sub($e){ 245 if ($e.isa('IRx1::Base') && $e.provides_a_list) { $found = 1 }}); 246 $found; 247 } 248 } -
misc/elf/elf_h_src/IRx1_FromAST.pm
r22517 r22521 372 372 my $els = irbuild_ir($m.hash{'else'}); 373 373 if $els { $els = $els[0] } 374 IRx1::Cond.newp($m,[[irbuild_ir($m.hash{'if_expr'}),irbuild_ir($m.hash{'if_block'})]].push(irbuild_ir($m.hash{'elsif'}).flatten),$els );374 IRx1::Cond.newp($m,[[irbuild_ir($m.hash{'if_expr'}),irbuild_ir($m.hash{'if_block'})]].push(irbuild_ir($m.hash{'elsif'}).flatten),$els,undef); 375 375 }; 376 376 … … 394 394 395 395 my $construct_statement_mod_cond_58if = sub ($m) { 396 IRx1::Cond.newp($m,[[irbuild_ir($m.hash{'modifier_expr'}),$blackboard::statement_expr]],undef );396 IRx1::Cond.newp($m,[[irbuild_ir($m.hash{'modifier_expr'}),$blackboard::statement_expr]],undef,undef); 397 397 }; 398 398 … … 500 500 501 501 my $construct_parameter = sub ($m) { 502 IRx1::Parameter.newp($m,irbuild_ir($m.hash{'type_constraint'}),irbuild_ir($m.hash{'quantchar'}),irbuild_ir($m.hash{'param_var'}) );502 IRx1::Parameter.newp($m,irbuild_ir($m.hash{'type_constraint'}),irbuild_ir($m.hash{'quantchar'}),irbuild_ir($m.hash{'param_var'}),undef,undef,undef,undef); 503 503 }; 504 504 … … 753 753 method init { 754 754 755 756 $.add_constructor('comp_unit', $construct_comp_unit); 757 755 $.add_constructor('comp_unit', $construct_comp_unit); 758 756 $.add_constructor('statement', $construct_statement); 759 760 757 $.add_constructor('expect_infix', $construct_expect_infix); 761 762 758 $.add_constructor('fatarrow', $construct_fatarrow); 763 764 759 $.add_constructor('expect_term', $construct_expect_term); 765 766 760 $.add_constructor('term:expect_term', $construct_term_58expect_term); 767 768 761 $.add_constructor('post', $construct_post); 769 770 762 $.add_constructor('pre', $construct_pre); 771 772 763 $.add_constructor('dotty:methodop', $construct_dotty_58methodop); 773 774 764 $.add_constructor('dotty:.^!', $construct_dotty_58_46_94_33); 775 776 765 $.add_constructor('dotty:postcircumfix', $construct_dotty_58postcircumfix); 777 778 766 $.add_constructor('postcircumfix', $construct_postcircumfix); 779 780 767 $.add_constructor('postfix', $construct_postfix); 781 782 768 $.add_constructor('prefix', $construct_prefix); 783 784 769 $.add_constructor('infix', $construct_infix); 785 786 770 $.add_constructor('term', $construct_term); 787 788 771 $.add_constructor('integer', $construct_integer); 789 790 772 $.add_constructor('subcall', $construct_subcall); 791 792 773 $.add_constructor('name', $construct_name); 793 794 774 $.add_constructor('subshortname', $construct_subshortname); 795 796 775 $.add_constructor('statement_control:use', $construct_statement_control_58use); 797 798 776 $.add_constructor('module_name:depreciated', $construct_module_name_58depreciated); 799 800 777 $.add_constructor('module_name:normal', $construct_module_name_58normal); 801 802 778 $.add_constructor('role_name', $construct_role_name); 803 804 779 $.add_constructor('statement_control:BEGIN', $construct_statement_control_58BEGIN); 805 806 780 $.add_constructor('term:listop', $construct_term_58listop); 807 808 781 $.add_constructor('quote:q', $construct_quote_58q); 809 810 782 $.add_constructor('quote:qq', $construct_quote_58qq); 811 812 783 $.add_constructor('quote:regex', $construct_quote_58regex); 813 814 784 $.add_constructor('scope_declarator:my', $construct_scope_declarator_58my); 815 816 785 $.add_constructor('scope_declarator:has', $construct_scope_declarator_58has); 817 818 786 $.add_constructor('scope_declarator:our', $construct_scope_declarator_58our); 819 820 787 $.add_constructor('scope_declarator:temp', $construct_scope_declarator_58temp); 821 822 788 $.add_constructor('scoped', $construct_scoped); 823 824 789 $.add_constructor('variable_decl', $construct_variable_decl); 825 826 790 $.add_constructor('variable', $construct_variable); 827 828 791 $.add_constructor('sigil', $construct_sigil); 829 830 792 $.add_constructor('twigil', $construct_twigil); 831 832 793 $.add_constructor('special_variable', $construct_special_variable); 833 834 794 $.add_constructor('circumfix', $construct_circumfix); 835 836 795 $.add_constructor('statement_control:for', $construct_statement_control_58for); 837 838 796 $.add_constructor('statement_mod_loop:for', $construct_statement_mod_loop_58for); 839 840 797 $.add_constructor('statement_control:while', $construct_statement_control_58while); 841 842 798 $.add_constructor('statement_mod_loop:while', $construct_statement_mod_loop_58while); 843 844 799 $.add_constructor('statement_control:until', $construct_statement_control_58until); 845 846 800 $.add_constructor('statement_mod_loop:until', $construct_statement_mod_loop_58until); 847 848 801 $.add_constructor('statement_control:loop', $construct_statement_control_58loop); 849 850 802 $.add_constructor('statement_control:if', $construct_statement_control_58if); 851 852 803 $.add_constructor('elsif', $construct_elsif); 853 854 804 $.add_constructor('if__else', $construct_if__else); 855 856 805 $.add_constructor('statement_mod_cond:if', $construct_statement_mod_cond_58if); 857 858 806 $.add_constructor('statement_control:unless', $construct_statement_control_58unless); 859 860 807 $.add_constructor('statement_mod_cond:unless', $construct_statement_mod_cond_58unless); 861 862 808 $.add_constructor('statement_control:given', $construct_statement_control_58given); 863 864 809 $.add_constructor('statement_mod_loop:given', $construct_statement_mod_loop_58given); 865 866 810 $.add_constructor('statement_control:when', $construct_statement_control_58when); 867 868 811 $.add_constructor('statement_mod_cond:when', $construct_statement_mod_cond_58when); 869 870 812 $.add_constructor('statement_control:default', $construct_statement_control_58default); 871 872 813 $.add_constructor('statement_prefix:do', $construct_statement_prefix_58do); 873 874 814 $.add_constructor('statement_prefix:try', $construct_statement_prefix_58try); 875 876 815 $.add_constructor('statement_prefix:gather', $construct_statement_prefix_58gather); 877 878 816 $.add_constructor('statement_prefix:contend', $construct_statement_prefix_58contend); 879 880 817 $.add_constructor('statement_prefix:async', $construct_statement_prefix_58async); 881 882 818 $.add_constructor('statement_prefix:lazy', $construct_statement_prefix_58lazy); 883 884 819 $.add_constructor('pblock', $construct_pblock); 885 886 820 $.add_constructor('block', $construct_block); 887 888 821 $.add_constructor('plurality_declarator:multi', $construct_plurality_declarator_58multi); 889 890 822 $.add_constructor('routine_declarator:routine_def', $construct_routine_declarator_58routine_def); 891 892 823 $.add_constructor('routine_def', $construct_routine_def); 893 894 824 $.add_constructor('routine_declarator:method_def', $construct_routine_declarator_58method_def); 895 896 825 $.add_constructor('signature', $construct_signature); 897 898 826 $.add_constructor('parameter', $construct_parameter); 899 900 827 $.add_constructor('param_var', $construct_param_var); 901 902 828 $.add_constructor('capture', $construct_capture); 903 904 829 $.add_constructor('colonpair', $construct_colonpair); 905 906 830 $.add_constructor('colonpair__false', $construct_colonpair__false); 907 908 831 $.add_constructor('colonpair__value', $construct_colonpair__value); 909 910 832 $.add_constructor('quotepair', $construct_quotepair); 911 912 833 $.add_constructor('quotepair__false', $construct_quotepair__false); 913 914 834 $.add_constructor('quotepair__value', $construct_quotepair__value); 915 916 835 $.add_constructor('quotepair__nth', $construct_quotepair__nth); 917 918 836 $.add_constructor('package_declarator:role', $construct_package_declarator_58role); 919 920 837 $.add_constructor('package_declarator:class', $construct_package_declarator_58class); 921 922 838 $.add_constructor('package_declarator:module', $construct_package_declarator_58module); 923 924 839 $.add_constructor('package_declarator:package', $construct_package_declarator_58package); 925 926 840 $.add_constructor('package_declarator:grammar', $construct_package_declarator_58grammar); 927 928 841 $.add_constructor('package_def', $construct_package_def); 929 930 842 $.add_constructor('fulltypename', $construct_fulltypename); 931 932 843 $.add_constructor('typename', $construct_typename); 933 934 844 $.add_constructor('trait_verb:is', $construct_trait_verb_58is); 935 936 845 $.add_constructor('trait_verb:does', $construct_trait_verb_58does); 937 938 846 $.add_constructor('circumfix:pblock', $construct_circumfix_58pblock); 939 940 847 $.add_constructor('regex_declarator:regex_def', $construct_regex_declarator_58regex_def); 941 942 848 $.add_constructor('regex_block', $construct_regex_block); 943 944 849 $.add_constructor('regex', $construct_regex); 945 946 850 $.add_constructor('regex_first', $construct_regex_first); 947 948 851 $.add_constructor('regex_every', $construct_regex_every); 949 950 852 $.add_constructor('regex_submatch', $construct_regex_submatch); 951 952 853 $.add_constructor('regex_any', $construct_regex_any); 953 954 854 $.add_constructor('regex_all', $construct_regex_all); 955 956 855 $.add_constructor('regex_sequence', $construct_regex_sequence); 957 958 856 $.add_constructor('regex_quantified_atom', $construct_regex_quantified_atom); 959 960 857 $.add_constructor('regex_quantifier', $construct_regex_quantifier); 961 962 858 $.add_constructor('regex_atom', $construct_regex_atom); 963 964 859 $.add_constructor('regex_metachar:regex_backslash', $construct_regex_metachar_58regex_backslash); 965 966 860 $.add_constructor('regex_metachar:regex_mod_internal', $construct_regex_metachar_58regex_mod_internal); 967 968 861 $.add_constructor('regex_assertion:ident', $construct_regex_assertion_58ident); 969 970 862 $.add_constructor('regex_metachar:capture', $construct_regex_metachar_58capture); 971 972 863 $.add_constructor('regex_metachar:group', $construct_regex_metachar_58group); 973 974 864 $.add_constructor('regex_metachar:block', $construct_regex_metachar_58block); 975 976 865 $.add_constructor('regex_metachar:var', $construct_regex_metachar_58var); 977 978 866 $.add_constructor('regex_metachar:q', $construct_regex_metachar_58q); 979 980 867 $.add_constructor('regex_metachar:qq', $construct_regex_metachar_58qq); 981 982 868 $.add_constructor('regex_metachar', $construct_regex_metachar); 983 869 984 self;870 self; 985 871 }; # end init 986 872 }; -
misc/elf/elf_h_src/IRx1_FromAST_create.pl
r22517 r22521 279 279 my $els = $m<else>; 280 280 if $els { $els = $els[0] } 281 Cond.newp([[$m<if_expr>,$m<if_block>]].push($m<elsif>.flatten),$els )281 Cond.newp([[$m<if_expr>,$m<if_block>]].push($m<elsif>.flatten),$els,undef) 282 282 283 283 elsif … … 288 288 289 289 statement_mod_cond:if 290 Cond.newp([[$m<modifier_expr>,$blackboard::statement_expr]],undef )290 Cond.newp([[$m<modifier_expr>,$blackboard::statement_expr]],undef,undef) 291 291 292 292 statement_control:unless … … 378 378 379 379 parameter 380 Parameter.newp($m<type_constraint>,$m<quantchar>,$m<param_var> )380 Parameter.newp($m<type_constraint>,$m<quantchar>,$m<param_var>,undef,undef,undef,undef) 381 381 382 382 param_var … … 673 673 }; 674 674 END 675 $init .= " \n".unindent(<<" END"," ");675 $init .= "".unindent(<<" END"," "); 676 676 \$.add_constructor('$name', \$construct_$fname); 677 677 END -
misc/elf/elf_h_src/Prelude.pm
r22307 r22521 124 124 class Str { method Str () { self } } 125 125 class Array { method Str () { self.join('') } } 126 class Hash { method Str () { self.keys.map(sub($k){$k~"\t"~self <$k>}).join("\n") } }126 class Hash { method Str () { self.keys.map(sub($k){$k~"\t"~self{$k}}).join("\n") } } 127 127 class Pair { method Str () { $.key~"\t"~$.value } } 128 128 … … 135 135 class Any { 136 136 method true() { defined(self) } 137 method defined { defined(self) } 137 138 } 138 139 -
misc/elf/elf_h_src/PrimitivesP5.pm
r22273 r22521 135 135 136 136 } 137 138 # Elf 139 package GLOBAL { 140 sub elf_main () { Program.new().main(@*ARGS); } 141 }
