Java的C ++解析器/模型 [英] C++ Parser/Model for Java

查看:122
本文介绍了Java的C ++解析器/模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人知道可以在Java中以编程方式使用的现有C ++解析器/代码模型.我正在寻找类似于Eclipse CDT的东西,可以将其用作Java的库(并且不依赖Eclipse).预先感谢.

I was wondering if anyone knows of existing C++ parsers/code models that can be used programmatically in Java. I'm looking for something similar to the Eclipse CDT that can be used as a library from Java (and that does not rely upon Eclipse). Thanks in advance.

推荐答案

您不想构建自己的C ++解析器.它会杀了你.

You don't want to build your own C++ parser. It'll kill you.

您已经了解Eclipse CDT项目: www.ibm.com/developerworks/library/os-ecl-cdt3/index.html AFAIK,该解析器的边缘有些模糊. YMMV. 优势:在Java中(如果需要,在Eclipse中). 如果您要处理C ++,并用Java进行处理,则可能 是您唯一可行的选择.

You already know about the Eclipse CDT project: www.ibm.com/developerworks/library/os-ecl-cdt3/index.html AFAIK, that parser is, well, a bit fuzzy around the edges. YMMV. Advantage: in Java (and in Eclipse if you care). If you want to process C++, and do it in Java, this might be your only practical choice.

还有我们的DMS软件再造工具包C ++前端: http://www.semdesigns.com/Products/FrontEnds/CppFrontEnd.html 适用于各种C ++语言(ANSI,GNU,MSVC 2005/2008), 经过数百万行代码的火灾测试. 从您的角度来看,缺点:不是在Java中. 但是,如果您真的想要分析C ++,请制定规则 您只愿意用Java做到这一点的人可能不会 为您服务最好.

There is also our DMS Software Reengineering Toolkit C++ front end: http://www.semdesigns.com/Products/FrontEnds/CppFrontEnd.html Works with a wide variety of C++ dialects (ANSI, GNU, MSVC 2005/2008), tested by fire on millions of lines of code. Disadvantage from your point of view: Not in Java. But if you really want to analyze C++, making a rule that you are only willing to do it in Java might not serve you the best.

这篇关于Java的C ++解析器/模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆