Hi, in the past I've used few different syntax highlighting libraries such as pygments, syntect, qt's syntax highlighter or qscintilla's lexers on top of QScintilla.
Right now I'd like to explore the idea of using Antlr to provide syntax highlighting on my text editor written in python+QScintilla.
Right now I've learned how to get all tokens + positions from the whole text and I think that could work with little chunks of texts on every keystroke. I'm afraid
doing that is not the right way to rehighlight text and I'd like to learn how to make proper syntax highlighting on large files using Antlr lexers/parsers.
Could anyone please explain me what'd be the algorithm/s to use here? Furthermore, scintilla support multi-cursor editing so it may happen
that you need to rehighlight the whole file (think about adding a multiline comment at the beginning of the file)... and if the file is big I'm not sure rehighlighting
the whole text on each keystroke would the smartest choice here.
Thanks in advance