[stringtemplate-interest] [ST4 Beta-3] Cannot nest anonymous templates in default expression
Terence Parr
parrt at cs.usfca.edu
Sat Feb 5 12:55:00 PST 2011
fixed. forgot to call method that defines subtemplates in default args.
Ter
On Feb 3, 2011, at 11:39 AM, Udo Borkowski wrote:
> 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
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20110205/44dc13a7/attachment.html
More information about the stringtemplate-interest
mailing list