Neon wrote:
...
Initially, I would like syntax colorization, then maybe move on to some of the more advanced language support features such as completion and folding.

This is where we all start... think of the lexers as tokenizers. For practical purposes, they will be in C/C++. If a given lexer's *syntax rules* match closely enough with the new language you want to support (differing in added/removed/changed keywords), you are in luck.

Things that are hard to change include commenting mechanisms, string and numeric literal construction rules, and how identifiers are put together... i.e., how tokens may be [de]constructed. Note that lexers MAY (if they are written *intended* to be used by multiple languages) support various option settings ("properties") that allow increased flexibility in what is recognized as valid tokens.

At the lexer level, what is really done is to break up input streams into tokens according to the rules of the supported language(s) and assign "style numbers" to each different type of token - possibly modified by comparing against one or more keyword lists. But outside of recognized keywords, if a lexer feels that e.g., floating point numbers are assigned style "13", then that is it.

The keyword lists provide only a little more external control: typically, a token must be seen as a legal identifier of some kind, and then the keyword lists for that lexer are searched in order. If a match is found, then the style associated with that keyword list (or "class") is assigned - otherwise, the generic style for "identifiers" in that lexer is assigned.

Where you (or a user) gets what control is to be had with a lexer is with the "properties files". That is where the actual keyword lists are specified and where the "style numbers" are mapped to actual sets of Scintilla text display attributes (font face, size, color, etc). You can see how different languages are supported by one lexer in the "cpp" properties file - but don't let your head explode if you check out the "html" properties file! :)

...
It would be nice if this information is captured on the SciTE website, so that more languages can be supported under SciTE.

It looks like you will be an ideal candidate for this (with your new language support work fresh in your mind and all). ;)

Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to