[stringtemplate-interest] Standard way to generate Java/C++ from Stringtemplate (Java version)?
Dennis
stringtemplate at reservegriff.de
Wed Oct 25 14:46:17 PDT 2006
Terrence,
thank you for your reply. I think I can not go for the reflection
classes approach since they have no way to represent the body of a method.
What I really want to do is to separate the model from the view as you
suggest in this article. But I also need a model for the
*implementation* of the method body. Has anyone done this yet? I am
seeking the same for C/C++.
In my humble understanding this would ultimately lead to a complete
"inverse grammar" of the individual languages (Java/C/C++). Do I get
this right?
Dennis
Terence Parr wrote:
> On Oct 24, 2006, at 2:12 PM, Dennis wrote:
>
>
>> Hello altogether!
>>
>> In my project I was about to generate code the "old fashioned way"
>> using
>> string concatenation when I stumbled across Stringtemplate. I read the
>> docs and the posts from Eric and Oliver (
>> http://www.antlr.org:8080/pipermail/stringtemplate-interest/2005-
>> October/000133.html
>> ).
>>
>> I guess I am looking - like Eric - for some way to represent the Java
>> code in an object oriented way and then pass this to Stringtemplate to
>> emit code.
>>
>
> Java reflection objects work great. I used it to generate XML and
> also back to Java:
>
> http://www.codegeneration.net/tiki-read_article.php?articleId=65
>
> Ter
>
>
>> I was wondering whether there is some standard way to do this
>> with Stringtemplate or if other users have already implemented such a
>> class hierarchy for Java and/or C++?
>>
>> It would be nice if you could give me some hints or remarks on how to
>> solve my problem efficient!
>>
>> Thanks, Dennis
>> _______________________________________________
>> stringtemplate-interest mailing list
>> stringtemplate-interest at antlr.org
>> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>>
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20061025/2e339267/attachment.html
More information about the stringtemplate-interest
mailing list