lua-users home
lua-l archive

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


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.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia