[antlr-interest] reading a template from a file using StringTemplate

Sean Barry seanharteb at yahoo.co.uk
Fri Nov 12 09:04:26 PST 2004


Hey 
I have read through the documentation on StringTemplate but I'm still having problems with reading a basic template from a file, I think my template setup may be the problem.
 
Invoking Java code:
 
StringTemplateGroup group = new StringTemplateGroup("myGroup","/Templates" ); 
StringTemplate query = group.getInstanceOf("sql_statement");
query.setAttribute("column", "basic_col1");
query.setAttribute("table", "basic_table1");
System.out.println(query.toString() );
 
and I have a basic SQL template in a text file ("sql_statements.st"):
SELECT $column; separator=","$ FROM $table$;
 
any possible reasons for my runtime error would be appreciated
Regards
Sean

 

 


		
---------------------------------
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20041112/11392cf3/attachment.html


More information about the antlr-interest mailing list