[stringtemplate-interest] [ST4 Beta-3] Cannot nest anonymous templates in default expression

Udo Borkowski ub at abego-software.de
Thu Feb 3 11:39:40 PST 2011


The following template will issue an "no such template: _sub1149" error.

t1(x,y={«x:{s|«s»«s»}»}) ::= <<
x: «x»
y: «y»
>>

When called with t1(x="a") I expected the output:
a
aa


I assume this has to do with the nested anonymous template.

If I make the anonymous template a normal one the group behaves as expected. I.e.:

dup(s) ::= <<
«s»«s»
>>

t1(x,y={«dup(x)»}) ::= <<
x: «x»
y: «y»
>>

called with t1(x="a") returns 
a
aa



Udo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20110203/aa894b54/attachment.html 


More information about the stringtemplate-interest mailing list