Hello,

I try to use StringTemplate to write a simple codegen.

Can I use nested ST templates in my .stg file?
Smth. like this:
//---------------------------------------
group ANTLRLangCodGen;

dictdef()::="dict([<element; separator=",">])"

element()::="<cell; separator=",">"

cell(axis,value)::="(<axis; separator=",">),<value>"
//---------------------------------------

Where "element" and "cell" are nested templates.

And other question:
How to load a .stg file and use templates in my tree grammar in ANTLRworks ?
And how to pass plain string argument's value to template? Is it possible only 
via labels like in the following example?

rule1: $var1=WORLD -> SayHello(word={$var1.text});

Thank you

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to