The KEYWORDS
tag, which must be placed inside a
RULES
tag and can only appear once, specifies a list of
keywords to highlight.
Keywords are similar to SEQ
s, except that
SEQ
s match anywhere in the text, whereas keywords only
match whole words. Words are considered to be runs of text separated by
non-alphanumeric characters.
The KEYWORDS
tag does not define any attributes.
Each child element of the KEYWORDS
tag is an element
whose name is a token type, and whose content is the keyword to
highlight. For example, the following rule highlights the most common Java
keywords:
<KEYWORDS> <KEYWORD1>if</KEYWORD1> <KEYWORD1>else</KEYWORD1> <KEYWORD3>int</KEYWORD3> <KEYWORD3>void</KEYWORD3> </KEYWORDS>