Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

cyocum (7706)

cyocum
  (email not shown publicly)
http://cyocum.blogspot.com/

An American post-graduate student living in Scotland.

Journal of cyocum (7706)

Monday March 05, 2007
12:35 PM

Thoughts about Working with TGE and Transformation Languages

[ #32580 ]

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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 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-

    • 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 [rakudo.org] 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.

    --
    /* Bernhard.Schmalhofer@gmx.de */