[QScintilla] A Lexer for a XML based language

Phil Thompson phil at riverbankcomputing.com
Fri Jul 16 09:14:28 BST 2010


On Wed, 14 Jul 2010 00:06:42 -0300, Bruno Lima <bslima19 at gmail.com> wrote:
> Good night,
> First i wanna congratulate this project, i think is gonna help me out in
my
> personal GPL project.
> 
> I'm writing a authoring tool for NCL (Nested Context Language).
> NCL is a xml-based language but different from xml languages has the
notion
> of scopes.
> I wanna have a editor that can suggest code depending on the scope that
the
> user is editing the code.
> My question is, for do that am i have to implement a Scintilla Lexer ?
or
> just sub-class the QsciLexerXML ?

The QsciLexer classes are simply containers for the configuration of the
corresponding underlying Scintilla lexers.

The Scintilla lexers are designed to recognise different language elements
so that they can be rendered differently (different colours, fonts etc.). A
typical lexer has no understanding of the overall structure of the
document.

You probably want to look at how Scintilla/QScintilla implements call tips
and auto-completion.

Phil


More information about the QScintilla mailing list