Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 366 lines (321 sloc) 11.812 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" />
2e05120 @djspiewak More robust auto-indentation
authored
10 <PROPERTY NAME="indentNextLine"
f7023ae @djspiewak Auto-indent even where the trigger is not the first expr
authored
11 VALUE="(.*((if|while|else\s+if|for)\s*\().*\)|\s*else|\s*case.*=>|.*(def|val|var|type).*=)\s*$"/>
e692455 @djspiewak Initial commit
authored
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
f8a9988 @djspiewak Fixed backslash symbol as a method name
authored
23 <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
e692455 @djspiewak Initial commit
authored
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>
aa62c69 @djspiewak Rewrote support for highlighting of XML literals (recursive rule sets…
authored
48
49 <!-- XML literals; keep this in sync with the XML_LITERAL rule set! -->
50 <SPAN TYPE="COMMENT2">
51 <BEGIN>&lt;!--</BEGIN>
52 <END>--&gt;</END>
53 </SPAN>
54
55 <SEQ_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL3">&lt;([^/&gt;]+)/&gt;</SEQ_REGEXP>
56
57 <SPAN_REGEXP DELEGATE="XML_LITERAL" HASH_CHAR="&lt;" MATCH_TYPE="LITERAL3" TYPE="NULL">
58 <BEGIN>&lt;([^\s/&gt;]+)[^/&gt;]*&gt;</BEGIN>
59 <END>&lt;/$1&gt;</END>
60 </SPAN_REGEXP>
e692455 @djspiewak Initial commit
authored
61
62 <!-- string and character literals -->
c7d7e66 @djspiewak Case as dummy keyword (slicker text input); No escape from """
authored
63 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE" ESCAPE="FALSE">
ce84df5 @djspiewak Fixed """ string literals
authored
64 <BEGIN>"""</BEGIN>
65 <END>"""</END>
66 </SPAN>
f8a9988 @djspiewak Fixed backslash symbol as a method name
authored
67 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
e692455 @djspiewak Initial commit
authored
68 <BEGIN>"</BEGIN>
69 <END>"</END>
70 </SPAN>
71 <SEQ_REGEXP HASH_CHAR="'" TYPE="LITERAL1">'([^']|\\.)'</SEQ_REGEXP>
72
73 <!-- symbol literals -->
9322021 @djspiewak Fixed symbol regexp (I think)
authored
74 <SEQ_REGEXP HASH_CHAR="'" TYPE="LABEL">'[0-9a-zA-Z&gt;&lt;=+]([0-9a-zA-Z&gt;&lt;=+]|_[0-9a-zA-Z&gt;&lt;=+])*</SEQ_REGEXP>
e692455 @djspiewak Initial commit
authored
75
17856ce @djspiewak Support for type parameters nested to an arbitrary depth
authored
76 <SPAN MATCH_TYPE="LITERAL3" DELEGATE="TYPE_PARAMS">
77 <BEGIN>[</BEGIN>
78 <END>]</END>
79 </SPAN>
881f0f1 @djspiewak Added (basic) support for backtic escapes
authored
80
81 <SPAN MATCH_TYPE="NULL">
82 <BEGIN>`</BEGIN>
83 <END>`</END>
84 </SPAN>
e692455 @djspiewak Initial commit
authored
85
31d98f1 @djspiewak Added '(' to the set of operators
authored
86 <SEQ TYPE="OPERATOR">(</SEQ>
e692455 @djspiewak Initial commit
authored
87 <SEQ TYPE="OPERATOR">)</SEQ>
88 <SEQ TYPE="OPERATOR">}</SEQ>
89 <SEQ TYPE="OPERATOR">{</SEQ>
90 <SEQ TYPE="NULL">.</SEQ>
91 <SEQ TYPE="NULL">,</SEQ>
92 <SEQ TYPE="NULL">;</SEQ>
93 <SEQ TYPE="NULL">]</SEQ>
94 <SEQ TYPE="NULL">[</SEQ>
95 <SEQ TYPE="NULL">:</SEQ>
96
97 <!-- Function calls -->
9cab4ca @djspiewak More consistent (and less ambitious) function highlighting
authored
98 <!-- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS> -->
99
100 <!-- Function declarations (overloaded for different spacing styles)-->
101 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
102 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
103 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
104 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
105 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
106 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
107 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
108
fa936fe @djspiewak Fixed case...er, case issue
authored
109 <SPAN DELEGATE="PATTERN" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE" NO_LINE_BREAK="TRUE">
110 <BEGIN>case </BEGIN>
06f1931 @djspiewak El Bizarro hack for annotations vs patterns
authored
111 <END>=&gt;</END>
fa936fe @djspiewak Fixed case...er, case issue
authored
112 </SPAN>
e692455 @djspiewak Initial commit
authored
113
fa936fe @djspiewak Fixed case...er, case issue
authored
114 <KEYWORDS>
e692455 @djspiewak Initial commit
authored
115 <KEYWORD1>abstract</KEYWORD1>
c7d7e66 @djspiewak Case as dummy keyword (slicker text input); No escape from """
authored
116 <KEYWORD1>case</KEYWORD1>
e692455 @djspiewak Initial commit
authored
117 <KEYWORD1>catch</KEYWORD1>
118 <KEYWORD1>class</KEYWORD1>
119 <KEYWORD1>def</KEYWORD1>
120 <KEYWORD1>do</KEYWORD1>
121 <KEYWORD1>else</KEYWORD1>
122 <KEYWORD1>extends</KEYWORD1>
123 <KEYWORD1>final</KEYWORD1>
124 <KEYWORD1>finally</KEYWORD1>
125 <KEYWORD1>for</KEYWORD1>
126 <KEYWORD1>forSome</KEYWORD1>
127 <KEYWORD1>if</KEYWORD1>
128 <KEYWORD1>implicit</KEYWORD1>
129 <KEYWORD1>import</KEYWORD1>
130 <KEYWORD1>lazy</KEYWORD1>
131 <KEYWORD1>match</KEYWORD1>
132 <KEYWORD1>new</KEYWORD1>
133 <KEYWORD1>object</KEYWORD1>
134 <KEYWORD1>override</KEYWORD1>
135 <KEYWORD1>package</KEYWORD1>
136 <KEYWORD1>private</KEYWORD1>
137 <KEYWORD1>protected</KEYWORD1>
138 <KEYWORD1>requires</KEYWORD1>
139 <KEYWORD1>return</KEYWORD1>
140 <KEYWORD1>sealed</KEYWORD1>
141 <KEYWORD1>throw</KEYWORD1>
142 <KEYWORD1>trait</KEYWORD1>
143 <KEYWORD1>try</KEYWORD1>
144 <KEYWORD1>type</KEYWORD1>
145 <KEYWORD1>val</KEYWORD1>
146 <KEYWORD1>var</KEYWORD1>
147 <KEYWORD1>with</KEYWORD1>
148 <KEYWORD1>while</KEYWORD1>
149 <KEYWORD1>yield</KEYWORD1>
150 <KEYWORD1>=&gt;</KEYWORD1>
151
152 <!-- java.lang.* wrapper types -->
153 <KEYWORD2>Character</KEYWORD2>
154 <KEYWORD2>Integer</KEYWORD2>
155
156 <!-- scala.* primitive types -->
157 <KEYWORD2>Boolean</KEYWORD2>
158 <KEYWORD2>boolean</KEYWORD2>
159 <KEYWORD2>Byte</KEYWORD2>
160 <KEYWORD2>byte</KEYWORD2>
161 <KEYWORD2>Char</KEYWORD2>
162 <KEYWORD2>char</KEYWORD2>
163 <KEYWORD2>Double</KEYWORD2>
164 <KEYWORD2>double</KEYWORD2>
165 <KEYWORD2>Float</KEYWORD2>
166 <KEYWORD2>float</KEYWORD2>
167 <KEYWORD2>Int</KEYWORD2>
168 <KEYWORD2>int</KEYWORD2>
169 <KEYWORD2>Long</KEYWORD2>
170 <KEYWORD2>long</KEYWORD2>
171 <KEYWORD2>Short</KEYWORD2>
172 <KEYWORD2>short</KEYWORD2>
173 <KEYWORD2>Unit</KEYWORD2>
174 <KEYWORD2>unit</KEYWORD2>
175
176 <!-- scala.* predefined types -->
177 <KEYWORD3>Actor</KEYWORD3>
178 <KEYWORD3>ActorProxy</KEYWORD3>
179 <KEYWORD3>ActorTask</KEYWORD3>
180 <KEYWORD3>ActorThread</KEYWORD3>
181 <KEYWORD3>AllRef</KEYWORD3>
182 <KEYWORD3>Any</KEYWORD3>
183 <KEYWORD3>AnyRef</KEYWORD3>
184 <KEYWORD3>Application</KEYWORD3>
185 <KEYWORD3>AppliedType</KEYWORD3>
186 <KEYWORD3>Array</KEYWORD3>>
187 <KEYWORD3>ArrayBuffer</KEYWORD3>
188 <KEYWORD3>Attribute</KEYWORD3>
189 <KEYWORD3>BoxedArray</KEYWORD3>
190 <KEYWORD3>BoxedBooleanArray</KEYWORD3>
191 <KEYWORD3>BoxedByteArray</KEYWORD3>
192 <KEYWORD3>BoxedCharArray</KEYWORD3>
193 <KEYWORD3>Buffer</KEYWORD3>
194 <KEYWORD3>BufferedIterator</KEYWORD3>
195 <KEYWORD3>Enumeration</KEYWORD3>
196 <KEYWORD3>Fluid</KEYWORD3>
197 <KEYWORD3>Function</KEYWORD3>
198 <KEYWORD3>IScheduler</KEYWORD3>
199 <KEYWORD3>ImmutableMapAdaptor</KEYWORD3>
200 <KEYWORD3>ImmutableSetAdaptor</KEYWORD3>
201 <KEYWORD3>Iterable</KEYWORD3>
202 <KEYWORD3>List</KEYWORD3>
203 <KEYWORD3>Option</KEYWORD3>
204 <KEYWORD3>Pair</KEYWORD3>
205 <KEYWORD3>PartialFunction</KEYWORD3>
206 <KEYWORD3>Pid</KEYWORD3>
207 <KEYWORD3>PriorityQueue</KEYWORD3>
208 <KEYWORD3>PriorityQueueProxy</KEYWORD3>
209 <KEYWORD3>Reaction</KEYWORD3>
210 <KEYWORD3>Ref</KEYWORD3>
211 <KEYWORD3>Responder</KEYWORD3>
212 <KEYWORD3>RichInt</KEYWORD3>
213 <KEYWORD3>RichString</KEYWORD3>
214 <KEYWORD3>Rule</KEYWORD3>
215 <KEYWORD3>RuleTransformer</KEYWORD3>
216 <KEYWORD3>Script</KEYWORD3>
217 <KEYWORD3>Some</KEYWORD3>
218 <KEYWORD3>Stream</KEYWORD3>
219 <KEYWORD3>String</KEYWORD3>
220 <KEYWORD3>Symbol</KEYWORD3>
221 <KEYWORD3>TcpService</KEYWORD3>
222 <KEYWORD3>TcpServiceWorker</KEYWORD3>
ac82190 @djspiewak Added Vector to the list of highlighted built in types
authored
223 <KEYWORD3>Vector</KEYWORD3>
e692455 @djspiewak Initial commit
authored
224 <KEYWORD3>WorkerThread</KEYWORD3>
225
226 <!-- scala.* predefined objects -->
227 <KEYWORD4>Console</KEYWORD4>
228 <KEYWORD4>Nil</KEYWORD4>
229 <KEYWORD4>None</KEYWORD4>
230 <KEYWORD4>Predef</KEYWORD4>
231 <KEYWORD4>RemoteActor</KEYWORD4>
232 <KEYWORD4>SUnit</KEYWORD4>
233 <KEYWORD4>ScalaRunTime</KEYWORD4>
234 <KEYWORD4>Scheduler</KEYWORD4>
235 <KEYWORD4>TIMEOUT</KEYWORD4>
236 <KEYWORD4>TimerThread</KEYWORD4>
237
238 <LITERAL2>false</LITERAL2>
239 <LITERAL2>null</LITERAL2>
240 <LITERAL2>super</LITERAL2>
241 <LITERAL2>this</LITERAL2>
242 <LITERAL2>true</LITERAL2>
243 </KEYWORDS>
244 </RULES>
06f1931 @djspiewak El Bizarro hack for annotations vs patterns
authored
245
17856ce @djspiewak Support for type parameters nested to an arbitrary depth
authored
246 <RULES SET="TYPE_PARAMS" DEFAULT="LITERAL3">
247 <SPAN MATCH_TYPE="LITERAL3" DELEGATE="TYPE_PARAMS">
248 <BEGIN>[</BEGIN>
249 <END>]</END>
250 </SPAN>
251 </RULES>
252
06f1931 @djspiewak El Bizarro hack for annotations vs patterns
authored
253 <RULES SET="PATTERN" DEFAULT="NULL" IGNORE_CASE="FALSE">
254 <IMPORT DELEGATE="PRIMARY"/>
255
256 <SEQ TYPE="OPERATOR">@</SEQ>
257 </RULES>
e692455 @djspiewak Initial commit
authored
258
259 <RULES SET="SCALADOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
260 <!-- so that @link{...} is highlighted -->
261 <SEQ TYPE="COMMENT3">{</SEQ>
262
263 <!-- so that *@param is highlighted -->
264 <SEQ TYPE="COMMENT3">*</SEQ>
265
266 <!-- Javadoc ignores tags inside <pre> -->
267 <SPAN TYPE="MARKUP" DELEGATE="SCALADOC_PRE">
268 <BEGIN>&lt;pre&gt;</BEGIN>
269 <END>&lt;/pre&gt;</END>
270 </SPAN>
271
272 <!-- HTML comments -->
273 <SPAN TYPE="COMMENT1">
274 <BEGIN>&lt;!--</BEGIN>
275 <END>--&gt;</END>
276 </SPAN>
277
278 <!-- Javadoc allows this -->
279 <SEQ TYPE="COMMENT3">&lt;&lt;</SEQ>
280 <SEQ TYPE="COMMENT3">&lt;=</SEQ>
281 <SEQ TYPE="COMMENT3">&lt; </SEQ>
282
283 <!-- HTML tags -->
dd032b0 @djspiewak Try to prevent the XML highlighter's issues from cascading across the…
authored
284 <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS" NO_LINE_BREAK="TRUE">
e692455 @djspiewak Initial commit
authored
285 <BEGIN>&lt;</BEGIN>
286 <END>&gt;</END>
287 </SPAN>
288
289 <KEYWORDS>
290 <LABEL>@author</LABEL>
291 <LABEL>@beaninfo</LABEL>
292 <LABEL>@history</LABEL>
293 <LABEL>@bug</LABEL>
294 <LABEL>@review</LABEL>
295 <LABEL>@todo</LABEL>
296 <LABEL>@idea</LABEL>
297 <LABEL>@pre</LABEL>
298 <LABEL>@requires</LABEL>
299 <LABEL>@post</LABEL>
300 <LABEL>@ensures</LABEL>
301 <LABEL>@generates</LABEL>
302 <LABEL>@modifies</LABEL>
303 <LABEL>@invariant</LABEL>
304 <LABEL>@exception</LABEL>
305 <LABEL>@hides</LABEL>
306 <LABEL>@overrides</LABEL>
307 <LABEL>@equivalent</LABEL>
308 <LABEL>@bon</LABEL>
309 <LABEL>@access</LABEL>
310 <LABEL>@example</LABEL>
311 <LABEL>@design</LABEL>
312 <LABEL>@serial</LABEL>
313 <LABEL>@references</LABEL>
314 <LABEL>@uses</LABEL>
315 <LABEL>@guard</LABEL>
316 <LABEL>@values</LABEL>
317 <LABEL>@complexity</LABEL>
318 <LABEL>@deprecated</LABEL>
319 <LABEL>@docRoot</LABEL>
320 <LABEL>@exception</LABEL>
321 <LABEL>@link</LABEL>
322 <LABEL>@param</LABEL>
323 <LABEL>@return</LABEL>
324 <LABEL>@see</LABEL>
325 <LABEL>@serialData</LABEL>
326 <LABEL>@serialField</LABEL>
327 <LABEL>@since</LABEL>
328 <LABEL>@throws</LABEL>
329 <LABEL>@version</LABEL>
330 <LABEL>@spec</LABEL>
331 </KEYWORDS>
332 </RULES>
333
334 <RULES SET="SCALADOC_PRE" DEFAULT="COMMENT3" />
aa62c69 @djspiewak Rewrote support for highlighting of XML literals (recursive rule sets…
authored
335
336 <!-- TODO find a way to highlight attribute names as LABEL, attribute values as LITERAL1 -->
337 <RULES SET="XML_LITERAL" DEFAULT="COMMENT4">
338 <SPAN TYPE="COMMENT2">
339 <BEGIN>&lt;!--</BEGIN>
340 <END>--&gt;</END>
341 </SPAN>
342
e692455 @djspiewak Initial commit
authored
343 <SPAN DELEGATE="MAIN">
344 <BEGIN>{</BEGIN>
345 <END>}</END>
346 </SPAN>
aa62c69 @djspiewak Rewrote support for highlighting of XML literals (recursive rule sets…
authored
347
348 <SPAN TYPE="LABEL" NO_WORD_BREAK="TRUE">
349 <BEGIN>&amp;</BEGIN>
350 <END>;</END>
e692455 @djspiewak Initial commit
authored
351 </SPAN>
aa62c69 @djspiewak Rewrote support for highlighting of XML literals (recursive rule sets…
authored
352
353 <SEQ_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL3">&lt;([^/&gt;]+)/&gt;</SEQ_REGEXP>
354
355 <!-- recursive match rule -->
356 <SPAN_REGEXP DELEGATE="XML_LITERAL" HASH_CHAR="&lt;" MATCH_TYPE="LITERAL3">
357 <BEGIN>&lt;([^\s/&gt;]+)[^/&gt;]*&gt;</BEGIN>
358 <END>&lt;/$1&gt;</END>
359 </SPAN_REGEXP>
360
361 <SEQ_REGEXP HASH_CHAR="&lt;" TYPE="INVALID">&lt;/([^/&gt;]+)&gt;</SEQ_REGEXP> <!-- unmatched closing tags -->
e692455 @djspiewak Initial commit
authored
362 </RULES>
363 </MODE>
364
365 <!-- $Id: scala.xml 12156 2007-06-28 12:33:22Z michelou $ -->
Something went wrong with that request. Please try again.