Skip to content

HTTPS clone URL

Subversion checkout URL

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