c++ code completion status report

Thomas Schilling snuffeler at gmx.net
Mon Jan 7 13:49:18 UTC 2002


> > another approach, aside from timed refresh, is by
> > monitoring the TIMESTAMP of these files.  rarely would
> > a system screw-up on its timestamp of files, so its
> > reliable.

You could determine if the file changed since last parsing. That's ok.
My problem was the following:
You have several files open and edit some here and there. The files
depend on each other. So if a file changes code completion must reparse
it - but when? When the file is saved? Or even if it's not saved but was
changed, so reparsed in a (constant) time period.
But I think that's no great problem.

> Well yes, I'd mentioned that. You have to do a dependency analysis on each
> processed file and store the output of type analysis. The difficult issue
> being here is that type analysis is _not_ a tree of class information. I
> still maintain that you have to write 1/2 of the complete C++ semantic
> analysis for proper code completion. Whether it's worth it, I have no
idea.

I hope it is. ;-)

> I'm hearing that Thomas is writing a C++ grammar. That is doable, but the
> hard part is the semantics. Is he constructing complete C++ type
information
> as well?

No I'm not writing it totally new. That would be a waste of time. But I need
a good concept for type information and currently I'm wondering how
to temporarily modify trees or strings (efficiently).






More information about the KDevelop-devel mailing list