开发者

Are there any actively maintained tools that can transform C++ code to xml?

Are there any tools that can transform C++ code to xml, or some other format that would be easier to parse? It would be great if it would also have the option of turn开发者_高级运维ing xml back to C++ . I already know of doxygen's xml format ... maybe it's just me, but I don't find it particularly helpful.


Something like gcc xml?


As i recently learned, clangs C++ support is nearing completion and its API (the classes prefixed with CXX) looks quite good.
Maybe its current support is sufficient for your needs.


Our DMS Software Reengineering Toolkit has a full C++ parser with symbol table, and can directly produce XML for the parse tree. DMS is designed to be customized; it would be close to trivial to get it to dump the symbol table as XML. It provides full access to declarations and function body information. Note that the XML can be pretty large for a 1000 line C++ program.

However, once you have the XML, you aren't going to be able to regenerate C++ source code from it.

DMS is designed to support custom analysis and code generation tasks. If you stay "inside" DMS you can generate C++ ASTs and symbol table data to your heart's content, analyze the code for issues, and/or transform the C+ ASTs and when done, prettyprint the ASTs back to legal, compilable C++ code.

Yes, its actively maintained.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜