How does parsing and duchainbuilding work?

Hamish Rodda rodda at
Thu Jul 26 01:14:35 UTC 2007

On Thursday 26 July 2007 08:32, Andreas Pakulat wrote:
> Hi,
> maybe one of our C++ guys has already explained this, but I'm currently
> missing information on what exactly happens (in which order) when a file
> is parsed. I'd like to understand (without having to read all the stuff
> in the C++ support):
> What happens after the parsing itself is done?


(btw, are these docs built + posted online somewhere?)

> How does the editorintegrator fit into the picture - I first thought its
> a singleton, but its not, so where does it get created (or better: Where
> is a Contextbuilder created)?

It and contextbuilder are created in CPPInternalParseJob::run().  The editor 
integrator makes it easy to create editor ranges etc. from AST nodes & token 

> I think this is pretty vital information to get from a plain parser to a
> language support plugin. I mean the "duchain-building" part is pretty
> clear, an AST visitor that walks the AST and creates duchain-objects
> during that. But how is the building triggered? What classes are needed
> to build it?

Hope it's clearer now.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the KDevelop-devel mailing list