c++ code completion status report

Gregor Zeitlinger zeitling at informatik.hu-berlin.de
Tue Jan 8 16:09:02 UTC 2002

(for the gcc mailing list)
I thought this might be interesting to you...

On Mon, 7 Jan 2002, Richard Dale wrote:
> But one the other hand, I like the idea of using the gcc 3.0.x preprocessor,
> tokenizer and bison grammar code as a starting point in 'advancedcpp'. Then
> gideon would become a sort of 'Visual gcc'. It isn't that your grammar would
> be any better or worse than the gcc one, but actually using the same code
> from gcc for class browsing and code completion etc. would be new in an IDE I
> believe.
Right. I think this can be the only preferred way (tm), because it's the
only way to make vgcc behave like gcc.

I'd even go further: Why parsing the files over and over to do code
completion instead of doing an incremental parse, that is to say: look
what changed and change the internal representation of the c code
accordingly. That way code completion code be sped up from maybe 30
seconds to about one. I reckon, however, that this is much more complex.

Maybe we'd be able to use the internal representation of gcc, or access it
through a well defined interface to avoid having to struggle with bison,
flex and the c preprocessor at all. If we adopted that approach, the
incremental parsing would become a feature of gcc and other IDE's would be
able to use it as well.

Anyways... I just added the gcc mailing list, to hear their opinions on
the topic. Maybe the problem is already solved :)

Gregor Zeitlinger
gregor at zeitlinger.de

More information about the KDevelop-devel mailing list