PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 4ms RepoModel.GetById 37ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/42docs/users-guide/mode-rule-keywords.html

#
HTML | 21 lines | 21 code | 0 blank | 0 comment | 0 complexity | b644c32965af8ebcab6b8b9e51bda336 MD5 | raw file
 1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The KEYWORDS Tag</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="jEdit 4.2 User's Guide"><link rel="up" href="writing-modes.html" title="Chapter 10. Mode Definition Syntax"><link rel="previous" href="mode-rule-import.html" title="The IMPORT Tag"><link rel="next" href="mode-syntax-tokens.html" title="Token Types"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The KEYWORDS Tag</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mode-rule-import.html">Prev</a> </td><th width="60%" align="center">Chapter 10. Mode Definition Syntax</th><td width="20%" align="right"> <a accesskey="n" href="mode-syntax-tokens.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mode-rule-keywords"></a>The KEYWORDS Tag</h2></div></div><div></div></div><p>
 2   The <tt class="literal">KEYWORDS</tt> tag, which must be placed inside a
 3   <tt class="literal">RULES</tt> tag and can only appear once, specifies a list of
 4   keywords to highlight.
 5   Keywords are similar to <tt class="literal">SEQ</tt>s, except that
 6   <tt class="literal">SEQ</tt>s match anywhere in the text, whereas keywords only
 7   match whole words. Words are considered to be runs of text separated by
 8   non-alphanumeric characters.
 9  </p><p>
10   The <tt class="literal">KEYWORDS</tt> tag does not define any attributes.
11  </p><p>
12   Each child element of the <tt class="literal">KEYWORDS</tt> tag is an element
13   whose name is a token type, and whose content is the keyword to
14   highlight. For example, the following rule highlights the most common Java
15   keywords:
16  </p><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting">&lt;KEYWORDS&gt;
17  &lt;KEYWORD1&gt;if&lt;/KEYWORD1&gt;
18  &lt;KEYWORD1&gt;else&lt;/KEYWORD1&gt;
19  &lt;KEYWORD3&gt;int&lt;/KEYWORD3&gt;
20  &lt;KEYWORD3&gt;void&lt;/KEYWORD3&gt;
21&lt;/KEYWORDS&gt;</pre></td></tr></table></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mode-rule-import.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="writing-modes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="mode-syntax-tokens.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The IMPORT Tag </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Token Types</td></tr></table></div></body></html>