Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 402 lines (353 sloc) 13.022 kB
e692455 @djspiewak Initial commit
authored
1 <?xml version="1.0"?>
2
3 <!DOCTYPE MODE SYSTEM "xmode.dtd">
4
5 <MODE>
6 <PROPS>
7 <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
8 <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
9 <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
10 <PROPERTY NAME="indentPrevLine"
11 VALUE="\s*(((if|while)\s*\(|else\s*(\{|$)|else\s+if\s*\(|case\s+.+:|default:)[^;]*|for\s*\(.*)" />
12 <!-- set this to 'true' if you want to use GNU coding style -->
13 <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
14 <PROPERTY NAME="commentStart" VALUE="/*" />
15 <PROPERTY NAME="commentEnd" VALUE="*/" />
16 <PROPERTY NAME="lineComment" VALUE="//" />
17 <PROPERTY NAME="noTabs" VALUE="true" />
18 <PROPERTY NAME="tabSize" VALUE="2" />
19 <PROPERTY NAME="indentSize" VALUE="2" />
20 <PROPERTY NAME="wordBreakChars" VALUE=",+-=&lt;&gt;/?^&amp;*" />
21 </PROPS>
22
23 <RULES ESCAPE="\" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
24 DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))">
06f1931 @djspiewak El Bizarro hack for annotations vs patterns
authored
25
26 <MARK_FOLLOWING TYPE="LABEL">@</MARK_FOLLOWING>
27
28 <IMPORT DELEGATE="PRIMARY"/>
29 </RULES>
30
31 <RULES SET="PRIMARY">
e692455 @djspiewak Initial commit
authored
32 <!-- Silly comment -->
33 <SEQ TYPE="COMMENT1">/**/</SEQ>
34
35 <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
36
37 <!-- Scaladoc comment -->
38 <SPAN TYPE="COMMENT3" DELEGATE="SCALADOC">
39 <BEGIN>/**</BEGIN>
40 <END>*/</END>
41 </SPAN>
42
43 <!-- Scala comment (Java style) -->
44 <SPAN TYPE="COMMENT1">
45 <BEGIN>/*</BEGIN>
46 <END>*/</END>
47 </SPAN>
48
49 <!-- start of XML comment (griba2010@ya.com) -->
50 <SEQ_REGEXP HASH_CHAR="&lt;" AT_WHITESPACE_END="TRUE" TYPE="COMMENT2"
51 DELEGATE="XML_COMMENT">&lt;!--</SEQ_REGEXP>
52
53 <!-- start of xml tag (griba2010@ya.com) -->
54 <SEQ_REGEXP HASH_CHAR="&lt;" AT_WHITESPACE_END="TRUE" TYPE="LITERAL3"
55 DELEGATE="XML_TAG">&lt;\/?\w*</SEQ_REGEXP>
56
57 <!-- string and character literals -->
c7d7e66 @djspiewak Case as dummy keyword (slicker text input); No escape from """
authored
58 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE" ESCAPE="FALSE">
ce84df5 @djspiewak Fixed """ string literals
authored
59 <BEGIN>"""</BEGIN>
60 <END>"""</END>
61 </SPAN>
e692455 @djspiewak Initial commit
authored
62 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
63 <BEGIN>"</BEGIN>
64 <END>"</END>
65 </SPAN>
66 <SEQ_REGEXP HASH_CHAR="'" TYPE="LITERAL1">'([^']|\\.)'</SEQ_REGEXP>
67
68 <!-- symbol literals -->
69 <SEQ_REGEXP HASH_CHAR="'" TYPE="LABEL">'[0-9a-zA-Z]([0-9a-zA-Z]|_.)*</SEQ_REGEXP>
70
71 <!-- type params between bracket pairs with -->
72 <!-- nested ones within (griba2010@ya.com) -->
73 <SEQ_REGEXP HASH_CHAR="[" TYPE="LITERAL3"
74 >\[[^\[\]]*(\[[^\[\]]*(\[[^\[\]]*\][^\[\]]*)*\][^\[\]]*)*\]</SEQ_REGEXP>
75
76 <!-- type constraints (griba2010@ya.com) -->
77 <SEQ_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL2"
78 >&lt;:\s*\w+(\.\w+)*(#\w+)?</SEQ_REGEXP>
79 <SEQ_REGEXP HASH_CHAR=">" TYPE="LITERAL2"
80 >&gt;:\s*\w+(\.\w+)*(#\w+)?</SEQ_REGEXP>
81
82 <SEQ TYPE="OPERATOR">)</SEQ>
83 <SEQ TYPE="OPERATOR">=</SEQ>
84 <SEQ TYPE="OPERATOR">!</SEQ>
85 <SEQ TYPE="OPERATOR">&gt;=</SEQ>
86 <SEQ TYPE="OPERATOR">&gt;:</SEQ>
87 <SEQ TYPE="OPERATOR">&lt;=</SEQ>
88 <SEQ TYPE="OPERATOR">&lt;:</SEQ>
89 <SEQ TYPE="OPERATOR">+</SEQ>
90 <SEQ TYPE="OPERATOR">-</SEQ>
91 <SEQ TYPE="OPERATOR">/</SEQ>
92 <SEQ TYPE="OPERATOR">*</SEQ>
93 <SEQ TYPE="OPERATOR">&gt;</SEQ>
94 <SEQ TYPE="OPERATOR">&lt;</SEQ>
95 <SEQ TYPE="OPERATOR">%</SEQ>
96 <SEQ TYPE="OPERATOR">&amp;</SEQ>
97 <SEQ TYPE="OPERATOR">|</SEQ>
98 <SEQ TYPE="OPERATOR">^</SEQ>
06f1931 @djspiewak El Bizarro hack for annotations vs patterns
authored
99 <SEQ TYPE="OPERATOR">`</SEQ>
e692455 @djspiewak Initial commit
authored
100 <SEQ TYPE="OPERATOR">~</SEQ>
101 <SEQ TYPE="OPERATOR">}</SEQ>
102 <SEQ TYPE="OPERATOR">{</SEQ>
103 <SEQ TYPE="NULL">.</SEQ>
104 <SEQ TYPE="NULL">,</SEQ>
105 <SEQ TYPE="NULL">;</SEQ>
106 <SEQ TYPE="NULL">]</SEQ>
107 <SEQ TYPE="NULL">[</SEQ>
108 <SEQ TYPE="NULL">?</SEQ>
109 <SEQ TYPE="NULL">:</SEQ>
110
111 <!-- after colon type descriptions (griba2010@ya.com) -->
112 <SEQ_REGEXP HASH_CHAR=":" TYPE="LITERAL2"
113 >:\s*\w+(\.\w+)*(#\w+)?</SEQ_REGEXP>
114
115 <!-- Function calls -->
116 <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
06f1931 @djspiewak El Bizarro hack for annotations vs patterns
authored
117
fa936fe @djspiewak Fixed case...er, case issue
authored
118 <SPAN DELEGATE="PATTERN" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE" NO_LINE_BREAK="TRUE">
119 <BEGIN>case </BEGIN>
06f1931 @djspiewak El Bizarro hack for annotations vs patterns
authored
120 <END>=&gt;</END>
fa936fe @djspiewak Fixed case...er, case issue
authored
121 </SPAN>
e692455 @djspiewak Initial commit
authored
122
fa936fe @djspiewak Fixed case...er, case issue
authored
123 <KEYWORDS>
e692455 @djspiewak Initial commit
authored
124 <KEYWORD1>abstract</KEYWORD1>
c7d7e66 @djspiewak Case as dummy keyword (slicker text input); No escape from """
authored
125 <KEYWORD1>case</KEYWORD1>
e692455 @djspiewak Initial commit
authored
126 <KEYWORD1>catch</KEYWORD1>
127 <KEYWORD1>class</KEYWORD1>
128 <KEYWORD1>def</KEYWORD1>
129 <KEYWORD1>do</KEYWORD1>
130 <KEYWORD1>else</KEYWORD1>
131 <KEYWORD1>extends</KEYWORD1>
132 <KEYWORD1>final</KEYWORD1>
133 <KEYWORD1>finally</KEYWORD1>
134 <KEYWORD1>for</KEYWORD1>
135 <KEYWORD1>forSome</KEYWORD1>
136 <KEYWORD1>if</KEYWORD1>
137 <KEYWORD1>implicit</KEYWORD1>
138 <KEYWORD1>import</KEYWORD1>
139 <KEYWORD1>lazy</KEYWORD1>
140 <KEYWORD1>match</KEYWORD1>
141 <KEYWORD1>new</KEYWORD1>
142 <KEYWORD1>object</KEYWORD1>
143 <KEYWORD1>override</KEYWORD1>
144 <KEYWORD1>package</KEYWORD1>
145 <KEYWORD1>private</KEYWORD1>
146 <KEYWORD1>protected</KEYWORD1>
147 <KEYWORD1>requires</KEYWORD1>
148 <KEYWORD1>return</KEYWORD1>
149 <KEYWORD1>sealed</KEYWORD1>
150 <KEYWORD1>throw</KEYWORD1>
151 <KEYWORD1>trait</KEYWORD1>
152 <KEYWORD1>try</KEYWORD1>
153 <KEYWORD1>type</KEYWORD1>
154 <KEYWORD1>val</KEYWORD1>
155 <KEYWORD1>var</KEYWORD1>
156 <KEYWORD1>with</KEYWORD1>
157 <KEYWORD1>while</KEYWORD1>
158 <KEYWORD1>yield</KEYWORD1>
159 <KEYWORD1>=&gt;</KEYWORD1>
160
161 <!-- java.lang.* wrapper types -->
162 <KEYWORD2>Character</KEYWORD2>
163 <KEYWORD2>Integer</KEYWORD2>
164
165 <!-- scala.* primitive types -->
166 <KEYWORD2>Boolean</KEYWORD2>
167 <KEYWORD2>boolean</KEYWORD2>
168 <KEYWORD2>Byte</KEYWORD2>
169 <KEYWORD2>byte</KEYWORD2>
170 <KEYWORD2>Char</KEYWORD2>
171 <KEYWORD2>char</KEYWORD2>
172 <KEYWORD2>Double</KEYWORD2>
173 <KEYWORD2>double</KEYWORD2>
174 <KEYWORD2>Float</KEYWORD2>
175 <KEYWORD2>float</KEYWORD2>
176 <KEYWORD2>Int</KEYWORD2>
177 <KEYWORD2>int</KEYWORD2>
178 <KEYWORD2>Long</KEYWORD2>
179 <KEYWORD2>long</KEYWORD2>
180 <KEYWORD2>Short</KEYWORD2>
181 <KEYWORD2>short</KEYWORD2>
182 <KEYWORD2>Unit</KEYWORD2>
183 <KEYWORD2>unit</KEYWORD2>
184
185 <!-- scala.* predefined types -->
186 <KEYWORD3>Actor</KEYWORD3>
187 <KEYWORD3>ActorProxy</KEYWORD3>
188 <KEYWORD3>ActorTask</KEYWORD3>
189 <KEYWORD3>ActorThread</KEYWORD3>
190 <KEYWORD3>AllRef</KEYWORD3>
191 <KEYWORD3>Any</KEYWORD3>
192 <KEYWORD3>AnyRef</KEYWORD3>
193 <KEYWORD3>Application</KEYWORD3>
194 <KEYWORD3>AppliedType</KEYWORD3>
195 <KEYWORD3>Array</KEYWORD3>>
196 <KEYWORD3>ArrayBuffer</KEYWORD3>
197 <KEYWORD3>Attribute</KEYWORD3>
198 <KEYWORD3>BoxedArray</KEYWORD3>
199 <KEYWORD3>BoxedBooleanArray</KEYWORD3>
200 <KEYWORD3>BoxedByteArray</KEYWORD3>
201 <KEYWORD3>BoxedCharArray</KEYWORD3>
202 <KEYWORD3>Buffer</KEYWORD3>
203 <KEYWORD3>BufferedIterator</KEYWORD3>
204 <KEYWORD3>Enumeration</KEYWORD3>
205 <KEYWORD3>Fluid</KEYWORD3>
206 <KEYWORD3>Function</KEYWORD3>
207 <KEYWORD3>IScheduler</KEYWORD3>
208 <KEYWORD3>ImmutableMapAdaptor</KEYWORD3>
209 <KEYWORD3>ImmutableSetAdaptor</KEYWORD3>
210 <KEYWORD3>Iterable</KEYWORD3>
211 <KEYWORD3>List</KEYWORD3>
212 <KEYWORD3>Option</KEYWORD3>
213 <KEYWORD3>Pair</KEYWORD3>
214 <KEYWORD3>PartialFunction</KEYWORD3>
215 <KEYWORD3>Pid</KEYWORD3>
216 <KEYWORD3>PriorityQueue</KEYWORD3>
217 <KEYWORD3>PriorityQueueProxy</KEYWORD3>
218 <KEYWORD3>Reaction</KEYWORD3>
219 <KEYWORD3>Ref</KEYWORD3>
220 <KEYWORD3>Responder</KEYWORD3>
221 <KEYWORD3>RichInt</KEYWORD3>
222 <KEYWORD3>RichString</KEYWORD3>
223 <KEYWORD3>Rule</KEYWORD3>
224 <KEYWORD3>RuleTransformer</KEYWORD3>
225 <KEYWORD3>Script</KEYWORD3>
226 <KEYWORD3>Some</KEYWORD3>
227 <KEYWORD3>Stream</KEYWORD3>
228 <KEYWORD3>String</KEYWORD3>
229 <KEYWORD3>Symbol</KEYWORD3>
230 <KEYWORD3>TcpService</KEYWORD3>
231 <KEYWORD3>TcpServiceWorker</KEYWORD3>
232 <KEYWORD3>WorkerThread</KEYWORD3>
233
234 <!-- scala.* predefined objects -->
235 <KEYWORD4>Console</KEYWORD4>
236 <KEYWORD4>Nil</KEYWORD4>
237 <KEYWORD4>None</KEYWORD4>
238 <KEYWORD4>Predef</KEYWORD4>
239 <KEYWORD4>RemoteActor</KEYWORD4>
240 <KEYWORD4>SUnit</KEYWORD4>
241 <KEYWORD4>ScalaRunTime</KEYWORD4>
242 <KEYWORD4>Scheduler</KEYWORD4>
243 <KEYWORD4>TIMEOUT</KEYWORD4>
244 <KEYWORD4>TimerThread</KEYWORD4>
245
246 <LITERAL2>false</LITERAL2>
247 <LITERAL2>null</LITERAL2>
248 <LITERAL2>super</LITERAL2>
249 <LITERAL2>this</LITERAL2>
250 <LITERAL2>true</LITERAL2>
251 </KEYWORDS>
252 </RULES>
06f1931 @djspiewak El Bizarro hack for annotations vs patterns
authored
253
254 <RULES SET="PATTERN" DEFAULT="NULL" IGNORE_CASE="FALSE">
255 <IMPORT DELEGATE="PRIMARY"/>
256
257 <SEQ TYPE="OPERATOR">@</SEQ>
258 </RULES>
e692455 @djspiewak Initial commit
authored
259
260 <RULES SET="SCALADOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
261 <!-- so that @link{...} is highlighted -->
262 <SEQ TYPE="COMMENT3">{</SEQ>
263
264 <!-- so that *@param is highlighted -->
265 <SEQ TYPE="COMMENT3">*</SEQ>
266
267 <!-- Javadoc ignores tags inside <pre> -->
268 <SPAN TYPE="MARKUP" DELEGATE="SCALADOC_PRE">
269 <BEGIN>&lt;pre&gt;</BEGIN>
270 <END>&lt;/pre&gt;</END>
271 </SPAN>
272
273 <!-- HTML comments -->
274 <SPAN TYPE="COMMENT1">
275 <BEGIN>&lt;!--</BEGIN>
276 <END>--&gt;</END>
277 </SPAN>
278
279 <!-- Javadoc allows this -->
280 <SEQ TYPE="COMMENT3">&lt;&lt;</SEQ>
281 <SEQ TYPE="COMMENT3">&lt;=</SEQ>
282 <SEQ TYPE="COMMENT3">&lt; </SEQ>
283
284 <!-- HTML tags -->
285 <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">
286 <BEGIN>&lt;</BEGIN>
287 <END>&gt;</END>
288 </SPAN>
289
290 <KEYWORDS>
291 <LABEL>@author</LABEL>
292 <LABEL>@beaninfo</LABEL>
293 <LABEL>@history</LABEL>
294 <LABEL>@bug</LABEL>
295 <LABEL>@review</LABEL>
296 <LABEL>@todo</LABEL>
297 <LABEL>@idea</LABEL>
298 <LABEL>@pre</LABEL>
299 <LABEL>@requires</LABEL>
300 <LABEL>@post</LABEL>
301 <LABEL>@ensures</LABEL>
302 <LABEL>@generates</LABEL>
303 <LABEL>@modifies</LABEL>
304 <LABEL>@invariant</LABEL>
305 <LABEL>@exception</LABEL>
306 <LABEL>@hides</LABEL>
307 <LABEL>@overrides</LABEL>
308 <LABEL>@equivalent</LABEL>
309 <LABEL>@bon</LABEL>
310 <LABEL>@access</LABEL>
311 <LABEL>@example</LABEL>
312 <LABEL>@design</LABEL>
313 <LABEL>@serial</LABEL>
314 <LABEL>@references</LABEL>
315 <LABEL>@uses</LABEL>
316 <LABEL>@guard</LABEL>
317 <LABEL>@values</LABEL>
318 <LABEL>@complexity</LABEL>
319 <LABEL>@deprecated</LABEL>
320 <LABEL>@docRoot</LABEL>
321 <LABEL>@exception</LABEL>
322 <LABEL>@link</LABEL>
323 <LABEL>@param</LABEL>
324 <LABEL>@return</LABEL>
325 <LABEL>@see</LABEL>
326 <LABEL>@serialData</LABEL>
327 <LABEL>@serialField</LABEL>
328 <LABEL>@since</LABEL>
329 <LABEL>@throws</LABEL>
330 <LABEL>@version</LABEL>
331 <LABEL>@spec</LABEL>
332 </KEYWORDS>
333 </RULES>
334
335 <RULES SET="SCALADOC_PRE" DEFAULT="COMMENT3" />
336
337 <!-- inside xml tag default type label -->
338 <!-- for attribute names (griba2010@ya.com) -->
339 <RULES SET="XML_TAG" DEFAULT="LABEL" IGNORE_CASE="TRUE">
340 <!-- string and character literals -->
341 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
342 <BEGIN>"</BEGIN>
343 <END>"</END>
344 </SPAN>
345
346 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
347 <BEGIN>'</BEGIN>
348 <END>'</END>
349 </SPAN>
350
351 <!-- scala attribute value -->
352 <SPAN DELEGATE="MAIN">
353 <BEGIN>{</BEGIN>
354 <END>}</END>
355 </SPAN>
356
357 <!-- if ">\n" goto main rule set -->
358 <SEQ_REGEXP HASH_CHAR="&gt;" DELEGATE="MAIN" TYPE="LITERAL3"
359 >&gt;$</SEQ_REGEXP>
360
361 <!-- if ">;" goto main rule set -->
362 <SEQ_REGEXP HASH_CHAR="&gt;" DELEGATE="MAIN" TYPE="LITERAL3"
363 >&gt;\s*;</SEQ_REGEXP>
364
365 <!-- if ">)" goto main rule set -->
366 <SEQ_REGEXP HASH_CHAR="&gt;" DELEGATE="MAIN" TYPE="LITERAL3"
367 >&gt;\s*\)</SEQ_REGEXP>
368
369 <!-- if ">" goto xml_text rule set -->
370 <SEQ DELEGATE="XML_TEXT" TYPE="LITERAL3">&gt;</SEQ>
371 </RULES>
372
373 <RULES SET="XML_TEXT" DEFAULT="COMMENT4">
374 <!-- scala expression -->
375 <SPAN DELEGATE="MAIN">
376 <BEGIN>{</BEGIN>
377 <END>}</END>
378 </SPAN>
379
380 <SEQ_REGEXP HASH_CHAR="&lt;" DELEGATE="XML_COMMENT" TYPE="COMMENT2"
381 >&lt;!--</SEQ_REGEXP>
382 <!-- if "<" goto xml_tag rule set -->
383 <SEQ_REGEXP HASH_CHAR="&lt;" DELEGATE="XML_TAG" TYPE="LITERAL3"
384 >&lt;\/?\w*</SEQ_REGEXP>
385 </RULES>
386
387 <RULES SET="XML_COMMENT" DEFAULT="COMMENT2">
388 <!-- if end_of_comment with "\n" goto main rule set -->
389 <SEQ_REGEXP HASH_CHAR="-" DELEGATE="MAIN" TYPE="COMMENT2"
390 >--&gt;$</SEQ_REGEXP>
391
392 <!-- if end_of_comment with ";" goto main rule set -->
393 <SEQ_REGEXP HASH_CHAR="-" DELEGATE="MAIN" TYPE="COMMENT2"
394 >--&gt;\s*;</SEQ_REGEXP>
395
396 <!-- if end_of_comment goto xml_text rule set -->
397 <SEQ DELEGATE="XML_TEXT" TYPE="COMMENT2">--&gt;</SEQ>
398 </RULES>
399 </MODE>
400
401 <!-- $Id: scala.xml 12156 2007-06-28 12:33:22Z michelou $ -->
Something went wrong with that request. Please try again.