[antlr-interest] Re: output code generation in c++
dotnetfr at gmail.com
Tue Aug 1 01:14:36 PDT 2006
I answer between the lines :
> I'm looking to generate output code in c++.
Do you just need ANTLR to output C++? This is already possible in 2.7.6
(and will be available in v3).
In the antlr steps :
-create the grammar file (parse the file and generate AST)
-generate code in c++.
Now I want to use my AST to generate ouput code (for example .hpp, cpp)
Is it available in Antlr 2.7.6 ? Is it possible ?
> I've found StringTemplate but it's only available in .net and java.
> Is there an equivalent in c++ ?
There was some discussion about this just recently on the list. I am
also interested in a C++ port of StringTemplate, and have been
investigating the possibility. There are some tricky bits (reflection),
but I think it should be possible. I can't guarantee a timeline, but
I'll let the list know when/if I can get something working.
It will be helpfull a lot.
I will look if there is another solution to generate output code in
c++ with Antlr AST.
More information about the antlr-interest