[antlr-interest] StringTemplate questions

G R relationalalgebra at gmail.com
Sat Nov 10 03:43:09 PST 2007


Ok, I apologies, it seems that the latest version is Ok.
I first use it just in the main program. I've try regenerate the code form
the tree grammar and this time, it's ok.
Thanks for your help, and again, thanks for ANTLR. This is a very usefull
and powerfull framework. Keep going guys !

G.R

2007/11/10, Terence Parr <parrt at cs.usfca.edu>:
>
>
> On Nov 9, 2007, at 3:07 AM, G R wrote:
>
> > First of all, thanks Jeff.
> > I've try using your template by doing this one (I'm using a group
> > template file) :
> > difference(left, right, keyNames) ::= <<
> > SELECT *
> > FROM <left><if(keyNames)>
> > WHERE <keyNames: {keyName | <keyName> NOT IN ( SELECT <keyName>
> > FROM <right> )
> > }; separator="\nAND"><endif>
> > >>
>
> Wow!  You got it on your own.
>
> > My Tree grammar that is calling this template is here :
> > ->difference(left={$left.st}, right={$right.st}, keyNames=
> > {RATranslator.getPrimaryKeys($left.text)});
> >
> > Where RATranslator.getPrimaryKeys(String tableName) returns a String
> > [].
> > I've check the array returned by this methode, ans it's ok.
> > But when I try to use it as a list, I just get the physical adress
> > of my array. Instead of writing the content, I get something like
> > this : [Ljava.lang.String;@1931579.
>
> Oh!  Yeah, I think there was an issue where property return values
> weren't converted to lists. hang on...oh, looks like code is ok.  Can
> you try latest build?
>
> http://www.stringtemplate.org/download/build/
> stringtemplate-11-09-2007.17.tar.gz
>
> Ter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20071110/2f213b9e/attachment.html 


More information about the antlr-interest mailing list