Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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