[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Incremental parsing with LPEG
- From: KHMan <keinhong@...>
- Date: Wed, 01 Jun 2011 21:02:25 +0800
On 6/1/2011 8:42 PM, Greg wrote:
Is it possible to use LPEG to create an incremental parser.
I'm trying to add syntax highlighting to an in-house lua editing suite.
Currently I parse the entire file after every keystroke which is fine on small
files but really slows down with larger files.
I'd like to be able to just reparse the line that has changed or possibly the
next couple of lines, instead of the whole document. Any suggestions?
How much functionality do you need? If you are not looking at
disambiguating locals/globals, it's easier to stick to just a
lexer like the one in Scintilla.
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia