Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial proof of concept. Currently using 'use perl5' till we patch r…

…akudo to support use v5 as a module.
  • Loading branch information...
commit 21809ea21a48ba3c98b7e4771d2605c47c14131b 1 parent d0dd7e6
@pmurias pmurias authored
View
17 Makefile
@@ -0,0 +1,17 @@
+NQP = nqp
+PARROT = parrot
+
+all: blib/perl5.pbc
+
+blib/perl5.pbc: lib/v5.pm blib/Perl6/P5Actions.pbc blib/Perl6/P5Grammar.pbc
+
+ $(NQP) --vmlibs=perl6_group,perl6_ops --target=pir --output=blib/perl5.pir lib/v5.pm
+ $(PARROT) -o blib/perl5.pbc blib/perl5.pir
+
+blib/Perl6/P5Actions.pbc: lib/Perl6/P5Actions.pm
+ $(NQP) --vmlibs=perl6_group,perl6_ops --target=pir --output=blib/Perl6/P5Actions.pir lib/Perl6/P5Actions.pm
+ $(PARROT) -o blib/Perl6/P5Actions.pbc blib/Perl6/P5Actions.pir
+
+blib/Perl6/P5Grammar.pbc: lib/Perl6/P5Grammar.pm
+ $(NQP) --vmlibs=perl6_group,perl6_ops --target=pir --output=blib/Perl6/P5Grammar.pir lib/Perl6/P5Grammar.pm
+ $(PARROT) -o blib/Perl6/P5Grammar.pbc blib/Perl6/P5Grammar.pir
View
5 README.md
@@ -1,4 +1,7 @@
v5
==
-v5.pm for rakudo
+v5.pm for rakudo
+
+make
+PERL6LIB=blib perl6 t/v5/basic.t
View
2  blib/.gitignore
@@ -0,0 +1,2 @@
+*.pir
+*.pbc
View
2  blib/Perl6/.gitignore
@@ -0,0 +1,2 @@
+*.pir
+*.pbc
View
6,021 lib/Perl6/P5Actions.pm
6,021 additions, 0 deletions not shown
View
3,965 lib/Perl6/P5Grammar.pm
3,965 additions, 0 deletions not shown
View
10 lib/v5.pm
@@ -0,0 +1,10 @@
+use Perl6::Grammar;
+use Perl6::P5Grammar;
+grammar Foo {
+}
+my $grammar := Foo.HOW.new_type();
+$grammar.HOW.add_parent($grammar,Perl6::P5Grammar);
+$grammar.HOW.add_parent($grammar,Perl6::Grammar);
+$grammar.HOW.compose($grammar);
+%*LANG<MAIN> := $grammar;
+%*LANG<MAIN-actions> := Perl6::P5Actions;
View
5 t/v5/basic.t
@@ -0,0 +1,5 @@
+print "1..1\n";
+use perl5;
+if(1) {
+ print "ok 1\n";
+}
Please sign in to comment.
Something went wrong with that request. Please try again.