Open yati-sagade opened 7 years ago
"desugaring" to perl works now - this means the file is correctly parsed:
$ perl perlito5.pl -Isrc5/lib -Cperl5 camel.pl > x.pl $ perl x.pl
running on JavaScript requires "seek", which is not yet implemented:
$ perl perlito5.pl -Isrc5/lib -Cjs camel.pl > x.js $ nodejs x.js x.js:1268 TypeError: p5pkg.main.seek is not a function
compiling to Java is not possible yet because eval-string is not yet implemented:
$ perl perlito5.pl -Isrc5/lib -Cjava camel.pl > x.java Java eval string not yet implemented
This works now in the JVM backend:
$ java -jar perlito5.jar -I src5/lib -Cjava camel.pl
update: the recursion problem seems to be fixed, now it fails at:
$ nodejs perlito5.js -I src5/lib -Cjava camel.pl
Undefined subroutine &Perlito5::Grammar::Space::prefix:<*> at camel.pl line 5
this seems to be related to the DATA section that is not yet implemented in JavaScript.
I tried compiling the following program for fun here:
And it should give the following output:
But I get this error:
Should be a fun exercise for the compiler :)