[stringtemplate-interest] Automatic generation of "StringTemplate"s from antlr grammar?

Anthony Anjorin anthony.anjorin at es.tu-darmstadt.de
Thu Nov 19 05:40:51 PST 2009


Hello,

 

I'm  a phd-student (TU-Darmstadt, Germany) doing research in the area of
MDSD/MDA.

 

Code generation is an important issue for us and I'm VERY excited to have
discovered the antlr and StringTemplate projects.

 

As we ultimately aim for bidirectionality, I have the following question:

 

Do you think automatically generating a set of "Stringtemplate"s from an
antlr grammar is feasible?  My goal is to start with an antlr grammar
specifying a certain language,  and generate a lexer+parser that produces an
AST from a concrete programme.  I also want to be able to "unparse" the AST
to obtain the exact (or corresponding) code that (would) produce(d) it
(possibly after changing the AST).

 

As the (programming) language is to be  variable, I want to demand as little
input as possible - the best case would be solely an EBNF-like grammar (==
antlr grammar file).  Demanding a set of StringTemplates as well seems
redundant in this case, as the source and destination languages are exactly
the same (this might seem strange but makes sense in our context J )!

 

It would be fantastic to be able to automatically generate a parser AND an
unparser for the same language, directly from the same antlr grammar - What
do you think?  Has this possibly been done already?  Do you forsee any
stumbling blocks?  Is it somehow trivial and I'm just a dunce? J

 

Thanks in advance for your replies,

Anthony Anjorin.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20091119/9c55d213/attachment.html 


More information about the stringtemplate-interest mailing list