phodal / chapi

CHAPI (Common Hierarchical Abstract Parser and Information Converter) streamlines code analysis by converting diverse language source code into a unified abstract model, simplifying cross-language development. Chapi 是一个通用层次抽象解析器与信息转换器,它可以将不同编程语言的源代码转换为统一的层次抽象模型。
https://chapi.phodal.com/
Mozilla Public License 2.0
270 stars 44 forks source link

是否考虑直接利用semantic之类的工具export #17

Closed williamfzc closed 2 years ago

williamfzc commented 2 years ago

hi~ 我近几年的工作同样聚焦在代码分析,也在寻找同类型的工具,感谢开源

不过对于 chapi 同定位的产品,其实github已经把它们自己用的工具开源了,同样基于AST分析支持dump成统一格式 https://github.com/github/semantic

按我理解,这个仓库只是coca的下游,有别的现成工具来替代似乎能将有限的精力放到性价比更高的事情(如缺陷分析逻辑)上? 而且业界似乎在元数据描述这一块没有达成很明确的规范?我做过chapi类似的产品(antlr4+ast,一样的架构),但最终也纠结于此而暂停了

不知道您对此看法如何:)

phodal commented 2 years ago

上游在这里: https://github.com/archguard

phodal commented 2 years ago

semantic 应该不如 TreeSitter 好用。但是,本身现有的工具 Chapi 是为了构建编译相关的能力……,所以并不会考虑使用同类的产品