Skip to content

Commit

Permalink
recompile with version 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fglock committed Apr 20, 2011
1 parent 654999b commit 09792a1
Show file tree
Hide file tree
Showing 37 changed files with 2,478 additions and 2,548 deletions.
13 changes: 8 additions & 5 deletions ChangeLog
@@ -1,9 +1,6 @@
dev version - 2011-04-30
- supported backends: Perl 5, Python 2, Javascript
- backends pending upgrade to the new AST: Go, Common Lisp, Ruby 1.9, Eval
- backends not supported in this version: Parrot, Rakudo, Clojure
7.0 2011-04-20
- supported backends: Perl 5, Python 2.6, Javascript

- new option "-Bipy", run in .Net using Iron Python
- added "perlito" command-line compiler and shell
- new distribution "v6.pm" (Perlito in Perl 5)
This replaces Pugs::Compiler::Perl5 as the v6.pm compiler in CPAN.
Expand All @@ -13,6 +10,12 @@ dev version - 2011-04-30
- several fixes in List, Hash, Array, Block, Bool, Str, Mu
- operators: numeric autoincrements, defined-or, range

Regressions:

- removed '-B' command line flag
- backends pending upgrade to the new AST: Go, Common Lisp, Ruby 1.9, Eval
- backends not supported in this version: Parrot, Rakudo, Clojure

6.0 2010-07-27
- Ruby backend bootstrap.
- more tests
Expand Down
138 changes: 20 additions & 118 deletions README
Expand Up @@ -9,9 +9,7 @@ Backends

Perl 5, Javascript, Python 2.6

Previous versions of Perlito also compile to:

Go, Common Lisp, and Ruby 1.9
Previous versions of Perlito also compile to: Go, Common Lisp, and Ruby 1.9

Web

Expand All @@ -30,37 +28,27 @@ USING PERLITO

Using the Javascript backend in the browser

Open the file 'perlito.html' in a browser (Firefox, Chrome, or Safari).
Open the file 'perlito.html' in a browser (Firefox, Chrome, Safari).

Alternately, browse to:

http://perlcabal.org/~fglock/perlito.html

Using the Javascript backend in the command line

Executing from the command line requires Perl 5 and a javascript compiler (V8, SpiderMonkey, or Rhino):

perl perlito.pl -Bv8 -e 'class Main { say "hello, World!" }'

perl perlito.pl -Brhino -e 'class Main { say "hello, World!" }'
export PERL5LIB=lib5
perl perlito.pl -Cjs -e 'class Main { say "hello, World!" }' > tmp.js
d8 tmp.js

Creating a bootstrapped compiler:

# compile util/perlito.pl to Javascript, using perlito.pl:
perl perlito.pl -Bperl5 util/perlito.pl -Cjs util/perlito.pl > util-js/perlito.js
export PERL5LIB=lib5
perl perlito.pl -Cjs util/perlito.pl > util-js/perlito.js

# testing the bootstrap with the v8 developer shell
d8 util-js/perlito.js -- -Cjs util/perlito.pl > perlito-new.js

# testing the bootstrap with Rhino
java org.mozilla.javascript.tools.shell.Main util-js/perlito.js -Cjs util/perlito.pl > perlito-new.js

See also:

V8 homepage at http://code.google.com/apis/v8

Rhino homepage at http://www.mozilla.org/rhino

Using the Perl 5 backend

From CPAN:
Expand All @@ -73,127 +61,41 @@ Using the Perl 5 backend

From the Perlito git project directory:

perl perlito.pl -e 'class Main { say "hello, World!" }'
export PERL5LIB=lib5
perl perlito.pl -Cperl5 -e 'class Main { say "hello, World!" }' | perl

Creating a bootstrapped compiler:
Creating the bootstrapped compiler:

# compile util/perlito.pl using perlito.pl:
export PERL5LIB=lib5
perl perlito.pl -Cperl5 util/perlito.pl > perlito-perl5.pl
# testing the bootstrap
perl -Ilib5 perlito-perl5.pl -Cperl5 util/perlito.pl > perlito-new.pl

See also: Perl 5 homepage at http://www.perl.org

Using the Python backend

# initialize "./libpy" and compile "perlito.py"
. util-python/build-python.sh

# using the perlito.py compiler
PYTHONPATH=libpy python perlito.py -Cpython -e 'class Main { say "hello, World!" }' | PYTHONPATH=libpy python

# using the perlito.pl compiler
perl perlito.pl -Bpython -e 'class Main { say "hello, World!" }'

USING PERLITO WITH OTHER BACKENDS

These backends are unsupported in version 7.
Previous versions of the compiler can be downloaded from github.

Using the Go backend

perl perlito.pl -Bgo t/04-op.t

Creating a bootstrapped compiler:

# create a "6.out" binary, using perlito.pl
perl perlito.pl -Bgo util/perlito.pl
# test the binary
./6.out -Cgo t/04-op.t
# recompile the compiler using itself
./6.out -Cgo util/perlito.pl > perlito-go.go
6g perlito-go.go
6l perlito-go.6
./6.out -Cgo util/perlito.pl > perlito-go-new.go
# "perlito-go.go" and "perlito-go-new.go" should be identical

See also: Go homepage at http://golang.org

Using the Java class backend

Requires Rhino's js.jar in CLASSPATH, see also: http://www.mozilla.org/rhino

perl perlito.pl -Bjava-class -e 'class Main { say "hello, World!" }'
java tmp

Creating a bootstrapped compiler:

The bootstrapped compiler is not working in Perlito 7.
The error message is:

Exception in thread "main" org.mozilla.javascript.EvaluatorException:
Encountered code generation error while compiling script:
generated bytecode for method exceeds 64K limit. (tmp.js#1)

# create a Java class, using perlito.pl:
perl perlito.pl -v -Bjava-class util/perlito.pl
# test "tmp.class"
java tmp -Cjs t/04-op.t

Using the Lisp backend

perl perlito.pl -Blisp -e 'class Main { say "hello, World!" }'

Creating an executable image:

perl perlito.pl -Clisp-bin util/perlito.pl
mv tmp.out perlito-lisp
./perlito-lisp -Clisp t/04-op.t

See also: SBCL homepage at http://www.sbcl.org

Using the Parrot backend

The parrot backend is not bootstrapped, and it doesn't pass all tests.

The perl 5 backend can be used to compile MiniPerl6 to parrot:

perl perlito.pl -Bparrot -e 'class Main { say "hello, World!" }'

See also: Parrot homepage at http://www.parrot.org

Using the Ruby backend

# initialize "./librb" and compile "perlito.rb"
. util-ruby/build-ruby.sh

# using the perlito.rb compiler
RUBYLIB=librb ruby1.9 perlito.rb -Cruby -e 'class Main { say "hello, World!" }' | RUBYLIB=librb ruby1.9

# using the perlito.pl compiler
perl perlito.pl -Bruby1.9 -e 'class Main { say "hello, World!" }'
export PYTHONPATH=libpy
python perlito.py -Cpython -e 'class Main { say "hello, World!" }' | python

PRODUCING AST OUTPUT

perl perlito.pl -Cast-perl6 -e 'class Main { say "hello, World!" }'

This requires the installation of the Perl 5 JSON module from CPAN:
RUNNING TESTS

perl perlito.pl -Cast-json -e 'class Main { say "hello, World!" }'
Perl 5:

RUNNING TESTS
find t/*.t | perl -ne ' print "*** $_"; chomp; print ` perl perlito.pl -Cperl5 $_ | perl ` '

Testing a backend using the Perl5 based compiler
Javascript:

prove -e "perl perlito.pl -Bjs"
prove -e "perl perlito.pl -Bperl5"
prove -e "perl perlito.pl -Bpython"
find t/*.t | perl -ne ' print "*** $_"; chomp; print ` d8 util-js/perlito.js -- -Cjs $_ > tmp.js && d8 tmp.js ` '

For the unsupported backends:
Python 2.6:

prove -e "perl perlito.pl -Blisp"
prove -e "perl perlito.pl -Bgo"
prove -e "perl perlito.pl -Bruby1.9"
find t/*.t | perl -ne ' print "*** $_"; chomp; print ` python perlito.py -Cpython $_ | python ` '

AUTHORS

Expand Down
2 changes: 1 addition & 1 deletion hello.sh
@@ -1 +1 @@
echo 'class Main { say "hello, World" }' | perl perlito.pl -Bperl5
perl -Ilib5 perlito.pl -Bperl5 -e 'class Main { say "hello, World" }' | perl -Ilib5
2 changes: 1 addition & 1 deletion lib5/Perlito/Clojure/Emitter.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Emitter/Token.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Eval.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Expression.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Go/Emitter.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Go/Prelude.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Grammar.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Grammar/Control.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Grammar/Regex.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Javascript/Emitter.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Javascript/Prelude.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Lisp/Emitter.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Lisp/Prelude.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Macro.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Parrot/Emitter.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Parrot/Match.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Perl5/Emitter.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Perl5/Prelude.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
4 changes: 2 additions & 2 deletions lib5/Perlito/Precedence.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down Expand Up @@ -28,7 +28,7 @@ sub is_ident_middle { my $c = $_[0]; (((((($c ge 'a')) && (($c le 'z')))) || (((
(my $Op2 = undef);
(my $Op3 = undef);
(my $End_token = undef);
sub op_parse { my $self = $_[0]; my $str = $_[1]; my $pos = $_[2]; ((my $from = undef) = $pos); for my $tok ( @{(($End_token) || []) || []} ) { ((my $l = undef) = Main::chars($tok, )); ((my $s = undef) = substr($str, $pos, $l)); if (Main::bool(($s eq $tok))) { ((my $c1 = undef) = substr($str, (($pos + $l) - 1), 1)); ((my $c2 = undef) = substr($str, ($pos + $l), 1)); if (Main::bool((is_ident_middle($c1) && ((is_ident_middle($c2) || ($c2 eq '(')))))) { } else { return scalar (Perlito::Match->new(('str' => $str), ('from' => $from), ('to' => ($pos + 2)), ('bool' => 1), ('capture' => do { (my $List_a = []); (my $List_v = []); push( @{$List_a}, 'end' ); push( @{$List_a}, $s ); $List_a }))) } } }; ((my $c01 = undef) = substr($str, $pos, 1)); ((my $c02 = undef) = substr($str, $pos, 2)); ((my $hyper_left = undef) = 0); ((my $hyper_right = undef) = 0); if (Main::bool(((($c01 eq '«')) || (($c01 eq '»'))))) { ($hyper_left = $c01); ($pos = ($pos + 1)); ($c02 = substr($str, $pos, 2)) } else { if (Main::bool(((($c02 eq '<<')) || (($c02 eq '>>'))))) { ($hyper_left = $c02); ($pos = ($pos + 2)); ($c02 = substr($str, $pos, 2)) } }; ((my $op3 = undef) = substr($str, $pos, 3)); if (Main::bool(exists($Op3->{$op3}))) { ((my $c1 = undef) = substr($str, ($pos + 2), 1)); ((my $c2 = undef) = substr($str, ($pos + 3), 1)); if (Main::bool((is_ident_middle($c1) && ((is_ident_middle($c2) || ($c2 eq '(')))))) { } else { ($pos = ($pos + 3)); ((my $c01 = undef) = substr($str, $pos, 2)); ((my $c02 = undef) = substr($str, $pos, 3)); if (Main::bool(((($c01 eq '«')) || (($c01 eq '»'))))) { ($hyper_right = $c01); ($pos = ($pos + 1)) } else { if (Main::bool(((($c02 eq '<<')) || (($c02 eq '>>'))))) { ($hyper_right = $c02); ($pos = ($pos + 2)) } }; return scalar (Perlito::Match->new(('str' => $str), ('from' => $from), ('to' => $pos), ('bool' => 1), ('capture' => do { (my $List_a = []); (my $List_v = []); push( @{$List_a}, 'op' ); push( @{$List_a}, $op3 ); push( @{$List_a}, do { (my $Hash_a = {}); ($Hash_a->{'hyper_left'} = $hyper_left); ($Hash_a->{'hyper_right'} = $hyper_right); $Hash_a } ); $List_a }))) } } ; ((my $op2 = undef) = $c02); if (Main::bool(exists($Op2->{$op2}))) { ((my $c1 = undef) = substr($str, ($pos + 1), 1)); ((my $c2 = undef) = substr($str, ($pos + 2), 1)); if (Main::bool((is_ident_middle($c1) && ((is_ident_middle($c2) || ($c2 eq '(')))))) { } else { ($pos = ($pos + 2)); ((my $c01 = undef) = substr($str, $pos, 1)); ((my $c02 = undef) = substr($str, $pos, 2)); if (Main::bool(((($c01 eq '«')) || (($c01 eq '»'))))) { ($hyper_right = $c01); ($pos = ($pos + 1)) } else { if (Main::bool(((($c02 eq '<<')) || (($c02 eq '>>'))))) { ($hyper_right = $c02); ($pos = ($pos + 2)) } }; return scalar (Perlito::Match->new(('str' => $str), ('from' => $from), ('to' => $pos), ('bool' => 1), ('capture' => do { (my $List_a = []); (my $List_v = []); push( @{$List_a}, 'op' ); push( @{$List_a}, $op2 ); push( @{$List_a}, do { (my $Hash_a = {}); ($Hash_a->{'hyper_left'} = $hyper_left); ($Hash_a->{'hyper_right'} = $hyper_right); $Hash_a } ); $List_a }))) } } ; ((my $op1 = undef) = substr($str, $pos, 1)); if (Main::bool(exists($Op1->{$op1}))) { ((my $c2 = undef) = substr($str, ($pos + 1), 1)); if (Main::bool((is_ident_middle($op1) && ((is_ident_middle($c2) || ($c2 eq '(')))))) { } else { ($pos = ($pos + 1)); ((my $c01 = undef) = substr($str, $pos, 1)); ((my $c02 = undef) = substr($str, $pos, 2)); if (Main::bool(((($c01 eq '«')) || (($c01 eq '»'))))) { ($hyper_right = $c01); ($pos = ($pos + 1)) } else { if (Main::bool(((($c02 eq '<<')) || (($c02 eq '>>'))))) { ($hyper_right = $c02); ($pos = ($pos + 2)) } }; return scalar (Perlito::Match->new(('str' => $str), ('from' => $from), ('to' => $pos), ('bool' => 1), ('capture' => do { (my $List_a = []); (my $List_v = []); push( @{$List_a}, 'op' ); push( @{$List_a}, $op1 ); push( @{$List_a}, do { (my $Hash_a = {}); ($Hash_a->{'hyper_left'} = $hyper_left); ($Hash_a->{'hyper_right'} = $hyper_right); $Hash_a } ); $List_a }))) } } ; return scalar (Perlito::Match->new(('bool' => 0))) };
sub op_parse { my $self = $_[0]; my $str = $_[1]; my $pos = $_[2]; ((my $from = undef) = $pos); for my $tok ( @{(($End_token) || []) || []} ) { ((my $l = undef) = Main::chars($tok, )); ((my $s = undef) = substr($str, $pos, $l)); if (Main::bool(($s eq $tok))) { ((my $c1 = undef) = substr($str, (($pos + $l) - 1), 1)); ((my $c2 = undef) = substr($str, ($pos + $l), 1)); if (Main::bool((is_ident_middle($c1) && ((is_ident_middle($c2) || ($c2 eq '(')))))) { } else { return scalar (Perlito::Match->new(('str' => $str), ('from' => $from), ('to' => ($pos + 2)), ('bool' => 1), ('capture' => do { (my $List_a = []); (my $List_v = []); push( @{$List_a}, 'end' ); push( @{$List_a}, $s ); $List_a }))) } } }; ((my $c01 = undef) = substr($str, $pos, 1)); ((my $c02 = undef) = substr($str, $pos, 2)); ((my $hyper_left = undef) = 0); ((my $hyper_right = undef) = 0); if (Main::bool(((($c01 eq '«')) || (($c01 eq '»'))))) { ($hyper_left = $c01); ($pos = ($pos + 1)); ($c02 = substr($str, $pos, 2)) } else { if (Main::bool(((($c02 eq '<<')) || (($c02 eq '>>'))))) { ($hyper_left = $c02); ($pos = ($pos + 2)); ($c02 = substr($str, $pos, 2)) } }; ((my $op3 = undef) = substr($str, $pos, 3)); if (Main::bool(exists($Op3->{$op3}))) { ((my $c1 = undef) = substr($str, ($pos + 2), 1)); ((my $c2 = undef) = substr($str, ($pos + 3), 1)); if (Main::bool((is_ident_middle($c1) && ((is_ident_middle($c2) || ($c2 eq '(')))))) { } else { ($pos = ($pos + 3)); ((my $c01 = undef) = substr($str, $pos, 2)); ((my $c02 = undef) = substr($str, $pos, 3)); if (Main::bool(((($c01 eq '«')) || (($c01 eq '»'))))) { ($hyper_right = $c01); ($pos = ($pos + 1)) } else { if (Main::bool(((($c02 eq '<<')) || (($c02 eq '>>'))))) { ($hyper_right = $c02); ($pos = ($pos + 2)) } }; return scalar (Perlito::Match->new(('str' => $str), ('from' => $from), ('to' => $pos), ('bool' => 1), ('capture' => do { (my $List_a = []); (my $List_v = []); push( @{$List_a}, 'op' ); push( @{$List_a}, $op3 ); push( @{$List_a}, do { (my $Hash_a = {}); ($Hash_a->{'hyper_left'} = $hyper_left); ($Hash_a->{'hyper_right'} = $hyper_right); $Hash_a } ); $List_a }))) } } ; ((my $op2 = undef) = $c02); if (Main::bool(exists($Op2->{$op2}))) { ((my $c1 = undef) = substr($str, ($pos + 1), 1)); ((my $c2 = undef) = substr($str, ($pos + 2), 1)); if (Main::bool((is_ident_middle($c1) && ((is_ident_middle($c2) || ($c2 eq '(')))))) { } else { ($pos = ($pos + 2)); ((my $c01 = undef) = substr($str, $pos, 1)); ((my $c02 = undef) = substr($str, $pos, 2)); if (Main::bool(((($c01 eq '«')) || (($c01 eq '»'))))) { ($hyper_right = $c01); ($pos = ($pos + 1)) } else { if (Main::bool(((($c02 eq '<<')) || (($c02 eq '>>'))))) { ($hyper_right = $c02); ($pos = ($pos + 2)) } }; return scalar (Perlito::Match->new(('str' => $str), ('from' => $from), ('to' => $pos), ('bool' => 1), ('capture' => do { (my $List_a = []); (my $List_v = []); push( @{$List_a}, 'op' ); push( @{$List_a}, $op2 ); push( @{$List_a}, do { (my $Hash_a = {}); ($Hash_a->{'hyper_left'} = $hyper_left); ($Hash_a->{'hyper_right'} = $hyper_right); $Hash_a } ); $List_a }))) } } ; ((my $op1 = undef) = substr($str, $pos, 1)); if (Main::bool(exists($Op1->{$op1}))) { ((my $c2 = undef) = substr($str, ($pos + 1), 1)); if (Main::bool((is_ident_middle($op1) && ((is_ident_middle($c2) || ($c2 eq '(')))))) { } else { ($pos = ($pos + 1)); ((my $c01 = undef) = substr($str, $pos, 1)); ((my $c02 = undef) = substr($str, $pos, 2)); if (Main::bool(((($c01 eq '«')) || (($c01 eq '»'))))) { ($hyper_right = $c01); ($pos = ($pos + 1)) } else { if (Main::bool(((($c02 eq '<<')) || (($c02 eq '>>'))))) { ($hyper_right = $c02); ($pos = ($pos + 2)) } }; return scalar (Perlito::Match->new(('str' => $str), ('from' => $from), ('to' => $pos), ('bool' => 1), ('capture' => do { (my $List_a = []); (my $List_v = []); push( @{$List_a}, 'op' ); push( @{$List_a}, $op1 ); push( @{$List_a}, do { (my $Hash_a = {}); ($Hash_a->{'hyper_left'} = $hyper_left); ($Hash_a->{'hyper_right'} = $hyper_right); $Hash_a } ); $List_a }))) } } ; return scalar (Perlito::Match->new(('bool' => 0))) };
sub add_op { my $fixity = $_[0]; my $name = $_[1]; my $precedence = $_[2]; my $param = $_[3]; if (Main::bool(!Main::bool((defined($param))))) { ($param = do { (my $Hash_a = {}); $Hash_a }) } ; ((my $assoc = undef) = ($param->{'assoc'} || 'left')); ($Operator->{$fixity}->{$name} = 1); ($Precedence->{$name} = $precedence); ($Assoc->{$assoc}->{$name} = 1); ($Allow_space_before->{$fixity}->{$name} = (Main::bool($param->{'no_space_before'}) ? 0 : 1)); if (Main::bool(((Main::chars($name, )) == 1))) { ($Op1->{$name} = 1) } else { if (Main::bool(((Main::chars($name, )) == 2))) { ($Op2->{$name} = 1) } else { if (Main::bool(((Main::chars($name, )) == 3))) { ($Op3->{$name} = 1) } } } };
((my $prec = undef) = 100);
add_op('postfix', '.( )', $prec, do { (my $Hash_a = {}); ($Hash_a->{'no_space_before'} = 1); $Hash_a });
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Python/Emitter.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Rakudo/Emitter.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Ruby/Emitter.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down
2 changes: 1 addition & 1 deletion lib5/Perlito/Test.pm
@@ -1,4 +1,4 @@
# Do not edit this file - Generated by Perlito 6.0
# Do not edit this file - Generated by Perlito 7.0
use v5;
use utf8;
use strict;
Expand Down

0 comments on commit 09792a1

Please sign in to comment.