Debian Codegraph @

data/syntax/jam.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language
3 [
4 <!ENTITY ident "([^\t $&quot;\\]+|\$(?!\()|\\.)+">
5 ]>
6 <!--
7 Documentation:
8 https://www.bfgroup.xyz/b2/manual/release/index.html
9 -->
10
11 <!--
12 Copyright (C) 2006 Mildred <[email protected]>.
13
14 Permission is hereby granted, free of charge, to any person obtaining a copy
15 of this software and associated documentation files (the "Software"), to
16 deal in the Software without restriction, including without limitation the
17 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 sell copies of the Software, and to permit persons to whom the Software is
19 furnished to do so, subject to the following conditions:
20
21 The above copyright notice and this permission notice shall be included in
22 all copies or substantial portions of the Software.
23
24 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
30 IN THE SOFTWARE.
31 -->
32 <language name="Jam" version="13" kateversion="5.79" section="Other" extensions="Jam*;*.jam" mimetype="text/x-jam;text/x-Jamfile;text/x-Jamrules;text/x-Jambase" author="Mildred ([email protected])" license="MIT">
33 <!--
34 Changelog
35 0.2
36 * now tokens like [ ] { } ( ) : ; are not detected if there is no whitespace before and after
37 * Jam* files are handled (example Jamrules or Jambase)
38 * different colors
39 * Subvariables are handled (example : $(varname[$(v)])
40 * Include bash highlighting inside actions blocks
41 * rules names are found in rules definitions
42 * highlight the variable reference in rule definitions after 'bind'
43 0.3
44 * because weakDelimiter isn't supported, it is not possible to just have some locals delimiters for the tokens and globals delimiters as default. So it's not possible to have our usual double click to select.
45 * 'actions action_name bind var' instead of 'actions bind var action_name'
46 * bun in syntax 'rule Rulename : param param ...' ':' is not recognized. fixed
47 * fixed some bugs found when looking at Jambase (peacemeal -> piecemeal, ...)
48 * variables recognized in strings
49 * named parameters for rules ... the syntax has changed : 'rule rulename param : param : param {'
50 * changed section from Scripts to Other
51 Feature request to Kate dev.
52 * returnContext attribute
53 * ability to enter a new context after a #pop
54 * when you include rules from foreign contexts (here Bash), having the ability to prepend some rules to all foreign contexts for example to terminate the included context before it naturally ends.
55
56 0.4
57 * fix `x=`: is a rule named `x=`, not a variable
58 * fix `exe onxxxxx`: is a rule call, not a variable
59 * fix `ifxxx`, `rulexxx`, etc: not keywords
60 * fix `variable default = xxx ;`
61 * fix keywords and operators in a condition: they must be separated by spaces
62 * fix `on target`
63 * fix `switch`
64 * fix `class` and `module`
65 * fix `for local x`
66 * new styles: Feature and FeatureOperator for `<xxx>`, `-<xxx>`, `<xxx>abc:<yyy>abc`, `<xxx>abc/<yyy>abc`, `<xxx>abc&&def`
67 * don't use black color in Rule
68
69 v5
70 * fix `local x ;`, `x` is a variable not a rule
71 * highlight subrule: `exe x : [ glob *.cpp ]`
72 -->
73 <highlighting>
74 <list name="keywords">
75 <item>break</item>
76 <item>continue</item>
77 <item>else</item>
78 </list>
79 <list name="keywordIf">
80 <item>if</item>
81 <item>while</item>
82 </list>
83 <list name="keywordAcceptRule">
84 <item>include</item>
85 <item>return</item>
86 </list>
87 <list name="keywordClass"><item>class</item></list>
88 <list name="keywordModule"><item>module</item></list>
89 <list name="keywordSwitch"><item>switch</item></list>
90 <list name="keywordActions"><item>actions</item></list>
91 <list name="keywordRule"><item>rule</item></list>
92 <list name="keywordFor"><item>for</item></list>
93 <list name="keywordOn"><item>on</item></list>
94 <list name="keywordReturn"><item>return</item></list>
95 <list name="keywordIn"><item>in</item></list>
96 <list name="keywordCase"><item>case</item></list>
97 <list name="keywordLocal"><item>local</item></list>
98
99 <list name="actionAttribute">
100 <item>existing</item>
101 <item>ignore</item>
102 <item>piecemeal</item>
103 <item>quietly</item>
104 <item>together</item>
105 <item>updated</item>
106 </list>
107 <list name="actionAttributeBind">
108 <item>bind</item>
109 </list>
110
111 <list name="onTarget"><item>target</item></list>
112
113 <list name="features">
114 <item>&lt;address-model&gt;</item>
115 <item>&lt;address-sanitizer&gt;</item>
116 <item>&lt;allow-system-cflags&gt;</item>
117 <item>&lt;allow-system-libs&gt;</item>
118 <item>&lt;architecture&gt;</item>
119 <item>&lt;archiver&gt;</item>
120 <item>&lt;asciidoctor-attribute&gt;</item>
121 <item>&lt;asciidoctor-backend&gt;</item>
122 <item>&lt;asciidoctor-doctype&gt;</item>
123 <item>&lt;assembler&gt;</item>
124 <item>&lt;boostbook&gt;</item>
125 <item>&lt;build&gt;</item>
126 <item>&lt;build-name&gt;</item>
127 <item>&lt;c++-template-depth&gt;</item>
128 <item>&lt;catalog&gt;</item>
129 <item>&lt;cflags&gt;</item>
130 <item>&lt;compileflags&gt;</item>
131 <item>&lt;compiler&gt;</item>
132 <item>&lt;compiler-filter&gt;</item>
133 <item>&lt;cxxflags&gt;</item>
134 <item>&lt;debug-symbols&gt;</item>
135 <item>&lt;def-file&gt;</item>
136 <item>&lt;define&gt;</item>
137 <item>&lt;dll-path&gt;</item>
138 <item>&lt;doxygen:param&gt;</item>
139 <item>&lt;doxygen:xml-imagedir&gt;</item>
140 <item>&lt;embed-manifest&gt;</item>
141 <item>&lt;embed-manifest-file&gt;</item>
142 <item>&lt;file&gt;</item>
143 <item>&lt;format&gt;</item>
144 <item>&lt;hardcode-dll-paths&gt;</item>
145 <item>&lt;idl-compiler&gt;</item>
146 <item>&lt;implicit-dependency&gt;</item>
147 <item>&lt;import&gt;</item>
148 <item>&lt;include&gt;</item>
149 <item>&lt;includes&gt;</item>
150 <item>&lt;inlining&gt;</item>
151 <item>&lt;install-dependencies&gt;</item>
152 <item>&lt;install-source-root&gt;</item>
153 <item>&lt;install-type&gt;</item>
154 <item>&lt;instruction-set&gt;</item>
155 <item>&lt;libdir&gt;</item>
156 <item>&lt;library&gt;</item>
157 <item>&lt;link&gt;</item>
158 <item>&lt;linker&gt;</item>
159 <item>&lt;linkflags&gt;</item>
160 <item>&lt;local-visibility&gt;</item>
161 <item>&lt;location&gt;</item>
162 <item>&lt;location-prefix&gt;</item>
163 <item>&lt;mc-compiler&gt;</item>
164 <item>&lt;name&gt;</item>
165 <item>&lt;optimization&gt;</item>
166 <item>&lt;parallelism&gt;</item>
167 <item>&lt;path&gt;</item>
168 <item>&lt;pkg-config&gt;</item>
169 <item>&lt;pkg-config-define&gt;</item>
170 <item>&lt;prefix&gt;</item>
171 <item>&lt;profiling&gt;</item>
172 <item>&lt;ranlib&gt;</item>
173 <item>&lt;rc&gt;</item>
174 <item>&lt;rc-type&gt;</item>
175 <item>&lt;reftitle&gt;</item>
176 <item>&lt;relevant&gt;</item>
177 <item>&lt;resource-compiler&gt;</item>
178 <item>&lt;root&gt;</item>
179 <item>&lt;runtime-debugging&gt;</item>
180 <item>&lt;runtime-link&gt;</item>
181 <item>&lt;sass-line-numbers&gt;</item>
182 <item>&lt;sass-style&gt;</item>
183 <item>&lt;search&gt;</item>
184 <item>&lt;setup&gt;</item>
185 <item>&lt;setup-amd64&gt;</item>
186 <item>&lt;setup-i386&gt;</item>
187 <item>&lt;setup-ia64&gt;</item>
188 <item>&lt;source&gt;</item>
189 <item>&lt;sysroot&gt;</item>
190 <item>&lt;target-os&gt;</item>
191 <item>&lt;testing.arg&gt;</item>
192 <item>&lt;testing.launcher&gt;</item>
193 <item>&lt;thread-sanitizer&gt;</item>
194 <item>&lt;threading&gt;</item>
195 <item>&lt;toolset&gt;</item>
196 <item>&lt;undefined-sanitizer&gt;</item>
197 <item>&lt;use&gt;</item>
198 <item>&lt;variable&gt;</item>
199 <item>&lt;variant&gt;</item>
200 <item>&lt;verbatim-options&gt;</item>
201 <item>&lt;version&gt;</item>
202 <item>&lt;visibility&gt;</item>
203 <item>&lt;warnings&gt;</item>
204 <item>&lt;warnings-as-errors&gt;</item>
205 <item>&lt;xsl:param&gt;</item>
206 <item>&lt;xsl:path&gt;</item>
207 <item>&lt;xslt&gt;</item>
208 <item>&lt;xslt-dir&gt;</item>
209 </list>
210
211 <contexts>
212
213 <context attribute="Normal" lineEndContext="#stay" name="Normal">
214 <IncludeRules context="Preprocess"/>
215 <WordDetect attribute="Error" context="#stay" String="}" endRegion="block"/>
216 <IncludeRules context="Statement"/>
217 </context>
218
219 <context attribute="Normal" lineEndContext="#stay" name="Block">
220 <IncludeRules context="Preprocess"/>
221 <WordDetect attribute="Operator" context="#pop" String="}" endRegion="block"/>
222 <IncludeRules context="Statement"/>
223 </context>
224
225 <context attribute="Normal" lineEndContext="#stay" name="Statement">
226 <IncludeRules context="Preprocess"/>
227 <keyword attribute="Keyword" context="ActionDefinition" String="keywordActions"/>
228 <keyword attribute="Keyword" context="RuleDefinition" String="keywordRule"/>
229 <keyword attribute="Keyword" context="ForStatement" String="keywordFor"/>
230 <keyword attribute="Keyword" context="IfStatement" String="keywordIf"/>
231 <keyword attribute="Keyword" context="Rule" String="keywordAcceptRule"/>
232 <keyword attribute="Keyword" context="OnPreStment" String="keywordOn"/>
233 <keyword attribute="Keyword" context="SwitchStatement" String="keywordSwitch"/>
234 <keyword attribute="Keyword" context="ClassStatement" String="keywordClass"/>
235 <keyword attribute="Keyword" context="ModuleStatement" String="keywordModule"/>
236 <keyword attribute="Keyword" context="#stay" String="keywords"/>
237 <keyword attribute="Keyword" context="Local" String="keywordLocal"/>
238 <WordDetect attribute="Operator" context="Block" String="{" beginRegion="block"/>
239 <RegExpr attribute="VarAssign" context="Assignment" String="[^\t ]+[\t ]+(?=([+?]?=|on|default)([\t ]|$))" />
240 <RegExpr attribute="Rule" context="Rule" String="([^\t ][^\t ]+|[^{}\t ])"/>
241 </context>
242
243 <context attribute="Normal" lineEndContext="#stay" name="FindBlank">
244 <DetectSpaces attribute="Normal"/>
245 <Detect2Chars attribute="CommentTitle" context="CommentTitle" char="#" char1="#"/>
246 <Detect2Chars attribute="Comment" context="CommentBlock" char="#" char1="|"/>
247 <DetectChar attribute="Comment" context="Comment" char="#"/>
248 </context>
249
250 <!-- General instructions -->
251
252 <context attribute="Normal" lineEndContext="#stay" name="Rule">
253 <IncludeRules context="Preprocess"/>
254 <WordDetect attribute="Operator" context="#stay" String=":"/>
255 <WordDetect attribute="Operator" context="#pop" String=";"/>
256 <IncludeRules context="ValueIdentifier"/>
257 </context>
258
259 <context attribute="Normal" lineEndContext="#stay" name="ValueIdentifier">
260 <DetectChar attribute="Feature" context="Feature" char="&lt;"/>
261 <RegExpr attribute="FeatureOperator" context="#stay" String="-(?=&lt;)"/>
262 <RegExpr attribute="Normal" context="#stay" String="([^\t $&amp;&quot;\\]+|\$(?!\()|&amp;(?!&amp;)|\\.)+"/>
263 <!-- auto-completion only -->
264 <keyword attribute="Feature" context="#stay" String="features"/>
265 </context>
266
267 <context attribute="Normal" lineEndContext="#pop" name="Feature" fallthroughContext="#pop">
268 <AnyChar attribute="Error" context="#pop" String="&#9; " />
269 <DetectChar attribute="Feature" context="#pop!Property" char=">"/>
270 <Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
271 <DetectChar attribute="String" context="String" char="&quot;"/>
272 <RegExpr attribute="Feature" context="#stay" String="([^\t $>&quot;#\\]+|\$(?!\()|\\.)+"/>
273 </context>
274
275 <context attribute="Normal" lineEndContext="#pop" name="Property" fallthroughContext="#pop">
276 <AnyChar attribute="Normal" context="#pop" String="&#9; " />
277 <Detect2Chars attribute="FeatureOperator" context="#pop" char="&amp;" char1="&amp;"/>
278 <Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
279 <DetectChar attribute="String" context="String" char="&quot;"/>
280 <RegExpr attribute="FeatureOperator" context="#pop!PropertyFeature" String="[:/,](?=[&lt;\t ]|$)"/>
281 <RegExpr attribute="Normal" context="#stay" String="([^\t $:&amp;&quot;:/,#\\]+|\$(?!\()|&amp;(?!&amp;)|[:/,](?!&lt;)|\\.)+"/>
282 </context>
283
284 <context attribute="Normal" lineEndContext="#pop" name="PropertyFeature" fallthroughContext="#pop">
285 <DetectChar attribute="Feature" context="#pop!Feature" char="&lt;"/>
286 </context>
287
288 <context attribute="Normal" lineEndContext="#stay" name="OnPreStment" fallthroughContext="#pop">
289 <DetectSpaces/>
290 <keyword attribute="Keyword" context="OnTargetPreStment" String="onTarget"/>
291 </context>
292
293 <context attribute="Normal" lineEndContext="#stay" name="OnTargetPreStment" fallthroughContext="#pop">
294 <IncludeRules context="Preprocess"/>
295 <WordDetect attribute="Operator" context="#stay" String=":"/>
296 <WordDetect attribute="Operator" context="#pop#pop" String=";"/>
297 <RegExpr attribute="Normal" context="#stay" String="&ident;"/>
298 </context>
299
300 <context attribute="Normal" lineEndContext="#stay" name="ClassStatement">
301 <IncludeRules context="Preprocess"/>
302 <WordDetect attribute="Operator" context="#pop!ClassStatement2" String="{" beginRegion="block"/>
303 <WordDetect attribute="Operator" context="#stay" String=":"/>
304 <RegExpr attribute="Normal" context="#stay" String="&ident;"/>
305 </context>
306
307 <context attribute="Normal" lineEndContext="#stay" name="ModuleStatement">
308 <DetectSpaces/>
309 <RegExpr attribute="Normal" context="#pop" String="&ident;"/>
310 </context>
311
312 <context attribute="Normal" lineEndContext="#stay" name="ClassStatement2">
313 <IncludeRules context="FindBlank"/>
314 <WordDetect attribute="Operator" context="#pop" String="}" endRegion="block"/>
315 <keyword attribute="Keyword" context="MethodDefinition" String="keywordRule"/>
316 <RegExpr attribute="Error" context="#stay" String="&ident;"/>
317 </context>
318
319 <context attribute="Normal" lineEndContext="#stay" name="MethodDefinition">
320 <IncludeRules context="Preprocess"/>
321 <WordDetect attribute="Error" context="#stay" String=":"/>
322 <WordDetect attribute="Operator" context="MethodDefinition2" String="{" beginRegion="block"/>
323 <RegExpr attribute="Rule" context="VarnameList" String="&ident;"/>
324 </context>
325
326 <context attribute="Normal" lineEndContext="#stay" name="MethodDefinition2">
327 <DetectSpaces/>
328 <WordDetect attribute="Operator" context="#pop#pop" String="}" endRegion="block"/>
329 <IncludeRules context="Statement"/>
330 </context>
331
332 <!-- Assignment -->
333
334 <context attribute="Normal" lineEndContext="#stay" name="Assignment">
335 <DetectChar attribute="Operator" context="Assignment2" char="="/>
336 <Detect2Chars attribute="Operator" context="Assignment2" char="+" char1="="/>
337 <Detect2Chars attribute="Operator" context="Assignment2" char="?" char1="="/>
338 <Detect2Chars attribute="Operator" context="AssignmentOn" char="o" char1="n"/>
339 <StringDetect attribute="Keyword" context="AssignmentDefault" String="default"/>
340 </context>
341
342 <context attribute="Normal" lineEndContext="#stay" name="Assignment2">
343 <IncludeRules context="Preprocess"/>
344 <WordDetect attribute="Operator" context="#pop#pop" String=";"/>
345 <IncludeRules context="ValueIdentifier"/>
346 </context>
347
348 <context attribute="Normal" lineEndContext="#stay" name="AssignmentOn">
349 <IncludeRules context="Preprocess"/>
350 <DetectChar attribute="Operator" context="#pop!Assignment2" char="="/>
351 <Detect2Chars attribute="Operator" context="#pop!Assignment2" char="+" char1="="/>
352 <Detect2Chars attribute="Operator" context="#pop!Assignment2" char="?" char1="="/>
353 <RegExpr attribute="Normal" context="#stay" String="&ident;"/>
354 </context>
355
356 <context attribute="Error" lineEndContext="#stay" name="AssignmentDefault">
357 <DetectSpaces attribute="Normal"/>
358 <DetectChar attribute="Operator" context="#pop!Assignment2" char="="/>
359 </context>
360
361 <!-- Sub statements -->
362
363 <context attribute="Normal" lineEndContext="#stay" name="SubStatement" fallthroughContext="SubRule">
364 <DetectSpaces/>
365 <Detect2Chars attribute="Keyword" context="OnSubStatement" char="o" char1="n"/>
366 </context>
367
368 <context attribute="Normal" lineEndContext="#stay" name="OnSubStatement" fallthroughContext="OnSubStatement2">
369 <DetectSpaces/>
370 <keyword attribute="Keyword" context="#pop!SubRule" String="onTarget"/>
371 </context>
372
373 <context attribute="Normal" lineEndContext="#stay" name="OnSubStatement2">
374 <IncludeRules context="Preprocess"/>
375 <keyword attribute="Keyword" context="#stay" String="keywordReturn"/>
376 <WordDetect attribute="Operator" context="#stay" String=":"/>
377 <WordDetect attribute="Operator" context="#pop#pop#pop" String="]"/>
378 <RegExpr attribute="Normal" context="#stay" String="&ident;"/>
379 </context>
380
381 <context attribute="Normal" lineEndContext="#stay" name="SubRule" fallthroughContext="#pop!SubRuleParam">
382 <DetectSpaces/>
383 <RegExpr attribute="Rule" context="#pop!SubRuleParam" String="&ident;"/>
384 </context>
385
386 <context attribute="Normal" lineEndContext="#stay" name="SubRuleParam">
387 <IncludeRules context="Preprocess"/>
388 <WordDetect attribute="Operator" context="#stay" String=":"/>
389 <WordDetect attribute="Operator" context="#pop#pop" String="]"/>
390 <RegExpr attribute="Feature" context="Property" String="&lt;[^\t >]+>"/>
391 <RegExpr attribute="Normal" context="#stay" String="&ident;"/>
392 <!-- auto-completion only -->
393 <keyword attribute="Feature" context="#stay" String="features"/>
394 </context>
395
396 <!-- Actions, Rules definitions -->
397
398 <context attribute="Normal" lineEndContext="#stay" name="ActionDefinition">
399 <IncludeRules context="Preprocess"/>
400 <keyword attribute="Error" context="#stay" String="actionAttributeBind"/>
401 <keyword attribute="actionAttribute" context="#stay" String="actionAttribute"/>
402 <WordDetect attribute="Operator" context="ActionBody" String="{" beginRegion="block"/>
403 <RegExpr attribute="Action" context="ActionDefinitionFull" String="&ident;"/>
404 </context>
405
406 <context attribute="Error" lineEndContext="#stay" name="ActionDefinitionFull">
407 <IncludeRules context="Preprocess"/>
408 <WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
409 <keyword attribute="actionAttribute" context="ActionDefinitionBind" String="actionAttributeBind"/>
410 </context>
411
412 <context attribute="Normal" lineEndContext="#stay" name="ActionDefinitionBind">
413 <IncludeRules context="Preprocess"/>
414 <WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
415 <RegExpr attribute="Varname" context="#stay" String="&ident;"/>
416 </context>
417
418 <context attribute="Normal" lineEndContext="#stay" name="ActionBody" fallthroughContext="Command##Bash">
419 <WordDetect attribute="Operator" context="#pop#pop" String="}" endRegion="block"/>
420 <IncludeRules context="##Bash"/>
421 </context>
422
423 <context attribute="Normal" lineEndContext="#stay" name="RuleDefinition">
424 <IncludeRules context="Preprocess"/>
425 <WordDetect attribute="Error" context="#stay" String=":"/>
426 <WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
427 <RegExpr attribute="Rule" context="VarnameList" String="&ident;"/>
428 </context>
429
430 <context attribute="Normal" lineEndContext="#stay" name="VarnameList">
431 <IncludeRules context="Preprocess"/>
432 <WordDetect attribute="Operator" context="VarnameList" String=":"/>
433 <WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
434 <AnyChar attribute="VariableAttribute" context="#stay" String="?+*"/>
435 <RegExpr attribute="Varname" context="#stay" String="&ident;"/>
436 </context>
437
438 <!-- for, while, if, switch -->
439
440 <context attribute="Normal" lineEndContext="#stay" name="ForStatement" fallthroughContext="#pop!ForStatement2">
441 <DetectSpaces/>
442 <keyword attribute="Keyword" context="#pop!ForStatement2" String="keywordLocal"/>
443 </context>
444
445 <context attribute="Normal" lineEndContext="#stay" name="ForStatement2">
446 <IncludeRules context="Preprocess"/>
447 <keyword attribute="Operator" context="ForList" String="keywordIn"/>
448 <RegExpr attribute="Varname" context="#stay" String="&ident;"/>
449 </context>
450
451 <context attribute="Normal" lineEndContext="#stay" name="ForList">
452 <IncludeRules context="Preprocess"/>
453 <WordDetect attribute="Operator" context="#pop#pop" String="{" lookAhead="true"/>
454 <RegExpr attribute="Normal" context="#stay" String="&ident;"/>
455 </context>
456
457 <context attribute="Normal" lineEndContext="#stay" name="IfStatement">
458 <IncludeRules context="Preprocess"/>
459 <RegExpr attribute="Operator" context="#stay" String="([=&lt;>!]?=|[&lt;>!()]|&amp;&amp;|\|\||in)(?=[ \t]|$)"/>
460 <WordDetect attribute="Operator" context="#pop" String="{" lookAhead="true"/>
461 <RegExpr attribute="Feature" context="Property" String="&lt;[^\t >]+>"/>
462 <RegExpr attribute="Normal" context="#stay" String="&ident;"/>
463 <!-- auto-completion only -->
464 <keyword attribute="Feature" context="#stay" String="features"/>
465 </context>
466
467 <context attribute="Normal" lineEndContext="#stay" name="SwitchStatement">
468 <IncludeRules context="Preprocess"/>
469 <WordDetect attribute="Operator" context="#pop!SwitchStatement2" String="{" beginRegion="block"/>
470 <RegExpr attribute="Normal" context="#stay" String="&ident;"/>
471 </context>
472
473 <context attribute="Normal" lineEndContext="#stay" name="SwitchStatement2">
474 <IncludeRules context="FindBlank"/>
475 <WordDetect attribute="Operator" context="#pop" String="}" endRegion="block"/>
476 <keyword attribute="Operator" context="CaseCond" String="keywordCase"/>
477 <RegExpr attribute="Error" context="#stay" String="&ident;"/>
478 </context>
479
480 <context attribute="Normal" lineEndContext="#stay" name="CaseCond">
481 <IncludeRules context="FindBlank"/>
482 <WordDetect attribute="Operator" context="#pop!CaseStatement" String=":"/>
483 <WordDetect attribute="Error" context="#pop" String=";"/>
484 <RegExpr attribute="Normal" context="#stay" String="&ident;"/>
485 </context>
486
487 <context attribute="Normal" lineEndContext="#stay" name="CaseStatement">
488 <IncludeRules context="Preprocess"/>
489 <WordDetect attribute="Operator" context="#stay" String=":"/>
490 <WordDetect attribute="Operator" context="#pop" String=";"/>
491 <IncludeRules context="ValueIdentifier"/>
492 </context>
493
494 <!-- local -->
495
496 <context attribute="Variable" lineEndContext="#stay" name="Local">
497 <DetectSpaces attribute="Normal"/>
498 <keyword attribute="Keyword" context="#pop!RuleDefinition" String="keywordRule"/>
499 <RegExpr attribute="VarAssign" context="#pop!LocalInit" String="&ident;"/>
500 <WordDetect attribute="Operator" context="#pop" String=";"/>
501 </context>
502
503 <context attribute="Normal" lineEndContext="#stay" name="LocalInit" fallthroughContext="#pop">
504 <DetectSpaces attribute="Normal"/>
505 <DetectChar attribute="Operator" context="Assignment2" char="="/>
506 <WordDetect attribute="Operator" context="#pop" String=";"/>
507 </context>
508
509 <!-- Variables, Strings, Comments -->
510
511 <context attribute="Normal" lineEndContext="#stay" name="Preprocess">
512 <IncludeRules context="FindBlank"/>
513 <Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
514 <DetectChar attribute="String" context="String" char="&quot;"/>
515 <WordDetect attribute="Operator" context="SubStatement" String="["/>
516 </context>
517
518 <context attribute="Variable" lineEndContext="Error" name="Variable">
519 <Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
520 <DetectChar attribute="VariableDelimiter" context="#pop" char=")"/>
521 <DetectChar attribute="VariableAttribute" context="VariableRange" char="["/>
522 <DetectChar attribute="VariableAttribute" context="VariableAttribute" char=":"/>
523 </context>
524
525 <context attribute="VariableAttribute" lineEndContext="Error" name="VariableRange">
526 <Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
527 <DetectChar attribute="VariableAttribute" context="#pop" char="]"/>
528 </context>
529
530 <context attribute="VariableAttribute" lineEndContext="Error" name="VariableAttribute">
531 <Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
532 <DetectChar attribute="Variable" context="#pop" char=")" lookAhead="true"/>
533 </context>
534
535 <context attribute="Comment" lineEndContext="#pop" name="Comment">
536 <DetectSpaces/>
537 <IncludeRules context="##Comments" />
538 <DetectIdentifier/>
539 </context>
540
541 <context attribute="Comment" lineEndContext="#stay" name="CommentBlock">
542 <Detect2Chars attribute="Comment" context="#pop" char="|" char1="#"/>
543 <IncludeRules context="Comment"/>
544 </context>
545
546 <context attribute="CommentTitle" lineEndContext="#pop" name="CommentTitle">
547 <IncludeRules context="Comment"/>
548 </context>
549
550 <context attribute="String" lineEndContext="#stay" name="String">
551 <Detect2Chars attribute="VariableDelimiter" context="Variable" char="$" char1="("/>
552 <Detect2Chars attribute="EscapeSeq" context="#stay" char="\" char1="&quot;"/>
553 <DetectChar attribute="EscapeSeq" context="#stay" char="\"/>
554 <DetectChar attribute="String" context="#pop" char="&quot;"/>
555 </context>
556
557 <!-- Error -->
558
559 <context attribute="Error" lineEndContext="#stay" name="Error"/>
560
561 </contexts>
562 <itemDatas>
563 <!-- action definition (shell script) -->
564 <itemData name="actionAttribute" defStyleNum="dsAttribute"/>
565 <!-- rule / action call -->
566 <itemData name="Rule" defStyleNum="dsFunction"/>
567 <itemData name="Action" defStyleNum="dsNormal"/>
568 <!-- variables with attributes -->
569 <itemData name="Variable" defStyleNum="dsVariable"/>
570 <itemData name="VariableDelimiter" defStyleNum="dsOperator"/>
571 <itemData name="VariableAttribute" defStyleNum="dsAttribute"/>
572 <itemData name="VarAssign" defStyleNum="dsVariable"/>
573 <itemData name="Varname" defStyleNum="dsVariable"/>
574 <!-- common -->
575 <itemData name="Normal" defStyleNum="dsNormal"/>
576 <itemData name="Feature" defStyleNum="dsBuiltIn"/>
577 <itemData name="FeatureOperator" defStyleNum="dsOperator" bold="1"/>
578 <itemData name="Operator" defStyleNum="dsOperator" bold="1"/>
579 <itemData name="Keyword" defStyleNum="dsKeyword"/>
580 <itemData name="Comment" defStyleNum="dsComment"/>
581 <itemData name="CommentTitle" defStyleNum="dsComment" bold="1"/>
582 <itemData name="String" defStyleNum="dsString"/>
583 <itemData name="EscapeSeq" defStyleNum="dsSpecialChar"/>
584 <itemData name="Error" defStyleNum="dsError"/>
585 </itemDatas>
586 </highlighting>
587 <general>
588 <comments>
589 <comment name="singleLine" start="#"/>
590 </comments>
591 <keywords weakDeliminator=":;{}()[].!+,-&lt;=&gt;%&amp;/?^|~\*,"/>
592 </general>
593 </language>
594 <!-- kate: space-indent on; indent-width 2; replace-tabs on; -->