[stringtemplate-interest] StringTemplate syntax questions

Johannes Luber jaluber at gmx.de
Thu Mar 29 05:24:43 PDT 2007


Hello,

While reading the Beta Book chapter regarding StringTemplate, I have
followed the recommendation to study the documentation on the website.
But unfortunately I've stumbled over a few contradictions and missing
pieces (as I haven't read the entire documentation yet, those pieces may
be answered in a later chapter, but I believe them to so basic that they
should have shown up already somewhere). So here are my questions:

Are attributes enclosed with $$ or with <>? In ANTLR and the ST.pdf the
angle brackets are used, but the website documentation always refers to $.

Are the {} only for indention purposes or will they be output, two? If
the latter, how does one indent in languages which don't enclose blocks
with {}?

How does one escape characters like <, > so one can output them, too? As
I intend to turn an AST into an XML file, this capacity is necessary for me.

Best regards,
Johannes Luber


More information about the stringtemplate-interest mailing list