[stringtemplate-interest] How to redirect StringTemplate output from within tree grammar

Eric Jungkurth ejungkurth at yahoo.com
Tue Oct 23 23:33:08 PDT 2007


> 
> Actually, you'll get nothing from schema; it doesn't
> ref the  
> $type.st.  ANTLR doesn't do anythin g with templates
> by dfault.  I  
> suggest
> 
> schema : (t+=type)+ -> ... ;
> 
> to make a template that wraps the type templates.
> 
> But, I'm not sure what you're asking for.
> 
> Ter
> 

Sorry, bad example as I trimmed out too much stuff.
However, I think I've got what I want. I can do

schema	:	(t=type 
                         { printstream.println(t); }
                        )+ 
	;
	
where "printstream" points to a .java file the name of
which I can get via scoped variable from the type
rule.

Thanks,

Eric

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the stringtemplate-interest mailing list