Legend:
- Unmodified
- Added
- Removed
-
src/perl6/Cursor5.pm
r21128 r21272 19 19 trace_call=> 128, 20 20 cursors => 256, 21 try_processing _in_STD5_dot_pm=> 1024,21 try_processing => 1024, 22 22 mixins => 2048, 23 23 callm_show_subnames => 16384, … … 32 32 } 33 33 34 package Cursor 5;34 package Cursor; 35 35 36 36 use LazyMap qw(lazymap eager); … … 740 740 next; 741 741 } 742 elsif ($s =~ /^Cursor 5::/) {742 elsif ($s =~ /^Cursor::/) { 743 743 next; 744 744 } -
src/perl6/Makefile
r21090 r21272 1 STD 5.pm: STD.pm gimme5 STD5_run Cursor5.pmLazyMap.pm mangle.pl2 ./gimme5 STD.pm >STD 5.pm3 perl -c STD 5.pm1 STD.pmc: STD.pm gimme5 try5 Cursor.pmc LazyMap.pm mangle.pl 2 ./gimme5 STD.pm >STD.pmc 3 perl -c STD.pmc 4 4 rm -rf lex 5 5 # pre-generate common sublexers 6 ./ STD5_runcomp_unit -e 'say "howdy" ~ "";'6 ./try5 comp_unit -e 'say "howdy" ~ "";' -
src/perl6/STD.pm
r21223 r21272 1558 1558 } 1559 1559 1560 rule fulltypename {<typename> 1560 rule fulltypename {<typename>['|'<typename>]* 1561 1561 [ of <fulltypename> ]? 1562 1562 {*} -
src/perl6/STD5_run
r21041 r21272 1 1 #!/usr/local/bin/perl 2 # A script to make running STD 5.pmeasier,2 # A script to make running STD.pmc easier, 3 3 # by providing it input, and isolating it's Match yaml output. 4 4 use strict; … … 35 35 if(-e 'STD.pm' and -e 'gimme5') { # We're in the right place. 36 36 # pretend we're 'make' 37 if(!-e 'STD 5.pm' or38 -M 'STD 5.pm' > -M 'STD.pm' or39 -M 'STD 5.pm' > -M 'gimme5') {40 system("$^X gimme5 $fo STD.pm >STD 5.pm");37 if(!-e 'STD.pmc' or 38 -M 'STD.pmc' > -M 'STD.pm' or 39 -M 'STD.pmc' > -M 'gimme5') { 40 system("$^X gimme5 $fo STD.pm >STD.pmc"); 41 41 system("rm -rf lex"); 42 42 } … … 46 46 #system "$cmd 2>std5.err"; 47 47 unshift(@INC,'.'); 48 require "STD 5.pm";48 require "STD.pmc"; 49 49 my $err = "std5.err"; 50 50 my $perl = Perl->new($input); -
src/perl6/gimme5
r21203 r21272 1 1 #!/usr/local/bin/perl 2 3 # This is a version of "metholate" that spits out Perl 5 instead of Perl 6.4 # If metholate is hacky, I hate to think what this is...5 6 # Note: expects you to pipe STD through cheat first7 2 8 3 use 5.010; … … 239 234 if (s/^\s*grammar (\w+)(?::\w+<.*?>)*(?:\s*is\s+(\w+))?;\n//) { 240 235 $TOP = $PKG = $1; 241 my $extends = $2 // 'Cursor 5';236 my $extends = $2 // 'Cursor'; 242 237 $out .= "package $PKG;\n"; 243 238 $out .= <<"END"; … … 372 367 if (ref \$try eq 'ARRAY') { 373 368 (\$tag, \$try, \$C->{_fate}) = \@\$try; # next candidate fate 374 \$C->deb("Retrying with \$tag \$try") if \$::DEBUG & DEBUG::try_processing _in_STD5_dot_pm;369 \$C->deb("Retrying with \$tag \$try") if \$::DEBUG & DEBUG::try_processing; 375 370 } 376 371 elsif (ref \$try eq 'CODE') { … … 383 378 } 384 379 385 \$C->deb("$name trying \$tag \$try") if \$::DEBUG & DEBUG::try_processing _in_STD5_dot_pm;380 \$C->deb("$name trying \$tag \$try") if \$::DEBUG & DEBUG::try_processing; 386 381 push \@gather, \$C->\$try(\@_); 387 382 } … … 500 495 if ($args =~ s/ *--> *(\w*) *$//) { 501 496 my $pkg = $pkg_really{$1} || "${PKG}::$1"; 502 $coercion = " Cursor 5::lazymap sub { $pkg->coerce(\$_[0]) }, ";497 $coercion = " Cursor::lazymap sub { $pkg->coerce(\$_[0]) }, "; 503 498 } 504 499 $args .= ', '; … … 2126 2121 my ($outer, $inner) = @_; 2127 2122 if ($MAYBACKTRACK) { 2128 "Cursor 5::lazymap(sub { my \$C=\$_[0];\n" .2123 "Cursor::lazymap(sub { my \$C=\$_[0];\n" . 2129 2124 ::indent($inner) . 2130 2125 "\n}, $outer)"; … … 2316 2311 if (ref $try eq 'ARRAY') { 2317 2312 ($tag, $try, $C->{_fate}) = @$try; # next candidate fate 2318 $C->deb("Retrying with $tag $try") if $::DEBUG & DEBUG::try_processing _in_STD5_dot_pm;2313 $C->deb("Retrying with $tag $try") if $::DEBUG & DEBUG::try_processing; 2319 2314 } 2320 2315 elsif (ref $try eq 'CODE') { … … 2330 2325 2331 2326 $result .= <<"END"; 2332 \$C->deb("$altname trying \$tag \$try") if \$::DEBUG & DEBUG::try_processing _in_STD5_dot_pm;2327 \$C->deb("$altname trying \$tag \$try") if \$::DEBUG & DEBUG::try_processing; 2333 2328 push \@gather, (( 2334 2329 @{[ ::indent(join("\n", @result),3) ]} -
src/perl6/tryfile
r21127 r21272 4 4 my $file = shift; 5 5 6 use STD 5;6 use STD; 7 7 use utf8; 8 8 use YAML::XS; -
src/perl6/tryfoo
r20854 r21272 2 2 3 3 BEGIN { $ENV{STD5DEBUG} = 16383; } 4 use STD 5;4 use STD; 5 5 use utf8; 6 6 use YAML::XS;
