[stringtemplate-interest] fixed if-condition thing

Zenaan Harkness zen at freedbms.net
Fri Jul 3 07:40:12 PDT 2009


I thought I raised this some time back. Perhaps that was only in my
mind. Either way, very pleased to see this one fixed, despite
performance bug.

BTW, for next version of ST (after STBook v1), is there a chance an ST
spec might be in the works, ala YAML spec (I assume JSON has one too)?

I find YAML spec nice to read - perhaps use as a template?

Regards
Zen


On Thu, Jul 02, 2009 at 03:17:32PM -0700, Terence Parr wrote:
> optimzed:
> 
>    WARNING: You now pay a penalty now for a separator if the iterated  
> value is
>    nullable.  Nullable if iterable or a template with nothing but IF  
> statements.
>    If nullable, ST writes each element to a temp buffer before  
> emitting.  Expensive.
> 
> Ter
> On Jul 2, 2009, at 2:15 PM, Terence Parr wrote:
> 
> > o IF with false condition results in missing not empty value. So,
> >   <names:{n | <if(n.cool)><n><endif>}; separator=",">
> >   doesn't emit a separator for non-cool names. See
> >   http://www.antlr.org/pipermail/stringtemplate-interest/2009-July/002020.html
> >
> >   WARNING: You now pay a penalty now for a separator.  It writes each
> > element to
> >   a temp buffer before emitting.  Expensive.
> >   Later, I can optimize to check if one chunk in template and it's a
> > conditional.
> >
> > it's only in the depot.
> >
> > Ter
> > _______________________________________________
> > stringtemplate-interest mailing list
> > stringtemplate-interest at antlr.org
> > http://www.antlr.org/mailman/listinfo/stringtemplate-interest
> 
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest

-- 
Homepage: www.SoulSound.net -- Free Australia: www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.


More information about the stringtemplate-interest mailing list