PageRenderTime 311ms CodeModel.GetById 301ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/modes/ruby.xml

#
XML | 462 lines | 423 code | 19 blank | 20 comment | 0 complexity | 75f4c8f7aab8a0f8eb565e1e260cde20 MD5 | raw file
  1<?xml version="1.0"?>
  2<!DOCTYPE MODE SYSTEM "xmode.dtd">
  3<!-- Ruby mode by Ian Maclean (Ruby edit mode v0.6.2) -->
  4<!-- tweakage by Chris Morris - clabs.org -->
  5<!-- further tweakage by Christophe Grandsire -->
  6<!-- further tweakage by Robert McKinnon 2004 -->
  7<!-- Major overhaul by Karl von Laudermann -->
  8<!-- recommended mode catalog entry:
  9    <MODE NAME="ruby" FILE="ruby.xml" FILE_NAME_GLOB="*.{rb,rbw}" FIRST_LINE_GLOB="#!*/*ruby*" /> -->
 10<MODE>
 11    <PROPS>
 12        <PROPERTY NAME="indentOpenBrackets" VALUE=""/>
 13        <PROPERTY NAME="indentCloseBrackets" VALUE="}"/>
 14        <PROPERTY NAME="lineUpClosingBracket" VALUE="true"/>
 15        <PROPERTY NAME="commentStart" VALUE="=begin"/>
 16        <PROPERTY NAME="commentEnd" VALUE="=end"/>
 17        <PROPERTY NAME="lineComment" VALUE="#"/>
 18        <PROPERTY NAME="indentNextLines" VALUE="\s*((if\s+.*|elsif\s+.*|else\s*|do(\s*|\s+.*)|case\s+.*|when\s+.*|while\s+.*|for\s+.*|until\s+.*|loop\s+.*|def\s+.*|class\s+.*|module\s+.*|begin.*|unless\s+.*)*)"/>
 19    </PROPS>
 20    <RULES ESCAPE="\" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0b[01]([01_]*[01])?)|(0x[\p{XDigit}]([\p{XDigit}_]*[\p{XDigit}])?)|(0([0-7_]*[0-7])?)|(0d[0-9]([0-9_]*[0-9])?)|([1-9]([0-9_]*[0-9])?)|([0-9]([0-9_]*[0-9])?[Ee]([0-9]([0-9_]*[0-9])?)?)">
 21        <!--       ^ Binary literal    | ^ Hex literal                               | ^ Octal literal  | ^ "0d" Style Dec lit   | ^ Normal Dec literal | ^ Float literal w/out dec point, with exp. -->
 22
 23        <!-- Ruby comment (Inline Documentation ) -->
 24        <SPAN TYPE="COMMENT2">
 25            <BEGIN>=begin</BEGIN>
 26            <END>=end</END>
 27        </SPAN>
 28
 29        <!-- Class and instance vars -->
 30        <MARK_FOLLOWING TYPE="KEYWORD4">@</MARK_FOLLOWING>
 31
 32		<!-- Perl-style regexps - from perl.xml -->
 33		<SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="/" AT_WORD_START="TRUE"
 34		>/[^\p{Blank}]*?/</SEQ_REGEXP>
 35
 36        <!-- String literals -->
 37
 38        <SPAN TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
 39            <BEGIN>"</BEGIN>
 40            <END>"</END>
 41        </SPAN>
 42
 43        <SPAN TYPE="LITERAL1">
 44            <BEGIN>'</BEGIN>
 45            <END>'</END>
 46        </SPAN>
 47
 48        <!-- %Q(Hello world) %(Hello world)-->
 49        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
 50            <BEGIN>%Q?\(</BEGIN>
 51            <END>)</END>
 52        </SPAN_REGEXP>
 53
 54        <!-- %q(Hello world) -->
 55        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
 56            <BEGIN>%q\(</BEGIN>
 57            <END>)</END>
 58        </SPAN_REGEXP>
 59
 60        <!-- %Q{Hello world} %{Hello world} -->
 61        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
 62            <BEGIN>%Q?\{</BEGIN>
 63            <END>}</END>
 64        </SPAN_REGEXP>
 65
 66        <!-- %q{Hello world} -->
 67        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
 68            <BEGIN>%q\{</BEGIN>
 69            <END>}</END>
 70        </SPAN_REGEXP>
 71
 72        <!-- %Q[Hello world] %[Hello world] -->
 73        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
 74            <BEGIN>%Q?\[</BEGIN>
 75            <END>]</END>
 76        </SPAN_REGEXP>
 77
 78        <!-- %q[Hello world] -->
 79        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
 80            <BEGIN>%q\[</BEGIN>
 81            <END>]</END>
 82        </SPAN_REGEXP>
 83
 84        <!-- %Q<Hello world> %<Hello world> -->
 85        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
 86            <BEGIN>%Q?&lt;</BEGIN>
 87            <END>&gt;</END>
 88        </SPAN_REGEXP>
 89
 90        <!-- %q<Hello world> -->
 91        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
 92            <BEGIN>%q&lt;</BEGIN>
 93            <END>&gt;</END>
 94        </SPAN_REGEXP>
 95
 96        <!-- I made the next three forms as three instead of two, because the
 97         first two actually support whitespace as a delimiter, and the third
 98         one doesn't. -->
 99        <!-- %Q$Hello world$ -->
100        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
101            <BEGIN>%Q([^\p{Alnum}])</BEGIN>
102            <END>$1</END>
103        </SPAN_REGEXP>
104
105        <!-- %q$Hello world$ -->
106        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
107            <BEGIN>%q([^\p{Alnum}])</BEGIN>
108            <END>$1</END>
109        </SPAN_REGEXP>
110
111        <!-- %$Hello world$ -->
112        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
113            <BEGIN>%([^\p{Alnum}\p{Space}])</BEGIN>
114            <END>$1</END>
115        </SPAN_REGEXP>
116
117        <!-- %W(Array of strings) -->
118        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
119            <BEGIN>%W\(</BEGIN>
120            <END>)</END>
121        </SPAN_REGEXP>
122
123        <!-- %w(Array of strings) -->
124        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
125            <BEGIN>%w\(</BEGIN>
126            <END>)</END>
127        </SPAN_REGEXP>
128
129        <!-- %W{Array of strings} -->
130        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
131            <BEGIN>%W\{</BEGIN>
132            <END>}</END>
133        </SPAN_REGEXP>
134
135        <!-- %w{Array of strings} -->
136        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
137            <BEGIN>%w\{</BEGIN>
138            <END>}</END>
139        </SPAN_REGEXP>
140
141        <!-- %W[Array of strings] -->
142        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
143            <BEGIN>%W\[</BEGIN>
144            <END>]</END>
145        </SPAN_REGEXP>
146
147        <!-- %w[Array of strings] -->
148        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
149            <BEGIN>%w\[</BEGIN>
150            <END>]</END>
151        </SPAN_REGEXP>
152
153        <!-- %W<Array of strings>  -->
154        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
155            <BEGIN>%W&lt;</BEGIN>
156            <END>&gt;</END>
157        </SPAN_REGEXP>
158
159        <!-- %w<Array of strings> -->
160        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
161            <BEGIN>%w&lt;</BEGIN>
162            <END>&gt;</END>
163        </SPAN_REGEXP>
164
165        <!-- %W$Array of strings$ -->
166        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
167            <BEGIN>%W([^\p{Alnum}\p{Space}])</BEGIN>
168            <END>$1</END>
169        </SPAN_REGEXP>
170
171        <!-- %w@Array of strings@ -->
172        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL1">
173            <BEGIN>%w([^\p{Alnum}\p{Space}])</BEGIN>
174            <END>$1</END>
175        </SPAN_REGEXP>
176
177        <!-- Here documents <<"FOO" <<-"FOO" -->
178        <!-- Unfortunately, in a SPAN_REGEXP element only the <BEGIN> tag takes
179         a regex, not the <END> tag. So an instance of FOO anywhere in the here
180         document will terminate highlighting; I couldn't make it smarter. -->
181        <SPAN_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
182            <BEGIN>&lt;&lt;-?"([\p{Graph}]+)"</BEGIN>
183            <END>$1</END>
184        </SPAN_REGEXP>
185
186        <!-- Here documents <<'FOO' <<-'FOO' -->
187        <!-- Unfortunately, in a SPAN_REGEXP element only the <BEGIN> tag takes
188         a regex, not the <END> tag. So an instance of FOO anywhere in the here
189         document will terminate highlighting; I couldn't make it smarter. -->
190        <SPAN_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL1">
191            <BEGIN>&lt;&lt;-?'([\p{Graph}]+)'</BEGIN>
192            <END>$1</END>
193        </SPAN_REGEXP>
194
195        <!-- Here documents <<FOO <<-FOO -->
196        <!-- Unfortunately, in a SPAN_REGEXP element only the <BEGIN> tag takes
197         a regex, not the <END> tag. So an instance of FOO anywhere in the here
198         document will terminate highlighting; I couldn't make it smarter. -->
199        <SPAN_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL1" DELEGATE="doubleQuoteLiteral">
200            <BEGIN>&lt;&lt;-?([A-Za-z_]+)</BEGIN>
201            <END>$1</END>
202        </SPAN_REGEXP>
203
204        <!-- Shell command strings -->
205
206        <!-- `echo foo` -->
207        <SPAN TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
208            <BEGIN>`</BEGIN>
209            <END>`</END>
210        </SPAN>
211
212        <!-- %x(echo foo) -->
213        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
214            <BEGIN>%x\(</BEGIN>
215            <END>)</END>
216        </SPAN_REGEXP>
217
218        <!-- %x{echo foo} -->
219        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
220            <BEGIN>%x\{</BEGIN>
221            <END>}</END>
222        </SPAN_REGEXP>
223
224        <!-- %x[echo foo] -->
225        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
226            <BEGIN>%x\[</BEGIN>
227            <END>]</END>
228        </SPAN_REGEXP>
229
230        <!-- %x<echo foo> -->
231        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
232            <BEGIN>%x&lt;</BEGIN>
233            <END>&gt;</END>
234        </SPAN_REGEXP>
235
236        <!-- %x$echo foo$ -->
237        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL2" DELEGATE="BackquoteLiteral">
238            <BEGIN>%x([^\p{Alnum}\p{Space}])</BEGIN>
239            <END>$1</END>
240        </SPAN_REGEXP>
241
242        <!-- Regular expressions   -->
243
244        <!-- /regexp?/i -->
245        <!-- This doesn't really work well, because it can't distinguish a regexp
246         from multiple instances of the "/" division operator on the same line. -->
247        <!-- <SEQ_REGEXP HASH_CHAR="/" AT_WORD_START="TRUE"
248            TYPE="LITERAL3">/[^/]+/[iomx]*</SEQ_REGEXP> -->
249
250        <!-- %r(regexp?) -->
251        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL3" DELEGATE="RegexpLiteral">
252            <BEGIN>%r\(</BEGIN>
253            <END>)</END>
254        </SPAN_REGEXP>
255
256        <!-- %r{regexp?} -->
257        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL3" DELEGATE="RegexpLiteral">
258            <BEGIN>%r\{</BEGIN>
259            <END>}</END>
260        </SPAN_REGEXP>
261
262        <!-- %r[regexp?] -->
263        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL3" DELEGATE="RegexpLiteral">
264            <BEGIN>%r\[</BEGIN>
265            <END>]</END>
266        </SPAN_REGEXP>
267
268        <!-- %r<regexp?> -->
269        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL3" DELEGATE="RegexpLiteral">
270            <BEGIN>%r&lt;</BEGIN>
271            <END>&gt;</END>
272        </SPAN_REGEXP>
273
274        <!-- %r$regexp?$ -->
275        <SPAN_REGEXP HASH_CHAR="%" TYPE="LITERAL3" DELEGATE="RegexpLiteral">
276            <BEGIN>%r([^\p{Alnum}\p{Space}])</BEGIN>
277            <END>$1</END>
278        </SPAN_REGEXP>
279
280        <!-- (/regexp/) -->
281        <SPAN_REGEXP HASH_CHAR="(" DELEGATE="RegexpLiteral" EXCLUDE_MATCH="TRUE" TYPE="LITERAL3">
282            <BEGIN>\(/</BEGIN>
283            <END>/</END>
284        </SPAN_REGEXP>
285
286        <!-- Nested code block -->
287        <!-- I included this just because it can appear in a "/" delimited
288        regular expression, handling of which is commented out above. So this
289        would otherwise be colored as a comment. -->
290        <SPAN TYPE="OPERATOR" DELEGATE="MAIN">
291            <BEGIN>#{</BEGIN>
292            <END>}</END>
293        </SPAN>
294
295        <!-- Std Comment -->
296        <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
297
298        <!-- Predefined global variables -->
299        <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3" AT_WORD_START="TRUE">\$-[0adFiIKlpvw](?![\p{Alnum}_])</SEQ_REGEXP>
300
301        <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD3" AT_WORD_START="TRUE">\$[0-9!@&amp;\+`'=~/\\,\.;&lt;&gt;_\*"\$\?\:F](?![\p{Alnum}_])</SEQ_REGEXP>
302
303        <!-- Because of the ? char, this can't be done as a KEYWORD element -->
304        <SEQ TYPE="KEYWORD1" AT_WORD_START="TRUE">defined?</SEQ>
305
306        <!-- Highlight "include" but not "include?" -->
307        <SEQ_REGEXP HASH_CHAR="i" TYPE="KEYWORD2" AT_WORD_START="TRUE">include(?![\p{Alnum}_\?])</SEQ_REGEXP>
308
309        <!-- Not Operators but like the syntax highlight to match operators -->
310        <SEQ TYPE="OPERATOR">{</SEQ>
311        <SEQ TYPE="OPERATOR">}</SEQ>
312        <SEQ TYPE="OPERATOR">(</SEQ>
313        <SEQ TYPE="OPERATOR">)</SEQ>
314
315        <!-- Arithmetic operators -->
316        <SEQ TYPE="OPERATOR">::</SEQ>
317        <SEQ TYPE="OPERATOR">===</SEQ>
318        <SEQ TYPE="OPERATOR">=</SEQ>
319        <SEQ TYPE="OPERATOR">&gt;&gt;</SEQ>
320        <SEQ TYPE="OPERATOR">&lt;&lt;</SEQ>
321        <SEQ TYPE="OPERATOR">&lt;=</SEQ>
322        <SEQ TYPE="OPERATOR">+</SEQ>
323        <SEQ TYPE="OPERATOR">-</SEQ>
324        <SEQ TYPE="OPERATOR">/</SEQ>
325
326        <SEQ TYPE="OPERATOR">**</SEQ>
327        <SEQ TYPE="OPERATOR">*</SEQ>
328
329        <SEQ TYPE="OPERATOR">%</SEQ>
330
331        <!-- Logical Operators -->
332        <SEQ TYPE="OPERATOR">&amp;</SEQ>
333        <SEQ TYPE="OPERATOR">|</SEQ>
334        <SEQ TYPE="OPERATOR">!</SEQ>
335        <SEQ TYPE="OPERATOR">&gt;</SEQ>
336        <SEQ TYPE="OPERATOR">&lt;</SEQ>
337        <SEQ TYPE="OPERATOR">^</SEQ>
338        <SEQ TYPE="OPERATOR">~</SEQ>
339
340        <!-- Range operators -->
341        <SEQ TYPE="OPERATOR">...</SEQ>
342        <SEQ TYPE="OPERATOR">..</SEQ>
343
344        <SEQ TYPE="OPERATOR">]</SEQ>
345        <SEQ TYPE="OPERATOR">[</SEQ>
346        <SEQ TYPE="OPERATOR">?</SEQ>
347
348        <!-- Symbols -->
349        <SEQ_REGEXP AT_WORD_START="TRUE" HASH_CHAR=":" TYPE="LABEL">:[\p{Alpha}_][\p{Alnum}_]*</SEQ_REGEXP>
350
351        <SEQ TYPE="OPERATOR">:</SEQ>
352
353        <KEYWORDS>
354            <KEYWORD1>BEGIN</KEYWORD1>
355            <KEYWORD1>END</KEYWORD1>
356            <KEYWORD1>alias</KEYWORD1>
357            <KEYWORD1>begin</KEYWORD1>
358            <KEYWORD1>break</KEYWORD1>
359            <KEYWORD1>case</KEYWORD1>
360            <KEYWORD1>class</KEYWORD1>
361            <KEYWORD1>def</KEYWORD1>
362            <KEYWORD1>do</KEYWORD1>
363            <KEYWORD1>else</KEYWORD1>
364            <KEYWORD1>elsif</KEYWORD1>
365            <KEYWORD1>end</KEYWORD1>
366            <KEYWORD1>ensure</KEYWORD1>
367            <KEYWORD1>for</KEYWORD1>
368            <KEYWORD1>if</KEYWORD1>
369            <KEYWORD1>in</KEYWORD1>
370            <KEYWORD1>module</KEYWORD1>
371            <KEYWORD1>next</KEYWORD1>
372            <KEYWORD1>redo</KEYWORD1>
373            <KEYWORD1>rescue</KEYWORD1>
374            <KEYWORD1>retry</KEYWORD1>
375            <KEYWORD1>return</KEYWORD1>
376            <KEYWORD1>then</KEYWORD1>
377            <KEYWORD1>undef</KEYWORD1>
378            <KEYWORD1>unless</KEYWORD1>
379            <KEYWORD1>until</KEYWORD1>
380            <KEYWORD1>when</KEYWORD1>
381            <KEYWORD1>while</KEYWORD1>
382            <KEYWORD1>yield</KEYWORD1>
383
384            <KEYWORD2>load</KEYWORD2>
385            <KEYWORD2>require</KEYWORD2>
386
387            <OPERATOR>and</OPERATOR>
388            <OPERATOR>not</OPERATOR>
389            <OPERATOR>or</OPERATOR>
390
391            <KEYWORD3>false</KEYWORD3>
392            <KEYWORD3>nil</KEYWORD3>
393            <KEYWORD3>self</KEYWORD3>
394            <KEYWORD3>super</KEYWORD3>
395            <KEYWORD3>true</KEYWORD3>
396
397            <KEYWORD3>$defout</KEYWORD3>
398            <KEYWORD3>$deferr</KEYWORD3>
399            <KEYWORD3>$stderr</KEYWORD3>
400            <KEYWORD3>$stdin</KEYWORD3>
401            <KEYWORD3>$stdout</KEYWORD3>
402            <KEYWORD3>$DEBUG</KEYWORD3>
403            <KEYWORD3>$FILENAME</KEYWORD3>
404            <KEYWORD3>$LOAD_PATH</KEYWORD3>
405            <KEYWORD3>$SAFE</KEYWORD3>
406            <KEYWORD3>$VERBOSE</KEYWORD3>
407            <KEYWORD3>__FILE__</KEYWORD3>
408            <KEYWORD3>__LINE__</KEYWORD3>
409            <KEYWORD3>ARGF</KEYWORD3>
410            <KEYWORD3>ARGV</KEYWORD3>
411            <KEYWORD3>ENV</KEYWORD3>
412            <KEYWORD3>DATA</KEYWORD3>
413            <KEYWORD3>FALSE</KEYWORD3>
414            <KEYWORD3>NIL</KEYWORD3>
415            <KEYWORD3>RUBY_PLATFORM</KEYWORD3>
416            <KEYWORD3>RUBY_RELEASE_DATE</KEYWORD3>
417            <KEYWORD3>RUBY_VERSION</KEYWORD3>
418            <KEYWORD3>STDERR</KEYWORD3>
419            <KEYWORD3>STDIN</KEYWORD3>
420            <KEYWORD3>STDOUT</KEYWORD3>
421            <KEYWORD3>SCRIPT_LINES__</KEYWORD3>
422            <KEYWORD3>TOPLEVEL_BINDING</KEYWORD3>
423            <KEYWORD3>TRUE</KEYWORD3>
424        </KEYWORDS>
425    </RULES>
426
427    <!-- Delegate contents of #{} expression in double quotes to MAIN so that
428     it will be syntax highlighted as well -->
429    <RULES DEFAULT="LITERAL1" SET="doubleQuoteLiteral">
430        <SPAN DELEGATE="MAIN" TYPE="OPERATOR">
431            <BEGIN>#{</BEGIN>
432            <END>}</END>
433        </SPAN>
434        <MARK_FOLLOWING TYPE="KEYWORD4">#@@</MARK_FOLLOWING>
435        <MARK_FOLLOWING TYPE="KEYWORD4">#@</MARK_FOLLOWING>
436        <MARK_FOLLOWING TYPE="NULL">#$</MARK_FOLLOWING>
437    </RULES>
438
439    <!-- Delegate contents of #{} expression in backquotes to MAIN so that
440     it will be syntax highlighted as well -->
441    <RULES DEFAULT="LITERAL2" SET="BackquoteLiteral">
442        <SPAN DELEGATE="MAIN" TYPE="OPERATOR">
443            <BEGIN>#{</BEGIN>
444            <END>}</END>
445        </SPAN>
446        <MARK_FOLLOWING TYPE="KEYWORD4">#@@</MARK_FOLLOWING>
447        <MARK_FOLLOWING TYPE="KEYWORD4">#@</MARK_FOLLOWING>
448        <MARK_FOLLOWING TYPE="NULL">#$</MARK_FOLLOWING>
449    </RULES>
450
451    <!-- Delegate contents of #{} expression in a regexp to MAIN so that
452     it will be syntax highlighted as well -->
453    <RULES DEFAULT="LITERAL3" SET="RegexpLiteral">
454        <SPAN DELEGATE="MAIN" TYPE="OPERATOR">
455            <BEGIN>#{</BEGIN>
456            <END>}</END>
457        </SPAN>
458        <MARK_FOLLOWING TYPE="KEYWORD4">#@@</MARK_FOLLOWING>
459        <MARK_FOLLOWING TYPE="KEYWORD4">#@</MARK_FOLLOWING>
460        <MARK_FOLLOWING TYPE="NULL">#$</MARK_FOLLOWING>
461    </RULES>
462</MODE>