PageRenderTime 25ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
HTML | 16 lines | 16 code | 0 blank | 0 comment | 0 complexity | b3d279030fab8abb08965ecacdc9611e MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  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.73.2"><link rel="start" href="index.html" title="jEdit 4.3 User's Guide"><link rel="up" href="writing-modes.html" title="Chapter 10. Mode Definition Syntax"><link rel="prev" 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><p>The <code class="literal">KEYWORDS</code> tag, which must be placed inside a
  2. <code class="literal">RULES</code> tag and can only appear once, specifies a list
  3. of keywords to highlight. Keywords are similar to
  4. <code class="literal">SEQ</code>s, except that <code class="literal">SEQ</code>s match
  5. anywhere in the text, whereas keywords only match whole words. Words are
  6. considered to be runs of text separated by non-alphanumeric
  7. characters.</p><p>The <code class="literal">KEYWORDS</code> tag does not define any
  8. attributes.</p><p>Each child element of the <code class="literal">KEYWORDS</code> tag is an
  9. element whose name is a token type, and whose content is the keyword to
  10. highlight. For example, the following rule highlights the most common
  11. Java keywords:</p><pre class="programlisting">&lt;KEYWORDS&gt;
  12. &lt;KEYWORD1&gt;if&lt;/KEYWORD1&gt;
  13. &lt;KEYWORD1&gt;else&lt;/KEYWORD1&gt;
  14. &lt;KEYWORD3&gt;int&lt;/KEYWORD3&gt;
  15. &lt;KEYWORD3&gt;void&lt;/KEYWORD3&gt;
  16. &lt;/KEYWORDS&gt;</pre></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>