beaver-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Beaver-devel] The future of syntax highlighting


From: Leslie Polzer
Subject: Re: [Beaver-devel] The future of syntax highlighting
Date: Wed, 12 Mar 2003 07:38:54 +0100

On Tue, 11 Mar 2003 15:47:52 -0500
Michael Terry <address@hidden> wrote:

> The way I solved this was to update the GUI as we highlight, if we take 
> over half a second to highlight.  This slows down total highlight time, 
> but increases perceived responsiveness.  This solution seems to work ok.
This solution is inacceptable from my PoV.
 
> However, it might be worthwhile to acquire a better solution.  For 
> example, we were talking about Scintilla.  SciTE, based on Scintilla, 
> does a tremendously fast job of highlighting (at least, I've never 
> noticed the highlighting, which is arguably our goal -- that the user 
> never notices it; it just happens).  I've spent a moment looking at the 
> code, and it has specific highlight engines for different languages. 
> This might be a consideration for us.
AFAIK SciTE uses its own Lexer. While I do not know why they don't use
flex this might be a consideration for Beaver. The big advantage is the
excellent speed of a determined finite state automaton - the
disadvantage is that the syhi files cannot be changed at runtime.
The way between speed and flexibility might be regular expressions
compiled at Beaver start.
Both solutions need another dependency for Beaver.

> I'm not sure if we want to actually use Scintilla ourselves, since it is 
> written in C++, seems tied to GtkTextisms (rather than GtkTextViewisms), 
> and uses a different signaling model than GTK+.
Most likely we don't want to use Scintilla.
 
> I'm not sure what we could do differently with a language-specific 
> parser though.  We would still have to go through and look for 
> delimiters.  We would still have to look up keywords in some data 
> structure (a hash table still seems optimal).  The wordfile system we 
> use now is just a generic way of describing a language.  I don't think 
> we are losing speed because of this genericness.
Me neither - all the facts above regarding flex and regexes apply here.
 
> How do you feel about the current syhi speed?
Good question. I'll answer that one as soon as my SSH key works on
Savannah CVS :( Did you encounter any problems with yours?
I even generated a new one and double-checked all possible errors,
but it still does not work.
If it still doesn't work today I'm going to download the 0.3.0
release and send a mail to savannah-hackers.

Leslie




reply via email to

[Prev in Thread] Current Thread [Next in Thread]