PageRenderTime 88ms CodeModel.GetById 72ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 1ms

/jEdit/tags/jedit-4-1-pre5/doc/users-guide/writing-modes.xml

#
XML | 531 lines | 523 code | 6 blank | 2 comment | 0 complexity | af6f31dbe096f406d46e526e0871facc MD5 | raw file
  1<!-- jEdit buffer-local properties: -->
  2<!-- :indentSize=1:noTabs=true: -->
  3
  4<chapter id="writing-modes"><title>Writing Edit Modes</title>
  5 <para>
  6  Edit modes are defined using XML, the <firstterm>extensible markup
  7  language</firstterm>; mode files have the extension
  8  <filename>.xml</filename>. XML is a very simple language, and as a result
  9  edit modes are easy to create and modify. This section will
 10  start with a short XML primer, followed by detailed information about
 11  each supported tag and highlighting rule.
 12 </para>
 13 <para>
 14  Note that changes to mode files take effect immediately;
 15  editing a mode or a mode catalog file within jEdit will cause the
 16  file to be re-parsed as soon it is saved.
 17 </para>
 18 <para>
 19  The <guimenu>Utilities</guimenu>&gt;<guimenuitem>Reload Edit Modes</guimenuitem>
 20  command can be used to reload edit modes after changes to mode files are made
 21  outside jEdit.
 22 </para>
 23 <sect1 id="xml-primer"><title>An XML Primer</title>
 24  <para>
 25   A very simple edit mode looks like so:
 26  </para>
 27  <programlisting><![CDATA[<?xml version="1.0"?>
 28
 29<!DOCTYPE MODE SYSTEM "xmode.dtd">
 30
 31<MODE>
 32    <PROPS>
 33        <PROPERTY NAME="commentStart" VALUE="/*" />
 34        <PROPERTY NAME="commentEnd" VALUE="*/" />
 35    </PROPS>
 36
 37    <RULES>
 38        <SPAN TYPE="COMMENT1">
 39            <BEGIN>/*</BEGIN>
 40            <END>*/</END>
 41        </SPAN>
 42    </RULES>
 43</MODE>]]></programlisting>
 44  <para>
 45   Note that each opening tag must have a corresponding closing tag.
 46   If there is nothing between the opening and closing tags, for example
 47   <literal>&lt;TAG&gt;&lt;/TAG&gt;</literal>, the shorthand notation
 48   <literal>&lt;TAG /&gt;</literal> may be used. An example of this shorthand
 49   can be seen
 50   in the <literal>&lt;PROPERTY&gt;</literal> tags above.
 51  </para>
 52  <para>
 53   XML is case sensitive. <literal>Span</literal> or <literal>span</literal>
 54   is not the same as <literal>SPAN</literal>.
 55  </para>
 56  <para>
 57   To insert a special character such as &lt; or &gt; literally in XML
 58   (for example, inside an attribute value), you must write it as
 59   an <firstterm>entity</firstterm>. An
 60   entity consists of the character's symbolic name enclosed with
 61   <quote>&amp;</quote> and <quote>;</quote>. The most frequently used entities
 62   are:
 63  </para>
 64  <itemizedlist>
 65   <listitem><para><literal>&amp;lt;</literal> - The less-than (&lt;)
 66   character</para></listitem>
 67   <listitem><para><literal>&amp;gt;</literal> - The greater-than (&gt;)
 68   character</para></listitem>
 69   <listitem><para><literal>&amp;amp;</literal> - The ampersand (&amp;)
 70   character</para></listitem>
 71  </itemizedlist>
 72  <para>
 73   For example, the following will cause a syntax error:
 74  </para>
 75  <programlisting>&lt;SEQ TYPE="OPERATOR"&gt;&amp;&lt;/SEQ&gt;</programlisting>
 76  <para>
 77   Instead, you must write:
 78  </para>
 79  <programlisting>&lt;SEQ TYPE="OPERATOR"&gt;&amp;amp;&lt;/SEQ&gt;</programlisting>
 80  <para>
 81   Now that the basics of XML have been covered, the rest of this
 82   section will cover each construct in detail.
 83  </para>
 84 </sect1>
 85 <sect1 id="mode-preamble"><title>The Preamble and MODE tag</title>
 86   <para>
 87    Each mode definition must begin with the following:
 88   </para>
 89   <programlisting>&lt;?xml version="1.0"?&gt;
 90&lt;!DOCTYPE MODE SYSTEM "xmode.dtd"&gt;</programlisting>
 91  <para>
 92   Each mode definition must also contain exactly one <literal>MODE</literal>
 93   tag. All other tags (<literal>PROPS</literal>, <literal>RULES</literal>)
 94   must be placed inside the <literal>MODE</literal> tag. The
 95   <literal>MODE</literal> tag does not have any defined attributes.
 96   Here is an example:
 97  </para>
 98  <programlisting><![CDATA[<MODE>]]>
 99    <replaceable>... mode definition goes here ...</replaceable>
100<![CDATA[</MODE>]]></programlisting>
101 </sect1>
102 <sect1 id="mode-tag-props"><title>The PROPS Tag</title>
103  <para>
104   The <literal>PROPS</literal> tag and the <literal>PROPERTY</literal> tags
105   inside it are used to define mode-specific
106   properties. Each <literal>PROPERTY</literal> tag must have a
107   <literal>NAME</literal> attribute set to the property's name, and a
108   <literal>VALUE</literal> attribute with the property's value.
109  </para>
110  <para>
111   All buffer-local properties listed in <xref linkend="buffer-local" />
112   may be given values in edit modes. In addition, the following mode
113   properties have no buffer-local equivalent:
114  </para>
115  <itemizedlist>
116   <listitem><para><literal>commentEnd</literal> - the comment end
117   string, used by the <guimenuitem>Range Comment</guimenuitem> command.
118   </para></listitem>
119   <listitem><para><literal>commentStart</literal> - the comment start
120   string, used by the <guimenuitem>Range Comment</guimenuitem> command.
121   </para></listitem>
122   <listitem><para><literal>lineComment</literal> - the line comment
123   string, used by the <guimenuitem>Line Comment</guimenuitem> command.
124   </para></listitem>
125   <listitem><para><literal>doubleBracketIndent</literal> -
126   If a line matches the <literal>indentPrevLine</literal> regular
127   expression and the next line contains an opening bracket,
128   a level of indent will not be added to the next line, unless
129   this property is set to <quote>true</quote>. For example, with this
130   property set to <quote>false</quote>, Java code will be indented like so:
131   </para>
132   <programlisting>while(objects.hasMoreElements())
133{
134        ((Drawable)objects.nextElement()).draw();
135}</programlisting>
136   <para>
137     On the other hand, settings this property to <quote>true</quote> will
138     give the following result:
139   </para>
140     <programlisting>while(objects.hasMoreElements())
141        {
142                ((Drawable)objects.nextElement()).draw();
143        }</programlisting></listitem>
144   <listitem><para><literal>indentCloseBrackets</literal> -
145   A list of characters (usually brackets) that subtract indent from
146   the <emphasis>current</emphasis> line. For example, in Java mode this
147   property is set to <quote>}</quote>.</para></listitem>
148   <listitem><para><literal>indentOpenBrackets</literal> -
149   A list of characters (usually brackets) that add indent to
150   the <emphasis>next</emphasis> line. For example, in Java mode this
151   property is set to <quote>{</quote>.</para></listitem>
152   <listitem><para><literal>indentPrevLine</literal> -
153   When indenting a line, jEdit checks if the previous line matches
154   the regular expression stored in this property. If it does, a level
155   of indent is added. For example, in Java mode this regular expression
156   matches language constructs such as
157   <quote>if</quote>, <quote>else</quote>, <quote>while</quote>, etc.</para>
158   </listitem>
159  </itemizedlist>
160  <para>
161   Here is the complete <literal>&lt;PROPS&gt;</literal> tag for Java mode:
162  </para>
163  <programlisting>&lt;PROPS&gt;
164    &lt;PROPERTY NAME="indentOpenBrackets" VALUE="{" /&gt;
165    &lt;PROPERTY NAME="indentCloseBrackets" VALUE="}" /&gt;
166    &lt;PROPERTY NAME="indentPrevLine" VALUE="\s*(((if|while)
167        \s*\(|else|case|default)[^;]*|for\s*\(.*)" /&gt;
168    &lt;PROPERTY NAME="doubleBracketIndent" VALUE="false" /&gt;
169    &lt;PROPERTY NAME="commentStart" VALUE="/*" /&gt;
170    &lt;PROPERTY NAME="commentEnd" VALUE="*/" /&gt;
171    &lt;PROPERTY NAME="blockComment" VALUE="//" /&gt;
172    &lt;PROPERTY NAME="wordBreakChars" VALUE=",+-=&lt;&gt;/?^&amp;*" /&gt;
173&lt;/PROPS&gt;</programlisting>
174 </sect1>
175 <sect1 id="mode-tag-rules"><title>The RULES Tag</title>
176  <para>
177   <literal>RULES</literal> tags must be placed inside the
178   <literal>MODE</literal> tag. Each <literal>RULES</literal> tag defines a
179   <firstterm>ruleset</firstterm>. A ruleset consists of a number of
180   <firstterm>parser rules</firstterm>, with each parser
181   rule specifying how to highlight a specific syntax token. There must
182   be at least one ruleset in each edit mode. There can also be more
183   than one, with different rulesets being used to highlight different
184   parts of a buffer (for example, in HTML mode, one rule set
185   highlights HTML tags, and another highlights inline JavaScript).
186   For information about using more
187   than one ruleset, see <xref linkend="mode-rule-span" />.
188  </para>
189  <para>
190   The <literal>RULES</literal> tag supports the following attributes, all of
191   which are optional:
192  </para>
193  <itemizedlist>
194   <listitem><para><literal>SET</literal> - the name of this ruleset.
195   All rulesets other than the first must have a name.
196   </para></listitem>
197   <listitem><para><literal>HIGHLIGHT_DIGITS</literal> - if set to
198   <literal>TRUE</literal>, digits (0-9, as well as hexadecimal literals
199   prefixed with <quote>0x</quote>) will be highlighted with the
200   <classname>DIGIT</classname> token type. Default is <literal>FALSE</literal>.
201   </para></listitem>
202   <listitem><para><literal>IGNORE_CASE</literal> - if set to
203   <literal>FALSE</literal>, matches will be case sensitive. Otherwise, case
204   will not matter. Default is <literal>TRUE</literal>.
205   </para></listitem>
206   <listitem><para><literal>DEFAULT</literal> - the token type for
207   text which doesn't match
208   any specific rule. Default is <literal>NULL</literal>. See
209   <xref linkend="mode-syntax-tokens" /> for a list of token types.
210   </para></listitem>
211  </itemizedlist>
212  <para>
213   Here is an example <literal>RULES</literal> tag:
214  </para>
215  <programlisting>&lt;RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"&gt;
216    <replaceable>... parser rules go here ...</replaceable>
217&lt;/RULES&gt;</programlisting>
218  <sect2><title>Rule Ordering Requirements</title>
219   <para>
220    You might encounter this very common pitfall when writing your own modes.
221   </para>
222   <para>
223    Since jEdit checks buffer text against parser rules in the order they appear
224    in the ruleset, more specific rules must be placed before generalized ones,
225    otherwise the generalized rules will catch everything.
226   </para>
227   <para>
228    This is best demonstrated with an example. The following is incorrect rule
229    ordering:
230   </para>
231   <programlisting><![CDATA[<SPAN TYPE="MARKUP">
232    <BEGIN>[</BEGIN>
233    <END>]</END>
234</SPAN>
235
236<SPAN TYPE="KEYWORD1">
237    <BEGIN>[!</BEGIN>
238    <END>]</END>
239</SPAN>]]></programlisting>
240   <para>
241    If you write the above in a rule set, any occurrence of <quote>[</quote>
242    (even things like <quote>[!DEFINE</quote>, etc) 
243    will be highlighted using the first rule, because it will be the
244    first to match. This is most likely not the intended behavior.
245   </para>
246   <para>
247    The problem can be solved by placing the more specific rule before the
248    general one:
249   </para>
250   <programlisting><![CDATA[<SPAN TYPE="KEYWORD1">
251    <BEGIN>[!</BEGIN>
252    <END>]</END>
253</SPAN>
254
255<SPAN TYPE="MARKUP">
256    <BEGIN>[</BEGIN>
257    <END>]</END>
258</SPAN>]]></programlisting>
259   <para>
260    Now, if the buffer contains the text <quote>[!SPECIAL]</quote>, the
261    rules will be checked in order, and the first rule will be the first
262    to match. However, if you write <quote>[FOO]</quote>, it will be highlighted
263    using the second rule, which is exactly what you would expect.
264   </para>
265  </sect2>
266  <sect2><title>Per-Ruleset Properties</title>
267   <para>
268    The <literal>PROPS</literal> tag (described in <xref linkend="mode-tag-props"/>)
269    can also be placed inside the <literal>RULES</literal> tag to define
270    ruleset-specific properties. Only the following properties can
271    be set on a per-ruleset basis:
272   </para>
273   <itemizedlist>
274    <listitem><para><literal>commentEnd</literal> - the comment end
275    string.
276    </para></listitem>
277    <listitem><para><literal>commentStart</literal> - the comment start
278    string.
279    </para></listitem>
280    <listitem><para><literal>lineComment</literal> - the line comment
281    string.
282    </para></listitem>
283   </itemizedlist>
284   <para>
285    These properties are used by the commenting commands to implement
286    context-sensitive comments; see <xref linkend="commenting"/>.
287   </para>
288  </sect2>
289  <sect2 id="mode-rule-terminate"><title>The TERMINATE Rule</title>
290   <para>
291    The <literal>TERMINATE</literal> rule specifies that parsing should stop
292    after the specified number of characters have been read from a line. The
293    number of characters to terminate after should be specified with the
294    <literal>AT_CHAR</literal> attribute. Here is an example:
295   </para>
296   <programlisting>&lt;TERMINATE AT_CHAR="1" /&gt;</programlisting>
297   <para>
298    This rule is used in Patch mode, for example, because only the first
299    character of each line affects highlighting. 
300   </para>
301  </sect2>
302  <sect2 id="mode-rule-span"><title>The SPAN Rule</title>
303   <para>
304    The <literal>SPAN</literal> rule highlights text between a start
305    and end string. The start and end strings are specified inside
306    child elements of the <literal>SPAN</literal> tag.
307    The following attributes are supported:
308   </para>
309   <itemizedlist>
310    <listitem><para><literal>TYPE</literal> - The token type to highlight the
311    span with. See <xref linkend="mode-syntax-tokens" /> for a list of token
312    types</para></listitem>
313    <listitem><para><literal>AT_LINE_START</literal> - If set to
314    <literal>TRUE</literal>, the span will only be highlighted if the start
315    sequence occurs at the beginning of a line</para></listitem>
316    <listitem><para><literal>EXCLUDE_MATCH</literal> - If set to
317    <literal>TRUE</literal>, the start and end sequences will not be highlighted,
318    only the text between them will</para></listitem>
319    <listitem><para><literal>NO_LINE_BREAK</literal> - If set to
320    <literal>TRUE</literal>, the span will be highlighted with the
321    <classname>INVALID</classname> token type if it spans more than one
322    line</para></listitem>
323    <listitem><para><literal>NO_WORD_BREAK</literal> - If set to
324    <literal>TRUE</literal>, the span will be highlighted with the
325    <classname>INVALID</classname> token type if it includes
326    whitespace</para></listitem>
327    <listitem><para><literal>DELEGATE</literal> - text inside the span will be
328    highlighted with the specified ruleset. To delegate to a ruleset defined
329    in the current mode, just specify its name. To delegate to a ruleset
330    defined in another mode, specify a name of the form
331    <literal><replaceable>mode</replaceable>::<replaceable>ruleset</replaceable></literal>.
332    Note that the first (unnamed) ruleset in a mode is called
333    <quote>MAIN</quote>.</para></listitem>
334   </itemizedlist>
335   <para>
336    Here is a <literal>SPAN</literal> that highlights Java string literals,
337    which cannot include line breaks:
338   </para>
339   <programlisting>&lt;SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE"&gt;
340   &lt;BEGIN&gt;"&lt;/BEGIN&gt;
341   &lt;END&gt;"&lt;/END&gt;
342&lt;/SPAN&gt;</programlisting>
343   <para>
344    Here is a <literal>SPAN</literal> that highlights Java documentation
345    comments by delegating to the <quote>JAVADOC</quote> ruleset defined
346    elsewhere in the current mode:
347   </para>
348   <programlisting>&lt;SPAN TYPE="COMMENT2" DELEGATE="JAVADOC"&gt;
349   &lt;BEGIN&gt;/**&lt;/BEGIN&gt;
350   &lt;END&gt;*/&lt;/END&gt;
351&lt;/SPAN&gt;</programlisting>
352   <para>
353    Here is a <literal>SPAN</literal> that highlights HTML cascading stylesheets
354    inside <literal>&lt;STYLE&gt;</literal> tags by delegating to the main
355    ruleset in the CSS edit mode:
356   </para>
357   <programlisting>&lt;SPAN TYPE="MARKUP" DELEGATE="css::MAIN"&gt;
358   &lt;BEGIN&gt;&amp;lt;style&amp;gt;&lt;/BEGIN&gt;
359   &lt;END&gt;&amp;lt;/style&amp;gt;&lt;/END&gt;
360&lt;/SPAN&gt;</programlisting>
361   <tip>
362    <para>
363     The <literal>&lt;END&gt;</literal> tag is optional. If it is not specified,
364     any occurrence of the start string will cause the remainder of the buffer
365     to be highlighted with this rule.
366    </para>
367    <para>
368     This can be very useful when combined with delegation.
369    </para>
370   </tip>
371  </sect2>
372  <sect2 id="mode-rule-eol-span"><title>The EOL_SPAN Rule</title>
373   <para>
374    An <literal>EOL_SPAN</literal> is similar to a <literal>SPAN</literal>
375    except that highlighting stops at the end of the line, not after the end
376    sequence is found. The text to match is specified between the opening and
377    closing <literal>EOL_SPAN</literal> tags.
378    The following attributes are supported:
379   </para>
380   <itemizedlist>
381    <listitem><para><literal>TYPE</literal> - The token type to highlight the span
382    with. See <xref linkend="mode-syntax-tokens" /> for a list of token
383    types</para></listitem>
384    <listitem><para><literal>AT_LINE_START</literal> - If set to
385    <literal>TRUE</literal>, the span will only be highlighted if the start
386    sequence occurs at the beginning of a line</para></listitem>
387    <listitem><para><literal>EXCLUDE_MATCH</literal> - If set to
388    <literal>TRUE</literal>, the start sequence will not be highlighted,
389    only the text after it will</para></listitem>
390   </itemizedlist>
391   <para>
392    Here is an <literal>EOL_SPAN</literal> that highlights C++ comments:
393   </para>
394   <programlisting>&lt;EOL_SPAN TYPE="COMMENT1"&gt;//&lt;/EOL_SPAN&gt;</programlisting>
395  </sect2>
396  <sect2 id="mode-rule-mark-prev"><title>The MARK_PREVIOUS Rule</title>
397   <para>
398    The <literal>MARK_PREVIOUS</literal> rule highlights from the end of the
399    previous syntax token to the matched text. The text to match
400    is specified between opening and closing <literal>MARK_PREVIOUS</literal>
401    tags. The following attributes are supported:
402   </para>
403   <itemizedlist>
404    <listitem><para><literal>TYPE</literal> - The token type to highlight the
405    text with. See <xref linkend="mode-syntax-tokens" /> for a list of token
406    types</para></listitem>
407    <listitem><para><literal>AT_LINE_START</literal> - If set to
408    <literal>TRUE</literal>,
409    the text will only be highlighted if it occurs at the beginning of
410    the line</para></listitem>
411    <listitem><para><literal>EXCLUDE_MATCH</literal> - If set to
412    <literal>TRUE</literal>, the match will not be highlighted,
413    only the text before it will</para></listitem>
414   </itemizedlist>
415   <para>
416    Here is a rule that highlights labels in Java mode (for example,
417    <quote>XXX:</quote>):
418   </para>
419   <programlisting>&lt;MARK_PREVIOUS AT_LINE_START="TRUE"
420    EXCLUDE_MATCH="TRUE"&gt;:&lt;/MARK_PREVIOUS&gt;</programlisting>
421  </sect2>
422  <sect2 id="mode-rule-mark-following"><title>The MARK_FOLLOWING Rule</title>
423   <para>
424    The <literal>MARK_FOLLOWING</literal> rule highlights from the start of the
425    match to the next syntax token. The text to match
426    is specified between opening and closing <literal>MARK_FOLLOWING</literal>
427    tags. The following attributes are supported:
428   </para>
429   <itemizedlist>
430    <listitem><para><literal>TYPE</literal> - The token type to highlight the
431    text with. See <xref linkend="mode-syntax-tokens" /> for a list of token
432    types</para></listitem>
433    <listitem><para><literal>AT_LINE_START</literal> - If set to
434    <literal>TRUE</literal>, the text will only be highlighted if the start
435    sequence occurs at the beginning of a line</para></listitem>
436    <listitem><para><literal>EXCLUDE_MATCH</literal> - If set to
437    <literal>TRUE</literal>, the match will not be highlighted,
438    only the text after it will</para></listitem>
439   </itemizedlist>
440   <para>
441    Here is a rule that highlights variables in Unix shell scripts
442    (<quote>$CLASSPATH</quote>, <quote>$IFS</quote>, etc):
443   </para>
444   <programlisting>&lt;MARK_FOLLOWING TYPE="KEYWORD2"&gt;$&lt;/MARK_FOLLOWING&gt;</programlisting>
445  </sect2>
446  <sect2 id="mode-rule-seq"><title>The SEQ Rule</title>
447   <para>
448    The <literal>SEQ</literal> rule highlights fixed sequences of text. The text
449    to highlight is specified between opening and closing <literal>SEQ</literal>
450    tags. The following attributes are supported:
451   </para>
452   <itemizedlist>
453    <listitem><para><literal>TYPE</literal> - the token type to highlight the
454    sequence with. See <xref linkend="mode-syntax-tokens" /> for a list of token
455    types</para></listitem>
456    <listitem><para><literal>AT_LINE_START</literal> - If set to
457    <literal>TRUE</literal>, the sequence will only be highlighted if it occurs
458    at the beginning of a line</para></listitem>
459   </itemizedlist>
460   <para>
461    The following rules highlight a few Java operators:
462   </para>
463   <programlisting>&lt;SEQ TYPE="OPERATOR"&gt;+&lt;/SEQ&gt;
464&lt;SEQ TYPE="OPERATOR"&gt;-&lt;/SEQ&gt;
465&lt;SEQ TYPE="OPERATOR"&gt;*&lt;/SEQ&gt;
466&lt;SEQ TYPE="OPERATOR"&gt;/&lt;/SEQ&gt;</programlisting>
467  </sect2>
468  <sect2 id="mode-rule-keywords"><title>The KEYWORDS Rule</title>
469   <para>
470    There can only be one <literal>KEYWORDS</literal> tag per ruleset.
471    The <literal>KEYWORDS</literal> rule defines keywords to highlight.
472    Keywords are similar to <literal>SEQ</literal>s, except that
473    <literal>SEQ</literal>s match anywhere in the text, whereas keywords only
474    match whole words.
475   </para>
476   <para>
477    The <literal>KEYWORDS</literal> tag does not define any attributes.
478   </para>
479   <para>
480    Each child element of the <literal>KEYWORDS</literal> tag should be named
481    after the desired token type, with the keyword text between the start and
482    end tags. For example, the following rule highlights the most common Java
483    keywords:
484   </para>
485   <programlisting>&lt;KEYWORDS IGNORE_CASE="FALSE"&gt;
486   &lt;KEYWORD1&gt;if&lt;/KEYWORD1&gt;
487   &lt;KEYWORD1&gt;else&lt;/KEYWORD1&gt;
488   &lt;KEYWORD3&gt;int&lt;/KEYWORD3&gt;
489   &lt;KEYWORD3&gt;void&lt;/KEYWORD3&gt;
490&lt;/KEYWORDS&gt;</programlisting>
491  </sect2>
492  <sect2 id="mode-syntax-tokens"><title>Token Types</title>
493   <para>
494    Parser rules can highlight tokens using any of the following token
495    types:
496   </para>
497   <itemizedlist>
498   <listitem><para><literal>NULL</literal> - no special
499   highlighting is performed on tokens of type <literal>NULL</literal>
500   </para></listitem>
501   <listitem><para><literal>COMMENT1</literal>
502   </para></listitem>
503   <listitem><para><literal>COMMENT2</literal>
504   </para></listitem>
505   <listitem><para><literal>FUNCTION</literal>
506   </para></listitem>
507   <listitem><para><literal>INVALID</literal> - tokens of this type are
508   automatically added if a <literal>NO_WORD_BREAK</literal> or
509   <literal>NO_LINE_BREAK</literal> <literal>SPAN</literal> spans more than
510   one word or line, respectively.
511   </para></listitem>
512   <listitem><para><literal>KEYWORD1</literal>
513   </para></listitem>
514   <listitem><para><literal>KEYWORD2</literal>
515   </para></listitem>
516   <listitem><para><literal>KEYWORD3</literal>
517   </para></listitem>
518   <listitem><para><literal>LABEL</literal>
519   </para></listitem>
520   <listitem><para><literal>LITERAL1</literal>
521   </para></listitem>
522   <listitem><para><literal>LITERAL2</literal>
523   </para></listitem>
524   <listitem><para><literal>MARKUP</literal>
525   </para></listitem>
526   <listitem><para><literal>OPERATOR</literal>
527   </para></listitem>
528   </itemizedlist>
529  </sect2>
530 </sect1>
531</chapter>