PSITTACUS

Allison on 2005-10-31T20:28:54

Parrot Standardized Interface for Tree Transformations: Abstract, Concrete, and Unnecessarily Silly ;)

I'm working on a tree transformation engine for Parrot. This started as I was working on a draft of the compiler tools overview, and realized that the best way to explain it was to show how it worked. I also realized the best way for me to expand my thinking on the subject was to try it out.

Last week, on my "Parrot Day", I ported version 0.05 of Luke Palmer's Language::AttributeGrammar to PIR. In the process of porting, I tried to take advantage of the unique strengths of Parrot. For example, Luke's original version heavily uses closures (using a strength of Perl 5), but my PIR version is more purely OO (using a strength of Parrot). I particularly like the use of a coroutine to generate unique ids for tree nodes. :)

If you want to play with it, check out this directory of my repository: http://svn.lohutok.net/nam/trunk/parrot/modules/Language/AttributeGrammar/

The current script to run is "testlag.pir".

This will migrate into the Parrot repository in the next couple of weeks.