Hacker News new | past | comments | ask | show | jobs | submit login

I have to agree with Diego Novillo's comment about Clang's parser. Projects like the Clang complete vim plugin come to mind. Ctags/Cscope doesn't really work to well with overloaded functions and having something that "understands" the language rather than just matching patterns helps.



KDevelop has a very sophisticated C++ parser (duchain I think they call it) which even provides semantic information (e.g. you can syntax highlight pointers differently from objects, non-virtual method calls different from virtual, etc.)

Example overview: http://zwabel.wordpress.com/2009/01/08/c-ide-evolution-from-...


But one of the points of Clang's toolability is that you don't have to write your own parser. You can use the compiler's and see what the compiler will see, avoiding inconsistencies as well as unnecessary work.


DUChain actually might even predate Clang from what I've been able to dig up today, but there's a few other points working against Clang supplanting it:

1. DUChain was designed to support multiple languages (since KDevelop does). E.g. there is work going on now to offer first-class JavaScript support in KDevelop, which libclang wouldn't help with.

2. No one has done the work to verify API/ABI compatibility guarantees, porting libclang into DUChain, etc.

There's interest though:

https://bugs.kde.org/show_bug.cgi?id=253650 https://bugs.kde.org/show_bug.cgi?id=172622




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: