c++ code completion status report

Richard Dale Richard_Dale at tipitina.demon.co.uk
Fri Jan 4 13:47:04 UTC 2002


On Thursday 03 January 2002 10:55 pm, ian reinhart geiser wrote:
> On Thursday 03 January 2002 17:34, you wrote about Re: c++ code completion
>
> status report:
> > I heart on an oter list that gcc 3.x.x support a XML output of the class
> > member like the database of VC++ when it compile some source. Maybe
> > that's is also a way to go?
>
> no it is not, because it knows nothing of signals and slots
>
> ideally the ONLY parser that is aware of this and has XML output is
> doxygen. I was able to write  a "object" viewer of my code using Doxygen
> and QDOM in about 150 lines and it was reasonably fast ( 15 classes each
> with 5-6 functions) in about 4 seconds on a Athlon 800.  The time seemed
> split between the parseing and the XML rendering.  I left it at that but
> ideally if you talke VERY nicely to the Doxygen  guy you may be able to use
> his parser and then just create a QDOM object, then use that accordingly
>
> DOMS are expensive to create from what i have found but once you have one
> they are very fast. Basicly they are dictonary data structures.  If you
> could use doxygen's parser to create a DOM you are about 90% of the way
> there.  The other 10% ( the UI ) i have no clue about, since all i wanted
> was a robust class veiw and I stopped there.
The Qt moc tool is gpl'd and has a yacc grammar with slots/signals parsing. 
I've just been looking at Borland's hacked version they used to generate 
their Pascal/Qt bindings for Kylix, so it can be adapted to other uses quite 
easily..

KDE Studio uses QDom for its class store - I did a brief comparison between 
Studio and KDevelop and found that KDevelop was slightly faster (Bernd also 
thought QDom would use more memory, but I didn't measure that). Much more 
time was spent parsing than writing to the class store in both IDE's. Would a 
be a good idea to profile gideon when it parses the source files for a 
project? Then we would know whether the time is going on lexical analyis, 
parsing or class store writes? John Birch did some measurements on KDevelop 
2.0 a while ago and found that the lexer was taking most of the mill. 

But why do we need a persistant class store anyway, using xml or otherwise? On 
startup, will it determine which source files have changed since the class 
store was last written to, and only parse those?

-- Richard




More information about the KDevelop-devel mailing list