[antlr-interest] Generating C# code from C++
Patrik Suzzi
imolanet at yahoo.it
Tue May 6 01:51:53 PDT 2003
Hi, thanks for reply to message 8189.
I've spent lot of time visiting webpages that talk about code
translation and generation, but still unexperienced about it.
I've seen on mailgate a discussion (comp.compilers.pcct) about
translation form C++ to C# using two different tecniques:
Given a Cpp grammar .. A OR B .
Tecnique A
1) using Antlr to generate lexer & parser.
2) using parser to generate AST
3) using visitor to scan and transfor the tree
4) using the transformed AST with CodeDOM (C#)
(in this case I must pay attention to some limitation of CodeDOM. For
example it can't build a switch .. )
Tecnique B
1) I suppose must give the Cpp source to ANTLR
2) Antlr build an XML ast from the given source
3) With C# I can scan XML to
4.1)generate code passing through AST build and with CodeDOM
or
4.2)generate code passing trough XSLT transformation
(I think there were some errors in this case explaination)
*** Can someone tell me what think about these Tecniques ?
(can someone excuse me for my terrible english language ?)
I'm still searching for better strategies to project, and if anyone
wants a free worker for anything similar 'm here. (imolanet@ .. )
Think working about free project is the better way to Learn and Help
others.
Excuse me for stealing your time
Thanks : Patrik
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list