As I am beginning to work with TGE, I am thinking about how best to represent this kind of transformation. PIR is great for now but the language tag keeps leaping out to my eye and I keep wondering about the future of tree transformations.
There are a couple of examples for transforming trees already avaliable from the mark up language world. In SGML, you can do this with DSSSL, which is a scheme like language. I have not worked with it. In XML, you have two XSL:FO and XSLT. From what I have gathered, XSL:FO is for formatting to any other format while XSLT is for formatting into another XML representation. These two languages use XML as their base language rather than some other representation like DSSSL.
It will be interesting to see what the wizards have up their sleeves for the transformation end of the compiler tool chains. I would figure that it would go down the same path as PGE as a Perl6 like syntax. Although, scheme and lisp have much going for them in terseness but I think that it would be easier for a programmer if they representation of the transformation is in a similar langauge as their grammar. Thus, although, I sometimes wonder about using XML as a transformation language, it seems to work out quite well for its purpose.
First, a detail: XSL:FO is a page description language (think HTML+CSS, but more comprehensive, and with full support for page-based layouts and typography), it's not a transformation language. XSLT is the transformation language; it's supposed to be used to transform semantically-structured XML documents into presentation form (be it text, HTML, XSL:FO, or whatever).
Second, syntax is almost never a problem: XSLT is a nice transformation language in spite of the rather awful syntax. If TGE can get a tree-transformation language implementing the most useful semantic of XSLT and DSSSL, even if it's in the form of a set of PMCs, it would be immensely useful.
Re:XSLT is the language; syntax is not important
cyocum on 2007-03-05T21:13:45
Thanks for the clarifications and explanations! I think I starting to understand TGE and PAST but there is still a long way for me to go.
In my project Plumhead, http://rakudo.org/parrot/index.cgi?plumhead I'm working on a side by side comparison of various parser and tree transformation approaches. The use case is an implementation of PHP on Parrot.
Currently I have XSLT, TGE and Antlr3 tree transformations. So far Antlr3 is the most convienient for generating the syntax tree as I need it for Parrot.