From: Neil Hodgson Date: 2002-09-08T06:52:00+09:00 Subject: Re: SciTE/VIM Syntax highlighting Albert Wagner: > I just spent the last six weeks trying to write an editor using the Ruby lexer > from irb to aid in syntax highlighting. So at the moment, I am of the > opinion that a proper lexer is probably not fast enough to be anything more > than an aggravation in syntax highlighting :-) Lexing generally requires very little state compared to parsing and so can be done well incrementally. For an editor, most modifications only change the contents of one line and you often only need to relex that line. Longer lexemes like multi-line comments may require more effort but only when the modification creates a comment start or end or removes a comment start or end. Neil