[stringtemplate-interest] How to redirect StringTemplate output from within tree grammar
Terence Parr
parrt at cs.usfca.edu
Tue Oct 23 18:24:04 PDT 2007
On Oct 24, 2007, at 12:23 AM, Eric Jungkurth wrote:
> This is both an ANTLR and StringTemplate question.
>
> I have a model that I parse and pass to a tree grammar. I want the
> tree grammar to output Java classes using StringTemplate. However,
> I'm confused about how to redirect the output into individual Java
> files.
>
> So, the question is, how do I redirect my StringTemplate output
> from within my tree grammar? I think I could hack something, but
> I'm hoping there's an elegant solution that I haven't found yet.
Hi. This is really just a "how do I store a string in a file"
question. ST is an interpreter that executes upon toString(). What
you do with the string is up to you. Send to socket, file, window,
etc...
:)
Ter
More information about the stringtemplate-interest
mailing list