[stringtemplate-interest] ST4: Early evaluation of default arguments
Terence Parr
parrt at cs.usfca.edu
Tue May 3 17:02:12 PDT 2011
perhaps {<({...})>} works? ;)
Ter
On Apr 30, 2011, at 3:39 AM, Udo Borkowski wrote:
> Currently the only way to enforce early evaluation of template default arguments is through the syntax:
>
> p = {<(...)>}
>
> I.e. one can only early evaluate anonymous template that contain just an expression tag.
>
>
> It would be nice to also support early evaluation on any kind of anonymous template.
>
> E.g. in http://www.antlr.org/pipermail/stringtemplate-interest/2009-August/002097.html Ter gave the following example:
> if(cond, block, label={end<(uniq)>}) ::= << ... >>
>
> However this will not give the expected result in ST4 (early evaluation of "end<(uniq)>").
>
> Maybe we could extend the syntax for default arguments to also support
> p = ({ ... })
>
> i.e. putting "( … )" around the template forces early evaluation?
>
>
> What do others think?
>
> 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/20110503/176c98a1/attachment.html
More information about the stringtemplate-interest
mailing list