[antlr-interest] StringTemplate questions

G R relationalalgebra at gmail.com
Thu Nov 8 05:32:43 PST 2007


Hi,

I'm trying to use ST to translate relational algebra into SQL, and I'm stuck
with a template :
"minus(left, right, keys)" where left, and right are just text, and keys is
a list of string (I want it to be a list of String).

So first question is how in Java do I build a ST list of string ?

Then, using my 3 attributes (left, right and keys), I'd like to generate the
following code :

SELECT * FROM <left>
WHERE key1 NOT IN (SELECT key1 FROM <right>)
AND  key2 NOT IN (SELECT key2 FROM <right>)
...
AND  keyN NOT IN (SELECT keyN FROM <right>)

where key1, key2, ... keyN are the element of my list.

How can i do this ? Can i use an attribute within the separator of a list ?

Thanks for any help.

G.R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20071108/ef478e33/attachment.html 


More information about the antlr-interest mailing list