This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c++ code completion status report
- From: Gregor Zeitlinger <zeitling at informatik dot hu-berlin dot de>
- To: <kdevelop-devel at kdevelop dot org>
- Cc: GCC development mailing list <gcc at gcc dot gnu dot org>
- Date: Tue, 8 Jan 2002 16:07:43 +0100 (CET)
- Subject: Re: c++ code completion status report
- Reply-to: <gregor at zeitlinger dot de>
(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@zeitlinger.de