pygccxml中是否有Python-Clang包装器包装GCCXML?

2024-06-01 10:42:26 发布

您现在位置:Python中文网/ 问答频道 /正文

长期以来,我一直在使用PygccXML解析和内省我的C++源代码:它帮助我在构建过程中做一些聪明的代码生成。在

最近我已经阅读了很多关于LLVM栈的好处,尤其是LLVM CLAN解析器给C++编译带来的好处。我现在想知道是否有任何Python接口可以用来作为Clang现有代码生成任务的基础?在


Tags: 解析器源代码过程基础代码生成llvmclangclan
1条回答
网友
1楼 · 发布于 2024-06-01 10:42:26

{在开始挖掘之后,我会发现一些有用的东西:

In the LLVM 2.7 time-frame, the Clang team has made many improvements....

CIndex API and Python bindings: Clang now includes a C API as part of the CIndex library. Although we make make some changes to the API in the future, it is intended to be stable and has been designed for use by external projects. See the Clang doxygen CIndex documentation for more details. The CIndex API also includings an preliminary set of Python bindings.

我不知道这在实践中是多么有用,看起来它可能是构建基于LLVM的PygccXML等价物的基础,但它本身并不是一个库。在

相关问题 更多 >