Issue with KDevelop: Is it using different parsers in parallell for different puropuses?

Hamish Rodda rodda at kde.org
Tue Aug 15 01:21:06 UTC 2006


On Tuesday 15 August 2006 03:59, Jakob Petsovits wrote:
> On Monday, 14. August 2006 19:17, Andreas Pakulat wrote:
> > On 14.08.06 17:00:15, Erik Sigra wrote:
> > > On 14.08.06 13:30:19, Erik Sigra wrote:
> > > > 2. kate is an editor it's not part of kdevelop and the kdevelop
> > > > developers have only partial influence on what the kate developers
> > > > use for parsing files.
> > >
> > > Kate is part of KDevelop when I am using KDevelop
> >
> > No it's not. KDevelop using Kate as the only implementation of the
> > KTextEditor interface doesn't make it a part of kdevelop, especially not
> > in terms of development changes. Kate is it's own project.
>
> There is a connection between KDevelop and Kate, and that's Hamish Rodda
> who is hacking both. For KDevelop 4, there have been some extensions in the
> KTextEditor interface which allow to integrate KDevelop's own parsers to a
> certain level, including highlighting. Hamish is working on that for the
> C++ parser.

Exactly.  What Erik wants (or almost, seeing as we don't use ANTLR but 
kdevelop-pg for kdevelop4) will be present in kdevelop4.  For c++/c#/java 
(and possibly others) we will be doing the highlighting solely in kdevelop.

> > > > 3. Kate probably doesn't need all the extra information ANTLR has
> > >
> > > I am not so sure about that. I have seen suboptimal
> > > highlighting/folding/indenting/linewrapping because Kate's primitive
> > > parsers do not understand the languages well enough.

Mostly it's just that kate has bugs.

> > > I estimate that using an ANTLR-generated parser for highlighting will
> > > be faster than using a parser, with the same level of code
> > > understanding, defined in XML.

The incremental parsing of ANTLR would be miraculous if it were faster than 
kate's... kate can re-highlight from the start of any line, whereas it's my 
guess that ANTLR would probably need to run from a recovery point, and 
wouldn't be able to stop arbitrarily like Kate's.

> > > > If you think kate should use an antlr parser please write to
> > > > kwrite-devel and start the discussion there.
> > >
> > > I was not thingking along those lines. For the time being I just wanted
> > > to know if the more advanced parsers that KDevelop already has could
> > > take over some tasks that the Katepart does, and do them better.
>
> As I said above, it will be possible for KDE 4, and it's worked on for C++
> at the moment. I believe it's not for performance reasons though, but
> rather for correctness also in corner cases. Hamish?

Using a true parser will allow much more intricate highlighting that provides 
better visual clues to the programmer.  Look forward to this for kdevelop4...

Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20060815/2130a0a0/attachment.sig>


More information about the KDevelop-devel mailing list