Colleagues of DUChain
nicolas.alvarez at gmail.com
Wed Sep 8 20:05:02 UTC 2010
On 08/09/2010, Paul Fee <pfee at talk21.com> wrote:
> Hi all,
> Over on the Boost mailing list, there's a thread about Scalpel, a source
> code analysis library which can expose the code's structure to other
> components such as editors.
> The conclusion was that LLVM/clang provides similar functionality and it
> would be better to support an established project than start another project
> tackling similar issues.
> Another useful project highlighted was GCCSense
> To me these seem to be overlap with KDevelop's DUChain. I'm not familiar
> enough with clang, GCCSense, DUChain or Scalpel, but do they perform similar
> tasks and which should KDevelop be using?
> Does DUChain have features the others lack or vice versa? Would KDevelop
> benefit from having a look at these similar projects?
I don't know too much about anything you listed either, but... Scalpel
is a C++ parser, GCCSense seems to be tools that use gcc's C++ parser,
and clang is a C/C++/Objective-C parser. LLVM is language-agnostic but
afaik the information it has is in a different level (made for
compiler optimization, not for source code knowledge).
DUchain is not a parser, it's a language-agnostic framework storing
information about code. There is nothing C++-specific in it. KDevelop
has a C++ parser that loads stuff into duchain data structures, but
there is also a high-quality plugin doing the same for PHP, and some
others in development for other languages.
I don't really see the other projects you listed going to implement
support for PHP or Python or CMake anytime soon ;)
However, those projects are still interesting, and there may be
possibilities of integrating them into KDevelop. For example, someone
was experimenting with replacing KDevelop's C/C++ preprocessor with
Boost.Wave, which is way more standards-compliant. And maybe clang's
API is suitable for integrating it in DUChain...
More information about the KDevelop-devel