Perlito Archives

a perl5 to perl6 translator

The "perlito" perl5 to perl6 compiler is online at: http://perlcabal.org/~fglock/perlito5to6.html.

It is also available as an irc bot for snippets and as a command line script.

formats added to perlito5

perlito5 is a Perl compiler written in Perl.

The format statement was required in the grammar for completeness. The 'format' command is not supported at the emitter side - it compiles, but it doesn't run yet.

Some other features are still marked as TODO and are simple to implement:

- dot-decimal strings (without the 'v'),
- "'" meaning "::",
- using 'CORE::' in odd places - 'CORE::if' in place of 'if' and 'CORE::and' in place of 'and'.

With these in place, the grammar will be "100% complete" - the tests will eventually tell if we got there or not.…

indirect-object added to perlito5

perlito5 is a Perl compiler written in Perl.

The tests* for indirect-object and bareword disambiguation can be run online at http://perlcabal.org/~fglock/perlito5.html (you need to copy-paste the tests, it is not automated).

* t5/01-perlito/27-syntax-indirect-object.t
t5/01-perlito/28-syntax-method-or-sub.t

tie() in perlito5

I've just added a small tie() example to the perlito5-in-the-browser page.

This was implemented today, and it only supports a few methods for now.

tie() does not make perlito5 any slower - the tied containers use a separate class, while the non-tied perl5 containers are javascript native array and hash objects.

Perl5 in the browser update

Perlito5 is an ongoing implementation of perl5, with a javascript backend. The compiler is written in perl5. It compiles itself to javascript, so it can run in a browser.

The test suite can be run with node.js. It now passes 288 tests. About a hundred of these tests are from the official perl5 test suite.

$ prove -r -e 'node perlito5.js -Bjs' t
t/base/cond.t ...................................... ok
t/base/if.t .......…

Perlito Perl6 in .NET

There is a new article about the Perlito Perl 6 compiler, published by the São Paulo Perl Mongers. The article is mostly focused on the Javascript backend, and all code snippets can be run in the browser. There are also instructions on how to install the Perl 5 backend from CPAN. The article finishes with an overview of the compiler internals.

In the development front, Perlito now passes all it'…

About Flávio S. Glock

user-pic I blog about Perl.