The SEQ rule, which must be placed inside a RULES tag, highlights fixed sequences of text. The text to highlight is specified between opening and closing SEQ tags. The following attributes are supported:
TYPE - the token type to highlight the sequence with. See the section called “Token Types” for a list of token types.
AT_LINE_START - If set to TRUE, the sequence will only be highlighted if it occurs at the beginning of a line.
AT_WHITESPACE_END - If set to TRUE, the sequence will only be highlighted if it is the first non-whitespace text in the line.
AT_WORD_START - If set to TRUE, the sequence will only be highlighted if it occurs at the beginning of a word.
DELEGATE - if this attribute is specified, all text after the sequence will be highlighted using this ruleset. To delegate to a ruleset defined in the current mode, just specify its name. To delegate to a ruleset defined in another mode, specify a name of the form mode::ruleset. Note that the first (unnamed) ruleset in a mode is called “MAIN”.
The following rules highlight a few Java operators:
<SEQ TYPE="OPERATOR">+</SEQ> <SEQ TYPE="OPERATOR">-</SEQ> <SEQ TYPE="OPERATOR">*</SEQ> <SEQ TYPE="OPERATOR">/</SEQ> |