[stringtemplate-interest] ST 3.1 release imminent

John Snyders jjsnyders at rcn.com
Wed Nov 14 21:12:58 PST 2007


I'm glad to hear that 3.1 is nearly ready. I hope it is not too late to 
bring up these issues. Sorry I have been busy with other things and have 
not been following the ST list.

The most important bug that needs to be fixed in my opinion is passing 
iterators to templates. I did a quick scan of the bug list both open and 
recently resolved and didn't find a mention of this. Passing an iterator 
to a template just won't work. Something like Java 5 Iterable must be 
passed instead. I wrote about this here:
http://www.antlr.org:8080/pipermail/stringtemplate-interest/2007-May/001073.html
http://www.antlr.org:8080/pipermail/stringtemplate-interest/2007-May/001074.html
The problem of "using a list up" is also mentioned here
http://www.antlr.org:8080/pipermail/stringtemplate-interest/2007-January/000915.html

It is a coincident that just this weekend  I was trying to use ST on a 
quick  project to create some address labels from a CSV file. I was 
going to turn the CSV file into JSON  (using python) and use STST from 
the command line. The trouble is that the address label document (OOo 
XML) was a table and the first column needed to be different than the 
first. This meant using the first and rest functions on a list that was 
passed as a parameter to a template. The above bug made it impossible to 
do what I wanted. Sadly I had to fall back on XML and XSLT.

Even if this can't be fixed now I think it should go in the bug 
database. Not sure if I have access to enter bugs or not.

I also think that there should be a bug report to Remove definition of 
INT from the grammar.

Any interest in including STST in the distribution?

I'll mention some other feature requests just in case they were 
forgotten. I know that 3.1 is just a point release.

Support programming in the large by allowing .stg and .st files to refer 
to other .stg and .st files.

List comprehensions?
http://www.antlr.org:8080/pipermail/stringtemplate-interest/2007-June/001116.html

List slice?
http://www.antlr.org:8080/pipermail/stringtemplate-interest/2007-June/001090.html

Support for really large input data?
http://www.antlr.org:8080/pipermail/stringtemplate-interest/2006-December/000891.html

Just two comments inline below.
Thanks,
-John

Terence Parr wrote:
> hi Kunle (C#) and I (Java) have been working hard to get ST ready for  
> 3.1 release.
>
> I just added a few things (bug fixes and small new features) and so  
> Kunle will need to catch up and then I need to update the doc.  I  
> believe these are the last changes:
>
> 11-09-2007
>
> o added elseif. $if(x)$...$elseif(y)$...$else$...$endif$
>   
I really like this
> o updated some unit tests (names, guts) to make more sense.
>
> o updated group.g and eval.g so that list literals can have empty
>    atoms like $["a",,"b"]:{n | ...}; null="nullstring"$.
>   
Why this syntax rather than having a literal representation for null. Like

$["a",null,"b"]:{n | ...}; null="nullstring"$

A literal null may find other uses since it can be passed as the 
argument to a template.


> 11-08-2007
>
> o "default" was not a valid value in map.  had testLiterals looking  
> even at strings in lexer for
>    group.g. ST-15
>
> o ST-18 fixed.  put close in a finally block.
>
> Submitted to depot (only a few small changes to code thankfully)
>
> Ter
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
>   


More information about the stringtemplate-interest mailing list