C++ parser
Roberto Raggi
roberto at kdevelop.org
Thu Jun 2 17:34:04 UTC 2005
Hi Hamish,
On Wednesday 01 June 2005 16:53, Hamish Rodda wrote:
> Hi Robe,
> Nice :) You're planning on implementing incremental parsing / parsing only
> of changed text, correct? The internals in Kate are certainly ready to
yeap!
> handle providing this information. It will be easy to associate ASTs with
> ranges in the text, and then when the text changes, the most specific
> changed region (smallest which encapsulates all of the changes) could
> inform either the AST or the parser of the change, eg. via a signal. The
yeah I like the idea to use the kate internals as an incremental lexer!! I'm
sure we can make it _right_ for 4.0 :-)
> parser can then attempt to quickly determine what change has occurred, and
> the vast majority of the time, it should be a simple matter for the parser
> to account for this in realtime (or near-realtime if we decide to use
> threads). It might require the use of an equivalent LocationTable class
> which uses smart cursors to stay up to date... I'm not too familiar with
> the code yet.
>
> Would it make sense to do parsing in the background, ie. for cases where a
> small change triggers a large amount parsing? Do you think making the kate
> text buffer reentrant would make sense? I'm just wary of avoiding
> occasional interference to the ui if we decide to switch to realtime
> parsing.
the best is to
>
> I guess the idea of multi-pass parsing is to shorten the time the parser
> holds things up, at the expense of increased latency of AST data? Or is it
> for accuracy / speed of parsing?
>
> I can't wait to see kdevelop4 with (and I'm imagining :) in-place code
> refactoring, code logic navigation, much improved highlighting, etc etc...
>
> Hope what I've written makes sense :)
>
> Cheers,
> Hamish.
More information about the KDevelop-devel
mailing list