Kein-Hong Man:

It would be nice if there is a simple mechanism for extending
existing lexers. Say, colour all wx* identifiers in a certain way,
or add new keyword sets without needing to recompile. For long
pieces of code with lots of long identifiers (GTK+ code for
example), I for one would appreciate the improved readability.

  Languages often have multiple sets of keywords for different
contexts: C++ has identifier-like keywords and keywords in
documentation comments. HTML has tags, attributes, and scripting
language keywords. Its not just a case of having identifier-like
keywords that can be expanded into multiple states.

  The static allocation of style values gets in the way of allowing
extension in this manner. If your extended C++ lexer defines style 19
as an extra identifier keyword style then this will be broken when the
base C++ lexer defines some new states. If you count down from maximum
state for extended lexer styles then you will eventually clash with
base lexer styles. There are also issues in how to write the base
lexer to handle values outside its understood range. These are the
sorts of issues that SinkWorld tries to address.

  Neil
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to