Lexer - is a configuration of lexis analysing component. It is a resource, it is not a separate code implementation.
No programming is required to create support for new text file format.
Lexis analysis is based on the syntax rules. There are three type of rules:
Styles is used to define text drawing params. It is possible multiple stylies will be applied to a portion of text. Style merging procedure specifies sequence in which styles are merged into canvas params.
Lexer library - is a collection of lexers. It allows to automate file extension managing for selecting appropriate lexer, constructing filter for open|save dialogs, open/save lexers into single file.
If you use nested lexers it's recomendned to include master and slave lexers into lexer library.