Playing with Perl5 syntax

At some point in YAPC::Europe I was showing the perlito5 compiler to stevan++, and we discussed how it could be used to prototype grammar extensions to Perl5.

Perlito grammar is mostly written in simple perl, without extensions (in some places there are still remains of the original perl6 grammar, but these are being cleaned up.)

I've shown stevan++ how named arguments were implemented in perlito6, and how to port the feature to perlito5. We also discussed how to run perlito5 over perl5 using a source filter, in the same way that "" works.

Later, leont++ on #p6p5 was investigating how to add macros to perl5, and we discussed briefly how macros could be added to perlito5. The compiler already uses macros internally, so it should be a matter of exposing this as a language feature.

Leave a comment

About Flávio S. Glock

user-pic I blog about Perl.