Warning, /frameworks/syntax-highlighting/data/syntax/puppet.xml is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language
0003 [
0004 <!ENTITY BareWord "[a-z][a-zA-Z0-9-_]*">
0005 <!ENTITY CapWord "[A-Z][a-zA-Z0-9-_]*">
0006 <!ENTITY namespace "[a-z][a-z0-9_]*">
0007 ]>
0008
0009 <!--
0010 Puppet syntax highlighting file:
0011
0012 Copyright (C) 2014 by Michal Humpula (michal.humpula@seznam.cz)
0013
0014 This library is free software; you can redistribute it and/or
0015 modify it under the terms of the GNU Library General Public
0016 License as published by the Free Software Foundation; either
0017 version 2 of the License, or (at your option) any later version.
0018
0019 This library is distributed in the hope that it will be useful,
0020 but WITHOUT ANY WARRANTY; without even the implied warranty of
0021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0022 Library General Public License for more details.
0023
0024 You should have received a copy of the GNU Library General Public
0025 License along with this library; if not, write to the
0026 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0027 Boston, MA 02110-1301, USA.
0028 -->
0029
0030 <language name="Puppet" section="Scripts" version="12" kateversion="5.0" extensions="*.pp" priority="10" mimetype="application/x-puppet" style="puppet" indenter="cstyle" author="Michal Humpula (michal.humpula@seznam.cz)" license="LGPLv2+">
0031 <highlighting>
0032 <list name="keywords">
0033 <item>import</item>
0034 <item>false</item>
0035 <item>true</item>
0036 <item>undef</item>
0037 </list>
0038
0039 <list name="operators">
0040 <item>in</item>
0041 <item>and</item>
0042 <item>or</item>
0043 </list>
0044
0045 <list name="collector operators">
0046 <item>and</item>
0047 <item>or</item>
0048 </list>
0049
0050 <contexts>
0051 <context name="Start" attribute="Normal Text" lineEndContext="#stay">
0052 <IncludeRules context="common" />
0053 </context>
0054
0055 <context name="common" attribute="Normal Text" lineEndContext="#stay">
0056 <DetectSpaces/>
0057 <IncludeRules context="FindComment"/>
0058 <IncludeRules context="FindString"/>
0059 <IncludeRules context="FindOperator"/>
0060 <Int attribute="Number" context="#stay" />
0061 <IncludeRules context="FindUnless"/>
0062 <IncludeRules context="FindIf"/>
0063 <IncludeRules context="FindCase"/>
0064 <keyword attribute="Keyword" String="keywords" context="#stay"/>
0065 <IncludeRules context="FindVariable"/>
0066
0067 <IncludeRules context="FindClass"/>
0068 <IncludeRules context="FindNode"/>
0069
0070 <IncludeRules context="FindCollector"/>
0071 <IncludeRules context="FindExportedCollector"/>
0072
0073 <IncludeRules context="FindResource"/>
0074 <IncludeRules context="FindResourceReference"/>
0075 <IncludeRules context="FindResourceDefaults"/>
0076 <IncludeRules context="FindDefine"/>
0077
0078 <IncludeRules context="FindArray"/>
0079 <IncludeRules context="FindHash"/>
0080
0081 <IncludeRules context="FindFunction"/>
0082 <IncludeRules context="FindStatement"/>
0083
0084 <IncludeRules context="FindBareWord"/>
0085 </context>
0086
0087 <!-- BEGIN Finders -->
0088 <context name="FindString" attribute="Normal Text" lineEndContext="#stay">
0089 <DetectChar attribute="String" char="'" context="string single"/>
0090 <DetectChar attribute="String" char=""" context="string double"/>
0091 </context>
0092
0093 <context name="FindComment" attribute="Comment" lineEndContext="#stay">
0094 <StringDetect attribute="Region Marker" String="#BEGIN" beginRegion="region marker" firstNonSpace="true" context="region marker"/>
0095 <StringDetect attribute="Region Marker" String="#END" endRegion="region marker" firstNonSpace="true" context="region marker"/>
0096 <DetectChar attribute="Comment" char="#" context="comment"/>
0097 <Detect2Chars attribute="Comment" char="/" char1="*" beginRegion="comment" context="multiline comment"/>
0098 </context>
0099
0100 <context name="FindVariable" attribute="Variable" lineEndContext="#pop">
0101 <RegExpr String="\$(::)?(&namespace;::)*[a-z]" lookAhead="true" context="variable"/>
0102 </context>
0103
0104 <context name="FindStatement" attribute="Normal Text" lineEndContext="#pop">
0105 <RegExpr attribute="Function" String="&BareWord;" context="statement" firstNonSpace="true"/>
0106 </context>
0107
0108 <context name="FindFunction" attribute="Normal Text" lineEndContext="#pop">
0109 <RegExpr String="&BareWord;\s*\(" lookAhead="true" context="function"/>
0110 </context>
0111
0112 <context name="FindResource" attribute="Normal Text" lineEndContext="#pop">
0113 <RegExpr String="@?@?(::)?(&BareWord;::)*&BareWord;\s*\{" lookAhead="true" context="resource"/>
0114 </context>
0115
0116 <context name="FindResourceReference" attribute="Normal Text" lineEndContext="#pop">
0117 <RegExpr String="(::)?(&CapWord;::)*&CapWord;\s*\[" lookAhead="true" context="res_ref"/>
0118 </context>
0119
0120 <context name="FindResourceDefaults" attribute="Normal Text" lineEndContext="#pop">
0121 <RegExpr String="(::)?(&CapWord;::)*&CapWord;\s*\{" lookAhead="true" context="res_defaults"/>
0122 </context>
0123
0124 <context name="FindOperator" attribute="Operator" lineEndContext="#pop" >
0125 <keyword attribute="Operator" String="operators" context="#stay"/>
0126 <Detect2Chars attribute="Operator" char="!" char1="=" context="#stay"/>
0127 <Detect2Chars attribute="Operator" char="+" char1="=" context="#stay"/>
0128 <Detect2Chars attribute="Operator" char="<" char1="<" context="#stay"/>
0129 <Detect2Chars attribute="Operator" char=">" char1=">" context="#stay"/>
0130 <Detect2Chars attribute="Operator" char="=" char1="=" context="#stay"/>
0131 <Detect2Chars attribute="Operator" char=">" char1="=" context="#stay"/>
0132 <Detect2Chars attribute="Operator" char="<" char1="=" context="#stay"/>
0133 <Detect2Chars attribute="Operator" char="=" char1="~" context="regexp operators"/>
0134 <Detect2Chars attribute="Operator" char="!" char1="~" context="regexp operators"/>
0135 <Detect2Chars attribute="Operator" char="-" char1=">" context="#stay"/>
0136 <Detect2Chars attribute="Operator" char="~" char1=">" context="#stay"/>
0137 <AnyChar attribute="Operator" String="!*/-+><" context="#stay"/>
0138 <DetectChar attribute="Operator" char="?" context="selector"/>
0139 </context>
0140
0141 <context name="FindResourcePath" attribute="Normal Text" lineEndContext="#pop">
0142 <RegExpr String="(&BareWord;)?::[a-z]" lookAhead="true" context="resource path"/>
0143 </context>
0144
0145 <context name="FindBareWord" attribute="Normal Text" lineEndContext="#pop">
0146 <RegExpr attribute="String" String="&BareWord;" context="#stay"/>
0147 </context>
0148
0149 <context name="FindArray" attribute="Normal Text" lineEndContext="#stay">
0150 <DetectChar char="[" context="array"/>
0151 </context>
0152
0153 <context name="FindHash" attribute="Normal Text" lineEndContext="#stay">
0154 <DetectChar char="{" lookAhead="true" context="hash"/>
0155 </context>
0156
0157 <context name="FindClass" attribute="Normal Text" lineEndContext="#stay">
0158 <WordDetect attribute="Keyword" String="class" context="class def"/>
0159 </context>
0160
0161 <context name="FindNode" attribute="Normal Text" lineEndContext="#stay">
0162 <WordDetect attribute="Keyword" String="node" context="node def"/>
0163 </context>
0164
0165 <context name="FindDefine" attribute="Normal Text" lineEndContext="#stay">
0166 <WordDetect attribute="Keyword" String="define" context="resource definition"/>
0167 </context>
0168
0169 <context name="FindCollector" attribute="Normal Text" lineEndContext="#stay">
0170 <RegExpr String="(::)?(&CapWord;::)*&CapWord;\s*<\|" lookAhead="true" context="collector"/>
0171 </context>
0172
0173 <context name="FindExportedCollector" attribute="Normal Text" lineEndContext="#stay">
0174 <RegExpr String="(::)?(&CapWord;::)*&CapWord;\s*<<\|" lookAhead="true" context="exported collector"/>
0175 </context>
0176
0177 <context name="FindUnless" attribute="Normal Text" lineEndContext="#stay">
0178 <WordDetect attribute="Keyword" String="unless" context="unless"/>
0179 </context>
0180
0181 <context name="FindIf" attribute="Normal Text" lineEndContext="#stay">
0182 <WordDetect attribute="Keyword" String="if" context="if"/>
0183 </context>
0184
0185 <context name="FindCase" attribute="Normal Text" lineEndContext="#stay">
0186 <WordDetect attribute="Keyword" String="case" context="case"/>
0187 </context>
0188
0189 <context name="FindRegExp" attribute="Normal Text" lineEndContext="#pop">
0190 <RegExpr attribute="RegExp" String="/[^/]*[^\\/]/" context="#stay"/>
0191 </context>
0192 <!-- END Finders -->
0193
0194 <!-- BEGIN Strings -->
0195 <context name="string single" attribute="String" lineEndContext="#stay">
0196 <DetectChar attribute="String" char="'" context="#pop"/>
0197 </context>
0198
0199 <context name="string double" attribute="String" lineEndContext="#stay">
0200 <DetectChar attribute="Escape" char="\" context="escapes"/>
0201 <Detect2Chars char="$" char1="{" lookAhead="true" context="string code block"/>
0202 <RegExpr attribute="Variable" String="\$&BareWord;" context="#stay"/>
0203 <DetectChar attribute="String" char=""" context="#pop"/>
0204 </context>
0205
0206 <context name="string code block" attribute="Variable" fallthrough="true" fallthroughContext="#pop" lineEndContext="#stay">
0207 <Detect2Chars attribute="Variable" char="$" char1="{" context="#stay"/>
0208 <RegExpr attribute="Variable" String="&namespace;" context="#stay"/>
0209 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0210 <RegExpr attribute="Variable" String="&BareWord;" context="#stay"/>
0211 <DetectChar attribute="Variable" char="}" context="#pop"/>
0212 </context>
0213
0214 <context name="escapes" attribute="Escape" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop">
0215 <AnyChar attribute="Escape" String="$"'\nrts" context="#pop"/>
0216 </context>
0217 <!-- END Strings -->
0218
0219 <!-- BEGIN RegExp -->
0220 <context name="regexp operators" attribute="RegExp" lineEndContext="#pop">
0221 <DetectSpaces/>
0222 <RegExpr attribute="RegExp" String="/[^/]*[^\\/]/" context="#pop"/>
0223 </context>
0224 <!-- END RegExp -->
0225
0226 <!-- BEGIN Comments -->
0227 <context name="comment" attribute="Comment" lineEndContext="#pop">
0228 <DetectSpaces />
0229 <IncludeRules context="##Comments"/>
0230 </context>
0231
0232 <context name="multiline comment" attribute="Comment" lineEndContext="#stay">
0233 <DetectSpaces/>
0234 <Detect2Chars attribute="Comment" char="*" char1="/" endRegion="comment" context="#pop"/>
0235 <IncludeRules context="##Comments"/>
0236 </context>
0237
0238 <context name="region marker" attribute="Region Marker" lineEndContext="#pop">
0239 </context>
0240 <!-- END Comments -->
0241
0242 <!-- BEGIN Function -->
0243 <context name="statement" attribute="Normal Text" lineEndContext="#pop">
0244 <DetectSpaces/>
0245 <LineContinue attribute="Normal Text" char="," context="#stay"/>
0246 <IncludeRules context="parameter values"/>
0247 <DetectChar attribute="String" char="," context="#stay"/>
0248 </context>
0249
0250 <context name="function" attribute="Normal Text" lineEndContext="#stay">
0251 <DetectSpaces/>
0252 <RegExpr attribute="Function" String="&BareWord;" context="#stay"/>
0253 <DetectChar attribute="Normal Text" char="(" context="function_in"/>
0254 <DetectChar attribute="Normal Text" char=")" context="#pop"/>
0255 </context>
0256
0257 <context name="function_in" attribute="Normal Text" lineEndContext="#stay">
0258 <DetectSpaces/>
0259 <DetectChar char="," context="#stay"/>
0260 <IncludeRules context="parameter values"/>
0261 <DetectChar char=")" lookAhead="true" context="#pop"/>
0262 </context>
0263 <!-- END Function -->
0264
0265 <!-- BEGIN conditions -->
0266 <context name="unless" attribute="Normal Text" lineEndContext="#stay">
0267 <DetectSpaces/>
0268 <IncludeRules context="condition"/>
0269 <DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/>
0270 <DetectChar attribute="Normal Text" char="}" endRegion="code" context="#pop"/>
0271 </context>
0272
0273 <context name="if" attribute="Normal Text" lineEndContext="#stay">
0274 <DetectSpaces/>
0275 <IncludeRules context="condition"/>
0276 <DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/>
0277 <DetectChar attribute="Normal Text" char="}" endRegion="code" context="if continues?"/>
0278 </context>
0279
0280 <context name="if continues?" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#stay">
0281 <DetectSpaces/>
0282 <WordDetect attribute="Keyword" String="else" context="else"/>
0283 <WordDetect attribute="Keyword" String="elsif" context="elsif"/>
0284 </context>
0285
0286 <context name="elsif" attribute="Normal Text" lineEndContext="#stay">
0287 <DetectSpaces/>
0288 <IncludeRules context="condition"/>
0289 <DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/>
0290 <DetectChar attribute="Normal Text" char="}" endRegion="dode" context="#pop"/>
0291 </context>
0292
0293 <context name="else" attribute="Normal Text" lineEndContext="#stay">
0294 <DetectSpaces/>
0295 <DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/>
0296 <DetectChar attribute="Normal Text" char="}" endRegion="code" context="#pop#pop#pop"/>
0297 </context>
0298
0299 <context name="case" attribute="Normal Text" lineEndContext="#stay">
0300 <DetectSpaces/>
0301 <IncludeRules context="FindVariable"/>
0302 <DetectChar attribute="Normal Text" char="{" beginRegion="case" context="case block"/>
0303 <DetectChar attribute="Normal Text" char="}" endRegion="case" context="#pop"/>
0304 </context>
0305
0306 <context name="case block" attribute="Normal Text" lineEndContext="#stay">
0307 <DetectSpaces/>
0308 <DetectChar attribute="Normal Text" char="," context="#stay"/>
0309 <DetectChar attribute="Operator" char=":" context="case value"/>
0310 <Int attribute="Number" context="#stay" />
0311 <WordDetect attribute="Keyword" String="default" context="#stay"/>
0312 <IncludeRules context="FindString"/>
0313 <IncludeRules context="FindComment"/>
0314 <IncludeRules context="FindRegExp"/>
0315 <IncludeRules context="FindFunction"/>
0316 <IncludeRules context="FindBareWord"/>
0317 <DetectChar char="}" lookAhead="true" context="#pop"/>
0318 </context>
0319
0320 <context name="case value" attribute="Normal Text" lineEndContext="#stay">
0321 <DetectSpaces/>
0322 <DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/>
0323 <DetectChar attribute="Normal Text" char="}" endRegion="code" context="#pop"/>
0324 </context>
0325
0326 <context name="selector" attribute="Normal Text" lineEndContext="#stay">
0327 <DetectSpaces/>
0328 <DetectChar attribute="Normal Text" char="{" beginRegion="selector" context="selector block"/>
0329 <DetectChar attribute="Normal Text" char="}" endRegion="selector" context="#pop"/>
0330 </context>
0331
0332 <context name="selector block" attribute="Normal Text" lineEndContext="#stay">
0333 <DetectSpaces/>
0334 <Detect2Chars attribute="Operator" char="=" char1=">" context="selector value"/>
0335 <Int attribute="Number" context="#stay" />
0336 <WordDetect attribute="Keyword" String="default" context="#stay"/>
0337 <IncludeRules context="FindString"/>
0338 <IncludeRules context="FindComment"/>
0339 <IncludeRules context="FindRegExp"/>
0340 <IncludeRules context="FindFunction"/>
0341 <IncludeRules context="FindBareWord"/>
0342 <DetectChar char="}" lookAhead="true" context="#pop"/>
0343 </context>
0344
0345 <context name="selector value" attribute="Normal Text" lineEndContext="#pop">
0346 <IncludeRules context="parameter values"/>
0347 <DetectChar attribute="Normal Text" char="," context="#pop"/>
0348 <DetectChar char="}" lookAhead="true" context="#pop"/>
0349 </context>
0350
0351 <context name="code block" attribute="Normal Text" lineEndContext="#stay">
0352 <IncludeRules context="common"/>
0353 <DetectChar char="}" lookAhead="true" context="#pop"/>
0354 </context>
0355 <!-- END conditions -->
0356
0357 <context name="variable" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop">
0358 <DetectChar attribute="Variable" char="$" context="#stay"/>
0359 <RegExpr attribute="Variable" String="&namespace;" context="#stay"/>
0360 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0361 <RegExpr attribute="Variable" String="&BareWord;" context="#pop"/>
0362 </context>
0363
0364 <context name="array" attribute="Normal Text" lineEndContext="#stay">
0365 <IncludeRules context="list content"/>
0366 <DetectChar attribute="Normal Text" char="]" context="#pop"/>
0367 </context>
0368
0369 <!-- BEGIN Hash -->
0370 <context name="hash" attribute="Normal Text" lineEndContext="#stay">
0371 <DetectChar attribute="Normal Text" char="{" beginRegion="hash" context="hash list"/>
0372 <DetectChar attribute="Normal Text" char="}" endRegion="hash" context="#pop"/>
0373 </context>
0374
0375 <context name="hash list" attribute="Normal Text" lineEndContext="#stay">
0376 <Detect2Chars attribute="AttributeOp" char="=" char1=">" context="#stay"/>
0377 <DetectChar attribute="Normal Text" char="," context="#stay"/>
0378 <IncludeRules context="hash keys"/>
0379 <IncludeRules context="parameter values"/>
0380 <DetectChar char="}" lookAhead="true" context="#pop"/>
0381 </context>
0382 <!-- END Hash -->
0383
0384 <!-- BEGIN Node -->
0385 <context name="node def" attribute="Normal Text" lineEndContext="#stay">
0386 <!-- TODO: need a regular expresion here, order is random and seems that Class is not allowed in node(?) -->
0387 <DetectSpaces/>
0388 <IncludeRules context="FindString"/>
0389 <IncludeRules context="FindRegExp"/>
0390 <StringDetect attribute="Keyword" String="inherits" context="#stay"/>
0391 <StringDetect attribute="Keyword" String="default" context="#stay"/>
0392 <RegExpr attribute="Node" String="&namespace;" context="#stay"/>
0393 <DetectChar char="{" lookAhead="true" context="node in open"/>
0394 </context>
0395
0396 <context name="node in open" attribute="Normal Text" lineEndContext="#stay">
0397 <DetectChar attribute="Normal Text" char="{" beginRegion="node" context="node in"/>
0398 <DetectChar attribute="Normal Text" char="}" endRegion="node" context="#pop#pop"/>
0399 </context>
0400
0401 <context name="node in" attribute="Normal Text" lineEndContext="#stay">
0402 <IncludeRules context="common"/>
0403 <DetectChar char="}" lookAhead="true" context="#pop"/>
0404 </context>
0405 <!-- END Node -->
0406
0407 <!-- BEGIN Class -->
0408 <context name="class def" attribute="Normal Text" lineEndContext="#stay">
0409 <!-- TODO: be more strict here -->
0410 <DetectSpaces/>
0411 <StringDetect attribute="Keyword" String="inherits" context="#stay"/>
0412 <RegExpr attribute="Class" String="&namespace;" context="#stay"/>
0413 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0414 <DetectChar char="(" context="class params"/>
0415 <DetectChar attribute="Normal Text" char="{" beginRegion="class" context="class in"/>
0416 <DetectChar attribute="Normal Text" char="}" endRegion="class" context="#pop"/>
0417 </context>
0418
0419 <context name="class params" attribute="Normal Text" lineEndContext="#stay">
0420 <!-- TODO: be more strict here -->
0421 <DetectSpaces/>
0422 <AnyChar String="=," context="#stay"/>
0423 <IncludeRules context="FindVariable"/>
0424 <IncludeRules context="parameter values"/>
0425 <DetectChar char=")" context="#pop"/>
0426 </context>
0427
0428 <context name="class in" attribute="Normal Text" lineEndContext="#stay">
0429 <IncludeRules context="common"/>
0430 <DetectChar char="}" lookAhead="true" context="#pop"/>
0431 </context>
0432 <!-- END Class -->
0433
0434 <!-- BEGIN Resource -->
0435 <context name="resource" attribute="Normal Text" lineEndContext="#stay">
0436 <DetectSpaces/>
0437 <DetectChar attribute="Resource" char="@" context="#stay"/>
0438 <RegExpr attribute="Resource" String="&BareWord;" context="#stay"/>
0439 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0440 <DetectChar attribute="Normal Text" char="{" beginRegion="resource" context="resource_in"/>
0441 <DetectChar attribute="Normal Text" char="}" endRegion="resource" context="#pop"/>
0442 </context>
0443
0444 <context name="resource_in" attribute="Normal Text" lineEndContext="#stay">
0445 <DetectSpaces/>
0446 <IncludeRules context="FindString"/>
0447 <IncludeRules context="FindVariable"/>
0448 <IncludeRules context="FindComment"/>
0449 <IncludeRules context="FindArray"/>
0450 <IncludeRules context="FindBareWord"/>
0451 <DetectChar attribute="Operator" char=":" context="resource_attrs"/>
0452 <DetectChar char="}" lookAhead="true" context="#pop"/>
0453 </context>
0454
0455 <context name="resource_attrs" attribute="Normal Text" lineEndContext="#stay">
0456 <DetectSpaces/>
0457 <RegExpr attribute="Attribute Name" String="&BareWord;" context="resource_attr"/>
0458 <IncludeRules context="FindComment"/>
0459 <DetectChar char="}" lookAhead="true" context="#pop"/>
0460 </context>
0461
0462 <context name="resource_attr" attribute="Normal Text" lineEndContext="#stay">
0463 <DetectSpaces/>
0464 <IncludeRules context="FindComment"/>
0465 <Detect2Chars attribute="AttributeOp" char="=" char1=">" context="resource_attr_val"/>
0466 <DetectChar char="}" lookAhead="true" context="#pop"/>
0467 </context>
0468
0469 <context name="resource_attr_val" attribute="Normal Text" lineEndContext="#stay">
0470 <IncludeRules context="parameter values"/>
0471 <DetectChar attribute="Normal Text" char="," context="#pop#pop"/>
0472 <DetectChar attribute="Normal Text" char=";" context="#pop#pop#pop"/>
0473 <DetectChar char="}" lookAhead="true" context="#pop"/>
0474 </context>
0475 <!-- END Resource -->
0476
0477 <!-- BEGIN Resource Reference -->
0478 <context name="res_ref" attribute="Normal Text" lineEndContext="#stay">
0479 <DetectSpaces/>
0480 <RegExpr attribute="ResourceReference" String="&CapWord;" context="#stay"/>
0481 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0482 <DetectChar attribute="Normal Text" char="[" context="res_ref_titles"/>
0483 </context>
0484
0485 <context name="res_ref_titles" attribute="Normal Text" lineEndContext="#stay">
0486 <IncludeRules context="list content"/>
0487 <DetectChar attribute="Normal Text" char="]" context="res_ref_params_opt"/>
0488 </context>
0489
0490 <context name="res_ref_params_opt" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop#pop" lineEndContext="#stay">
0491 <DetectSpaces/>
0492 <DetectChar attribute="Normal Text" char="{" beginRegion="res ref" context="res_ref_params"/>
0493 </context>
0494
0495 <context name="res_ref_params" attribute="Normal Text" lineEndContext="#stay">
0496 <DetectSpaces/>
0497 <RegExpr attribute="Attribute Name" String="&BareWord;" context="res_ref_param"/>
0498 <IncludeRules context="FindComment"/>
0499 <DetectChar attribute="Normal Text" char="}" endRegion="res ref" context="#pop#pop#pop#pop"/>
0500 </context>
0501
0502 <context name="res_ref_param" attribute="Normal Text" lineEndContext="#stay">
0503 <DetectSpaces/>
0504 <IncludeRules context="FindComment"/>
0505 <Detect2Chars attribute="AttributeOp" char="=" char1=">" context="res_ref_param_val"/>
0506 <Detect2Chars attribute="AttributeOp" char="+" char1=">" context="res_ref_param_val"/>
0507 <DetectChar char="}" lookAhead="true" context="#pop"/>
0508 </context>
0509
0510 <context name="res_ref_param_val" attribute="Normal Text" lineEndContext="#stay">
0511 <IncludeRules context="parameter values"/>
0512 <DetectChar attribute="Normal Text" char="," context="#pop#pop"/>
0513 <DetectChar char="}" lookAhead="true" context="#pop"/>
0514 </context>
0515 <!-- END Resource Reference -->
0516
0517 <!-- BEGIN Resource Defaults -->
0518 <context name="res_defaults" attribute="Normal Text" lineEndContext="#stay">
0519 <DetectSpaces/>
0520 <RegExpr attribute="ResourceReference" String="&CapWord;" context="#stay"/>
0521 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0522 <DetectChar attribute="Normal Text" char="{" beginRegion="res defs" context="res_defaults_params"/>
0523 <DetectChar attribute="Normal Text" char="}" endRegion="res defs" context="#pop"/>
0524 </context>
0525
0526 <context name="res_defaults_params" attribute="Normal Text" lineEndContext="#stay">
0527 <DetectSpaces/>
0528 <IncludeRules context="FindComment"/>
0529 <RegExpr attribute="Attribute Name" String="&BareWord;" context="res_defaults_param"/>
0530 <DetectChar char="}" lookAhead="true" context="#pop"/>
0531 </context>
0532
0533 <context name="res_defaults_param" attribute="Normal Text" lineEndContext="#stay">
0534 <DetectSpaces/>
0535 <IncludeRules context="FindComment"/>
0536 <Detect2Chars attribute="AttributeOp" char="=" char1=">" context="res_defaults_param_val"/>
0537 <DetectChar char="}" lookAhead="true" context="#pop"/>
0538 </context>
0539
0540 <context name="res_defaults_param_val" attribute="Normal Text" lineEndContext="#stay">
0541 <IncludeRules context="parameter values"/>
0542 <DetectChar attribute="Normal Text" char="," context="#pop#pop"/>
0543 <DetectChar char="}" lookAhead="true" context="#pop"/>
0544 </context>
0545 <!-- END Resource Defaults -->
0546
0547 <!-- BEGIN Collector -->
0548 <context name="collector" attribute="Normal Text" lineEndContext="#stay">
0549 <DetectSpaces/>
0550 <RegExpr attribute="Collector" String="&CapWord;" context="#stay"/>
0551 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0552 <Detect2Chars attribute="Normal Text" char="<" char1="|" context="collector in"/>
0553 <Detect2Chars attribute="Normal Text" char="|" char1=">" context="#pop"/>
0554 </context>
0555
0556 <context name="collector in" attribute="Normal Text" lineEndContext="#stay">
0557 <IncludeRules context="collector content"/>
0558 <Detect2Chars char="|" char1=">" lookAhead="true" context="#pop"/>
0559 </context>
0560 <!-- END Collector -->
0561
0562 <!-- BEGIN Exported Collector -->
0563 <context name="exported collector" attribute="Normal Text" lineEndContext="#stay">
0564 <DetectSpaces/>
0565 <RegExpr attribute="Collector" String="&CapWord;" context="#stay"/>
0566 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0567 <StringDetect attribute="Normal Text" String="<<|" context="exported collector in"/>
0568 <StringDetect attribute="Normal Text" String="|>>" context="#pop"/>
0569 </context>
0570
0571 <context name="exported collector in" attribute="Normal Text" lineEndContext="#stay">
0572 <IncludeRules context="collector content"/>
0573 <StringDetect String="|>>" lookAhead="true" context="#pop"/>
0574 </context>
0575 <!-- END Exported Collector -->
0576
0577 <context name="resource path" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop">
0578 <DetectSpaces/>
0579 <RegExpr attribute="Resource" String="&BareWord;" context="#stay"/>
0580 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0581 </context>
0582
0583 <!-- BEGIN define -->
0584 <context name="resource definition" attribute="Normal Text" lineEndContext="#stay">
0585 <!-- TODO: be more strict here -->
0586 <DetectSpaces/>
0587 <StringDetect attribute="Keyword" String="inherits" context="#stay"/>
0588 <RegExpr attribute="Class" String="&namespace;" context="#stay"/>
0589 <Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/>
0590 <DetectChar char="(" context="define params"/>
0591 <DetectChar attribute="Normal Text" char="{" beginRegion="define" context="define in"/>
0592 <DetectChar attribute="Normal Text" char="}" endRegion="define" context="#pop"/>
0593 </context>
0594
0595 <context name="define params" attribute="Normal Text" lineEndContext="#stay">
0596 <DetectSpaces/>
0597 <AnyChar String="=," context="#stay"/>
0598 <IncludeRules context="FindVariable"/>
0599 <IncludeRules context="parameter values"/>
0600 <DetectChar char=")" context="#pop"/>
0601 </context>
0602
0603 <context name="define in" attribute="Normal Text" lineEndContext="#stay">
0604 <IncludeRules context="common"/>
0605 <DetectChar char="}" lookAhead="true" context="#pop"/>
0606 </context>
0607 <!-- END define -->
0608
0609 <!-- BEGIN Contents -->
0610 <context name="list content" attribute="Normal Text" lineEndContext="#stay">
0611 <DetectSpaces/>
0612 <IncludeRules context="FindString"/>
0613 <IncludeRules context="FindVariable"/>
0614 <IncludeRules context="FindOperator"/>
0615 <Int attribute="Number" context="#stay"/>
0616 <IncludeRules context="FindResourceReference"/>
0617 <IncludeRules context="FindFunction"/>
0618 <IncludeRules context="FindBareWord"/>
0619 <DetectChar char="," context="#stay"/>
0620 </context>
0621
0622 <context name="parameter values" attribute="Normal Text" lineEndContext="#stay">
0623 <DetectSpaces/>
0624 <IncludeRules context="FindString"/>
0625 <IncludeRules context="FindComment"/>
0626 <IncludeRules context="FindOperator"/>
0627 <keyword attribute="Keyword" String="keywords" context="#stay"/>
0628 <Int attribute="Number" context="#stay"/>
0629 <IncludeRules context="FindVariable"/>
0630 <IncludeRules context="FindResourceReference"/>
0631 <IncludeRules context="FindArray"/>
0632 <IncludeRules context="FindFunction"/>
0633 <IncludeRules context="FindResourcePath"/>
0634 <IncludeRules context="FindBareWord"/>
0635 </context>
0636
0637 <context name="hash keys" attribute="Normal Text" lineEndContext="#stay">
0638 <DetectSpaces/>
0639 <IncludeRules context="FindString"/>
0640 <IncludeRules context="FindComment"/>
0641 <Int attribute="Number" context="#stay"/>
0642 <IncludeRules context="FindBareWord"/>
0643 </context>
0644
0645 <context name="collector content" attribute="Normal Text" lineEndContext="#stay">
0646 <DetectSpaces/>
0647 <keyword attribute="Operator" String="collector operators" context="#stay"/>
0648 <Detect2Chars attribute="Operator" char="=" char1="=" context="#stay"/>
0649 <Detect2Chars attribute="Operator" char="!" char1="=" context="#stay"/>
0650 <IncludeRules context="FindString"/>
0651 <Int attribute="Number" context="#stay"/>
0652 <IncludeRules context="FindComment"/>
0653 <IncludeRules context="FindBareWord"/>
0654 </context>
0655
0656 <context name="condition" attribute="Normal Text" lineEndContext="#stay">
0657 <IncludeRules context="FindComment"/>
0658 <IncludeRules context="FindString"/>
0659 <IncludeRules context="FindOperator"/>
0660 <Int attribute="Number" context="#stay" />
0661 <keyword attribute="Keyword" String="keywords" context="#stay"/>
0662 <IncludeRules context="FindVariable"/>
0663 <IncludeRules context="FindResourceReference"/>
0664 <IncludeRules context="FindArray"/>
0665 <IncludeRules context="FindFunction"/>
0666 <IncludeRules context="FindBareWord"/>
0667 </context>
0668
0669 <!-- END Contents -->
0670 </contexts>
0671 <itemDatas>
0672 <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
0673 <itemData name="Comment" defStyleNum="dsComment"/>
0674 <itemData name="String" defStyleNum="dsString"/>
0675 <itemData name="Escape" defStyleNum="dsFloat"/>
0676 <itemData name="RegExp" defStyleNum="dsOthers" />
0677 <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
0678 <itemData name="Variable" defStyleNum="dsChar" spellChecking="false"/>
0679 <itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/>
0680 <itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/>
0681 <itemData name="Operator" defStyleNum="dsOthers" spellChecking="false"/>
0682
0683 <itemData name="Attribute Name" defStyleNum="dsKeyword" italic="true" bold="false" spellChecking="false"/>
0684 <itemData name="AttributeOp" defStyleNum="dsOthers" spellChecking="false"/>
0685
0686 <itemData name="Node" defStyleNum="dsDataType" spellChecking="false"/>
0687 <itemData name="Class" defStyleNum="dsOthers" spellChecking="false"/>
0688 <itemData name="Resource" defStyleNum="dsDataType" spellChecking="false"/>
0689 <itemData name="ResourceReference" defStyleNum="dsOthers" spellChecking="false"/>
0690 <itemData name="Collector" defStyleNum="dsOthers" spellChecking="false"/>
0691 <itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/>
0692 </itemDatas>
0693 </highlighting>
0694 <general>
0695 <comments>
0696 <comment name="singleLine" start="#"/>
0697 <comment name="multiLine" start="/*" end="*/" region="comment"/>
0698 </comments>
0699 <keywords casesensitive="1" />
0700 </general>
0701 </language>
0702 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->