[QScintilla] Lexer Issue

Micha Bieber qtlist at traits.de
Mon Sep 4 00:35:23 BST 2006


@list,

let's suppose, someone out there plans to add a lexer to QScintilla - a
complete new one, not related to the existing classes, with an option to
access them from python. What has he todo, in order to be successful? At
this very moment I'm trying to utilize a QScintilla based widget from
PyQt.
I have a large legacy project with accordingly dimensioned configure.ac
et al in front of me. I'm not crazy enough to expect some complete M4
parser, but at least my application should eventually be able to extract
some kind of skeleton from this auto** stuff and assist in transforming
the build process from autoconf to cmake.
Seemingly I cannot use one of the predefined lexer classes as a base
class for my customized variant. Some things are hardwired - the used
enums in QextScintillaLexerXXX::description(), the return value of
QextScintillaLexerXXX::lexer() and possibly more. I still haven't yet
the whole picture, but advices given in

http://scintilla.sourceforge.net/Lexer.txt
http://sphere.sourceforge.net/flik/docs/scintilla-container_lexer.html

seem to indicate a chance to inject a new parser at C/C++ level. Also,
QextScintillaBase contains an enum value SCLEX_CONTAINER, apparently
related to the task but more or less undocumented. In spite of this, sip
seemingly imposes some limitations (I'm not an expert in bindings).
Could someone elaborate?

Micha
-- 



More information about the QScintilla mailing list