| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language |
| 3 |
[ |
| 4 |
<!ENTITY BareWord "[a-z][a-zA-Z0-9-_]*"> |
| 5 |
<!ENTITY CapWord "[A-Z][a-zA-Z0-9-_]*"> |
| 6 |
<!ENTITY namespace "[a-z][a-z0-9_]*"> |
| 7 |
]> |
| 8 |
|
| 9 |
<!-- |
| 10 |
Puppet syntax highlighting file: |
| 11 |
|
| 12 |
Copyright (C) 2014 by Michal Humpula ([email protected]) |
| 13 |
|
| 14 |
This library is free software; you can redistribute it and/or |
| 15 |
modify it under the terms of the GNU Library General Public |
| 16 |
License as published by the Free Software Foundation; either |
| 17 |
version 2 of the License, or (at your option) any later version. |
| 18 |
|
| 19 |
This library is distributed in the hope that it will be useful, |
| 20 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 |
Library General Public License for more details. |
| 23 |
|
| 24 |
You should have received a copy of the GNU Library General Public |
| 25 |
License along with this library; if not, write to the |
| 26 |
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 27 |
Boston, MA 02110-1301, USA. |
| 28 |
--> |
| 29 |
|
| 30 |
<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 ([email protected])" license="LGPLv2+"> |
| 31 |
<highlighting> |
| 32 |
<list name="keywords"> |
| 33 |
<item>import</item> |
| 34 |
<item>false</item> |
| 35 |
<item>true</item> |
| 36 |
<item>undef</item> |
| 37 |
</list> |
| 38 |
|
| 39 |
<list name="operators"> |
| 40 |
<item>in</item> |
| 41 |
<item>and</item> |
| 42 |
<item>or</item> |
| 43 |
</list> |
| 44 |
|
| 45 |
<list name="collector operators"> |
| 46 |
<item>and</item> |
| 47 |
<item>or</item> |
| 48 |
</list> |
| 49 |
|
| 50 |
<contexts> |
| 51 |
<context name="Start" attribute="Normal Text" lineEndContext="#stay"> |
| 52 |
<IncludeRules context="common" /> |
| 53 |
</context> |
| 54 |
|
| 55 |
<context name="common" attribute="Normal Text" lineEndContext="#stay"> |
| 56 |
<DetectSpaces/> |
| 57 |
<IncludeRules context="FindComment"/> |
| 58 |
<IncludeRules context="FindString"/> |
| 59 |
<IncludeRules context="FindOperator"/> |
| 60 |
<Int attribute="Number" context="#stay" /> |
| 61 |
<IncludeRules context="FindUnless"/> |
| 62 |
<IncludeRules context="FindIf"/> |
| 63 |
<IncludeRules context="FindCase"/> |
| 64 |
<keyword attribute="Keyword" String="keywords" context="#stay"/> |
| 65 |
<IncludeRules context="FindVariable"/> |
| 66 |
|
| 67 |
<IncludeRules context="FindClass"/> |
| 68 |
<IncludeRules context="FindNode"/> |
| 69 |
|
| 70 |
<IncludeRules context="FindCollector"/> |
| 71 |
<IncludeRules context="FindExportedCollector"/> |
| 72 |
|
| 73 |
<IncludeRules context="FindResource"/> |
| 74 |
<IncludeRules context="FindResourceReference"/> |
| 75 |
<IncludeRules context="FindResourceDefaults"/> |
| 76 |
<IncludeRules context="FindDefine"/> |
| 77 |
|
| 78 |
<IncludeRules context="FindArray"/> |
| 79 |
<IncludeRules context="FindHash"/> |
| 80 |
|
| 81 |
<IncludeRules context="FindFunction"/> |
| 82 |
<IncludeRules context="FindStatement"/> |
| 83 |
|
| 84 |
<IncludeRules context="FindBareWord"/> |
| 85 |
</context> |
| 86 |
|
| 87 |
<!-- BEGIN Finders --> |
| 88 |
<context name="FindString" attribute="Normal Text" lineEndContext="#stay"> |
| 89 |
<DetectChar attribute="String" char="'" context="string single"/> |
| 90 |
<DetectChar attribute="String" char=""" context="string double"/> |
| 91 |
</context> |
| 92 |
|
| 93 |
<context name="FindComment" attribute="Comment" lineEndContext="#stay"> |
| 94 |
<StringDetect attribute="Region Marker" String="#BEGIN" beginRegion="region marker" firstNonSpace="true" context="region marker"/> |
| 95 |
<StringDetect attribute="Region Marker" String="#END" endRegion="region marker" firstNonSpace="true" context="region marker"/> |
| 96 |
<DetectChar attribute="Comment" char="#" context="comment"/> |
| 97 |
<Detect2Chars attribute="Comment" char="/" char1="*" beginRegion="comment" context="multiline comment"/> |
| 98 |
</context> |
| 99 |
|
| 100 |
<context name="FindVariable" attribute="Variable" lineEndContext="#pop"> |
| 101 |
<RegExpr String="\$(::)?(&namespace;::)*[a-z]" lookAhead="true" context="variable"/> |
| 102 |
</context> |
| 103 |
|
| 104 |
<context name="FindStatement" attribute="Normal Text" lineEndContext="#pop"> |
| 105 |
<RegExpr attribute="Function" String="&BareWord;" context="statement" firstNonSpace="true"/> |
| 106 |
</context> |
| 107 |
|
| 108 |
<context name="FindFunction" attribute="Normal Text" lineEndContext="#pop"> |
| 109 |
<RegExpr String="&BareWord;\s*\(" lookAhead="true" context="function"/> |
| 110 |
</context> |
| 111 |
|
| 112 |
<context name="FindResource" attribute="Normal Text" lineEndContext="#pop"> |
| 113 |
<RegExpr String="@?@?(::)?(&BareWord;::)*&BareWord;\s*\{" lookAhead="true" context="resource"/> |
| 114 |
</context> |
| 115 |
|
| 116 |
<context name="FindResourceReference" attribute="Normal Text" lineEndContext="#pop"> |
| 117 |
<RegExpr String="(::)?(&CapWord;::)*&CapWord;\s*\[" lookAhead="true" context="res_ref"/> |
| 118 |
</context> |
| 119 |
|
| 120 |
<context name="FindResourceDefaults" attribute="Normal Text" lineEndContext="#pop"> |
| 121 |
<RegExpr String="(::)?(&CapWord;::)*&CapWord;\s*\{" lookAhead="true" context="res_defaults"/> |
| 122 |
</context> |
| 123 |
|
| 124 |
<context name="FindOperator" attribute="Operator" lineEndContext="#pop" > |
| 125 |
<keyword attribute="Operator" String="operators" context="#stay"/> |
| 126 |
<Detect2Chars attribute="Operator" char="!" char1="=" context="#stay"/> |
| 127 |
<Detect2Chars attribute="Operator" char="+" char1="=" context="#stay"/> |
| 128 |
<Detect2Chars attribute="Operator" char="<" char1="<" context="#stay"/> |
| 129 |
<Detect2Chars attribute="Operator" char=">" char1=">" context="#stay"/> |
| 130 |
<Detect2Chars attribute="Operator" char="=" char1="=" context="#stay"/> |
| 131 |
<Detect2Chars attribute="Operator" char=">" char1="=" context="#stay"/> |
| 132 |
<Detect2Chars attribute="Operator" char="<" char1="=" context="#stay"/> |
| 133 |
<Detect2Chars attribute="Operator" char="=" char1="~" context="regexp operators"/> |
| 134 |
<Detect2Chars attribute="Operator" char="!" char1="~" context="regexp operators"/> |
| 135 |
<Detect2Chars attribute="Operator" char="-" char1=">" context="#stay"/> |
| 136 |
<Detect2Chars attribute="Operator" char="~" char1=">" context="#stay"/> |
| 137 |
<AnyChar attribute="Operator" String="!*/-+><" context="#stay"/> |
| 138 |
<DetectChar attribute="Operator" char="?" context="selector"/> |
| 139 |
</context> |
| 140 |
|
| 141 |
<context name="FindResourcePath" attribute="Normal Text" lineEndContext="#pop"> |
| 142 |
<RegExpr String="(&BareWord;)?::[a-z]" lookAhead="true" context="resource path"/> |
| 143 |
</context> |
| 144 |
|
| 145 |
<context name="FindBareWord" attribute="Normal Text" lineEndContext="#pop"> |
| 146 |
<RegExpr attribute="String" String="&BareWord;" context="#stay"/> |
| 147 |
</context> |
| 148 |
|
| 149 |
<context name="FindArray" attribute="Normal Text" lineEndContext="#stay"> |
| 150 |
<DetectChar char="[" context="array"/> |
| 151 |
</context> |
| 152 |
|
| 153 |
<context name="FindHash" attribute="Normal Text" lineEndContext="#stay"> |
| 154 |
<DetectChar char="{" lookAhead="true" context="hash"/> |
| 155 |
</context> |
| 156 |
|
| 157 |
<context name="FindClass" attribute="Normal Text" lineEndContext="#stay"> |
| 158 |
<WordDetect attribute="Keyword" String="class" context="class def"/> |
| 159 |
</context> |
| 160 |
|
| 161 |
<context name="FindNode" attribute="Normal Text" lineEndContext="#stay"> |
| 162 |
<WordDetect attribute="Keyword" String="node" context="node def"/> |
| 163 |
</context> |
| 164 |
|
| 165 |
<context name="FindDefine" attribute="Normal Text" lineEndContext="#stay"> |
| 166 |
<WordDetect attribute="Keyword" String="define" context="resource definition"/> |
| 167 |
</context> |
| 168 |
|
| 169 |
<context name="FindCollector" attribute="Normal Text" lineEndContext="#stay"> |
| 170 |
<RegExpr String="(::)?(&CapWord;::)*&CapWord;\s*<\|" lookAhead="true" context="collector"/> |
| 171 |
</context> |
| 172 |
|
| 173 |
<context name="FindExportedCollector" attribute="Normal Text" lineEndContext="#stay"> |
| 174 |
<RegExpr String="(::)?(&CapWord;::)*&CapWord;\s*<<\|" lookAhead="true" context="exported collector"/> |
| 175 |
</context> |
| 176 |
|
| 177 |
<context name="FindUnless" attribute="Normal Text" lineEndContext="#stay"> |
| 178 |
<WordDetect attribute="Keyword" String="unless" context="unless"/> |
| 179 |
</context> |
| 180 |
|
| 181 |
<context name="FindIf" attribute="Normal Text" lineEndContext="#stay"> |
| 182 |
<WordDetect attribute="Keyword" String="if" context="if"/> |
| 183 |
</context> |
| 184 |
|
| 185 |
<context name="FindCase" attribute="Normal Text" lineEndContext="#stay"> |
| 186 |
<WordDetect attribute="Keyword" String="case" context="case"/> |
| 187 |
</context> |
| 188 |
|
| 189 |
<context name="FindRegExp" attribute="Normal Text" lineEndContext="#pop"> |
| 190 |
<RegExpr attribute="RegExp" String="/[^/]*[^\\/]/" context="#stay"/> |
| 191 |
</context> |
| 192 |
<!-- END Finders --> |
| 193 |
|
| 194 |
<!-- BEGIN Strings --> |
| 195 |
<context name="string single" attribute="String" lineEndContext="#stay"> |
| 196 |
<DetectChar attribute="String" char="'" context="#pop"/> |
| 197 |
</context> |
| 198 |
|
| 199 |
<context name="string double" attribute="String" lineEndContext="#stay"> |
| 200 |
<DetectChar attribute="Escape" char="\" context="escapes"/> |
| 201 |
<Detect2Chars char="$" char1="{" lookAhead="true" context="string code block"/> |
| 202 |
<RegExpr attribute="Variable" String="\$&BareWord;" context="#stay"/> |
| 203 |
<DetectChar attribute="String" char=""" context="#pop"/> |
| 204 |
</context> |
| 205 |
|
| 206 |
<context name="string code block" attribute="Variable" fallthrough="true" fallthroughContext="#pop" lineEndContext="#stay"> |
| 207 |
<Detect2Chars attribute="Variable" char="$" char1="{" context="#stay"/> |
| 208 |
<RegExpr attribute="Variable" String="&namespace;" context="#stay"/> |
| 209 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 210 |
<RegExpr attribute="Variable" String="&BareWord;" context="#stay"/> |
| 211 |
<DetectChar attribute="Variable" char="}" context="#pop"/> |
| 212 |
</context> |
| 213 |
|
| 214 |
<context name="escapes" attribute="Escape" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop"> |
| 215 |
<AnyChar attribute="Escape" String="$"'\nrts" context="#pop"/> |
| 216 |
</context> |
| 217 |
<!-- END Strings --> |
| 218 |
|
| 219 |
<!-- BEGIN RegExp --> |
| 220 |
<context name="regexp operators" attribute="RegExp" lineEndContext="#pop"> |
| 221 |
<DetectSpaces/> |
| 222 |
<RegExpr attribute="RegExp" String="/[^/]*[^\\/]/" context="#pop"/> |
| 223 |
</context> |
| 224 |
<!-- END RegExp --> |
| 225 |
|
| 226 |
<!-- BEGIN Comments --> |
| 227 |
<context name="comment" attribute="Comment" lineEndContext="#pop"> |
| 228 |
<DetectSpaces /> |
| 229 |
<IncludeRules context="##Comments"/> |
| 230 |
</context> |
| 231 |
|
| 232 |
<context name="multiline comment" attribute="Comment" lineEndContext="#stay"> |
| 233 |
<DetectSpaces/> |
| 234 |
<Detect2Chars attribute="Comment" char="*" char1="/" endRegion="comment" context="#pop"/> |
| 235 |
<IncludeRules context="##Comments"/> |
| 236 |
</context> |
| 237 |
|
| 238 |
<context name="region marker" attribute="Region Marker" lineEndContext="#pop"> |
| 239 |
</context> |
| 240 |
<!-- END Comments --> |
| 241 |
|
| 242 |
<!-- BEGIN Function --> |
| 243 |
<context name="statement" attribute="Normal Text" lineEndContext="#pop"> |
| 244 |
<DetectSpaces/> |
| 245 |
<LineContinue attribute="Normal Text" char="," context="#stay"/> |
| 246 |
<IncludeRules context="parameter values"/> |
| 247 |
<DetectChar attribute="String" char="," context="#stay"/> |
| 248 |
</context> |
| 249 |
|
| 250 |
<context name="function" attribute="Normal Text" lineEndContext="#stay"> |
| 251 |
<DetectSpaces/> |
| 252 |
<RegExpr attribute="Function" String="&BareWord;" context="#stay"/> |
| 253 |
<DetectChar attribute="Normal Text" char="(" context="function_in"/> |
| 254 |
<DetectChar attribute="Normal Text" char=")" context="#pop"/> |
| 255 |
</context> |
| 256 |
|
| 257 |
<context name="function_in" attribute="Normal Text" lineEndContext="#stay"> |
| 258 |
<DetectSpaces/> |
| 259 |
<DetectChar char="," context="#stay"/> |
| 260 |
<IncludeRules context="parameter values"/> |
| 261 |
<DetectChar char=")" lookAhead="true" context="#pop"/> |
| 262 |
</context> |
| 263 |
<!-- END Function --> |
| 264 |
|
| 265 |
<!-- BEGIN conditions --> |
| 266 |
<context name="unless" attribute="Normal Text" lineEndContext="#stay"> |
| 267 |
<DetectSpaces/> |
| 268 |
<IncludeRules context="condition"/> |
| 269 |
<DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/> |
| 270 |
<DetectChar attribute="Normal Text" char="}" endRegion="code" context="#pop"/> |
| 271 |
</context> |
| 272 |
|
| 273 |
<context name="if" attribute="Normal Text" lineEndContext="#stay"> |
| 274 |
<DetectSpaces/> |
| 275 |
<IncludeRules context="condition"/> |
| 276 |
<DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/> |
| 277 |
<DetectChar attribute="Normal Text" char="}" endRegion="code" context="if continues?"/> |
| 278 |
</context> |
| 279 |
|
| 280 |
<context name="if continues?" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#stay"> |
| 281 |
<DetectSpaces/> |
| 282 |
<WordDetect attribute="Keyword" String="else" context="else"/> |
| 283 |
<WordDetect attribute="Keyword" String="elsif" context="elsif"/> |
| 284 |
</context> |
| 285 |
|
| 286 |
<context name="elsif" attribute="Normal Text" lineEndContext="#stay"> |
| 287 |
<DetectSpaces/> |
| 288 |
<IncludeRules context="condition"/> |
| 289 |
<DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/> |
| 290 |
<DetectChar attribute="Normal Text" char="}" endRegion="dode" context="#pop"/> |
| 291 |
</context> |
| 292 |
|
| 293 |
<context name="else" attribute="Normal Text" lineEndContext="#stay"> |
| 294 |
<DetectSpaces/> |
| 295 |
<DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/> |
| 296 |
<DetectChar attribute="Normal Text" char="}" endRegion="code" context="#pop#pop#pop"/> |
| 297 |
</context> |
| 298 |
|
| 299 |
<context name="case" attribute="Normal Text" lineEndContext="#stay"> |
| 300 |
<DetectSpaces/> |
| 301 |
<IncludeRules context="FindVariable"/> |
| 302 |
<DetectChar attribute="Normal Text" char="{" beginRegion="case" context="case block"/> |
| 303 |
<DetectChar attribute="Normal Text" char="}" endRegion="case" context="#pop"/> |
| 304 |
</context> |
| 305 |
|
| 306 |
<context name="case block" attribute="Normal Text" lineEndContext="#stay"> |
| 307 |
<DetectSpaces/> |
| 308 |
<DetectChar attribute="Normal Text" char="," context="#stay"/> |
| 309 |
<DetectChar attribute="Operator" char=":" context="case value"/> |
| 310 |
<Int attribute="Number" context="#stay" /> |
| 311 |
<WordDetect attribute="Keyword" String="default" context="#stay"/> |
| 312 |
<IncludeRules context="FindString"/> |
| 313 |
<IncludeRules context="FindComment"/> |
| 314 |
<IncludeRules context="FindRegExp"/> |
| 315 |
<IncludeRules context="FindFunction"/> |
| 316 |
<IncludeRules context="FindBareWord"/> |
| 317 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 318 |
</context> |
| 319 |
|
| 320 |
<context name="case value" attribute="Normal Text" lineEndContext="#stay"> |
| 321 |
<DetectSpaces/> |
| 322 |
<DetectChar attribute="Normal Text" char="{" beginRegion="code" context="code block"/> |
| 323 |
<DetectChar attribute="Normal Text" char="}" endRegion="code" context="#pop"/> |
| 324 |
</context> |
| 325 |
|
| 326 |
<context name="selector" attribute="Normal Text" lineEndContext="#stay"> |
| 327 |
<DetectSpaces/> |
| 328 |
<DetectChar attribute="Normal Text" char="{" beginRegion="selector" context="selector block"/> |
| 329 |
<DetectChar attribute="Normal Text" char="}" endRegion="selector" context="#pop"/> |
| 330 |
</context> |
| 331 |
|
| 332 |
<context name="selector block" attribute="Normal Text" lineEndContext="#stay"> |
| 333 |
<DetectSpaces/> |
| 334 |
<Detect2Chars attribute="Operator" char="=" char1=">" context="selector value"/> |
| 335 |
<Int attribute="Number" context="#stay" /> |
| 336 |
<WordDetect attribute="Keyword" String="default" context="#stay"/> |
| 337 |
<IncludeRules context="FindString"/> |
| 338 |
<IncludeRules context="FindComment"/> |
| 339 |
<IncludeRules context="FindRegExp"/> |
| 340 |
<IncludeRules context="FindFunction"/> |
| 341 |
<IncludeRules context="FindBareWord"/> |
| 342 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 343 |
</context> |
| 344 |
|
| 345 |
<context name="selector value" attribute="Normal Text" lineEndContext="#pop"> |
| 346 |
<IncludeRules context="parameter values"/> |
| 347 |
<DetectChar attribute="Normal Text" char="," context="#pop"/> |
| 348 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 349 |
</context> |
| 350 |
|
| 351 |
<context name="code block" attribute="Normal Text" lineEndContext="#stay"> |
| 352 |
<IncludeRules context="common"/> |
| 353 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 354 |
</context> |
| 355 |
<!-- END conditions --> |
| 356 |
|
| 357 |
<context name="variable" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop"> |
| 358 |
<DetectChar attribute="Variable" char="$" context="#stay"/> |
| 359 |
<RegExpr attribute="Variable" String="&namespace;" context="#stay"/> |
| 360 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 361 |
<RegExpr attribute="Variable" String="&BareWord;" context="#pop"/> |
| 362 |
</context> |
| 363 |
|
| 364 |
<context name="array" attribute="Normal Text" lineEndContext="#stay"> |
| 365 |
<IncludeRules context="list content"/> |
| 366 |
<DetectChar attribute="Normal Text" char="]" context="#pop"/> |
| 367 |
</context> |
| 368 |
|
| 369 |
<!-- BEGIN Hash --> |
| 370 |
<context name="hash" attribute="Normal Text" lineEndContext="#stay"> |
| 371 |
<DetectChar attribute="Normal Text" char="{" beginRegion="hash" context="hash list"/> |
| 372 |
<DetectChar attribute="Normal Text" char="}" endRegion="hash" context="#pop"/> |
| 373 |
</context> |
| 374 |
|
| 375 |
<context name="hash list" attribute="Normal Text" lineEndContext="#stay"> |
| 376 |
<Detect2Chars attribute="AttributeOp" char="=" char1=">" context="#stay"/> |
| 377 |
<DetectChar attribute="Normal Text" char="," context="#stay"/> |
| 378 |
<IncludeRules context="hash keys"/> |
| 379 |
<IncludeRules context="parameter values"/> |
| 380 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 381 |
</context> |
| 382 |
<!-- END Hash --> |
| 383 |
|
| 384 |
<!-- BEGIN Node --> |
| 385 |
<context name="node def" attribute="Normal Text" lineEndContext="#stay"> |
| 386 |
<!-- TODO: need a regular expresion here, order is random and seems that Class is not allowed in node(?) --> |
| 387 |
<DetectSpaces/> |
| 388 |
<IncludeRules context="FindString"/> |
| 389 |
<IncludeRules context="FindRegExp"/> |
| 390 |
<StringDetect attribute="Keyword" String="inherits" context="#stay"/> |
| 391 |
<StringDetect attribute="Keyword" String="default" context="#stay"/> |
| 392 |
<RegExpr attribute="Node" String="&namespace;" context="#stay"/> |
| 393 |
<DetectChar char="{" lookAhead="true" context="node in open"/> |
| 394 |
</context> |
| 395 |
|
| 396 |
<context name="node in open" attribute="Normal Text" lineEndContext="#stay"> |
| 397 |
<DetectChar attribute="Normal Text" char="{" beginRegion="node" context="node in"/> |
| 398 |
<DetectChar attribute="Normal Text" char="}" endRegion="node" context="#pop#pop"/> |
| 399 |
</context> |
| 400 |
|
| 401 |
<context name="node in" attribute="Normal Text" lineEndContext="#stay"> |
| 402 |
<IncludeRules context="common"/> |
| 403 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 404 |
</context> |
| 405 |
<!-- END Node --> |
| 406 |
|
| 407 |
<!-- BEGIN Class --> |
| 408 |
<context name="class def" attribute="Normal Text" lineEndContext="#stay"> |
| 409 |
<!-- TODO: be more strict here --> |
| 410 |
<DetectSpaces/> |
| 411 |
<StringDetect attribute="Keyword" String="inherits" context="#stay"/> |
| 412 |
<RegExpr attribute="Class" String="&namespace;" context="#stay"/> |
| 413 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 414 |
<DetectChar char="(" context="class params"/> |
| 415 |
<DetectChar attribute="Normal Text" char="{" beginRegion="class" context="class in"/> |
| 416 |
<DetectChar attribute="Normal Text" char="}" endRegion="class" context="#pop"/> |
| 417 |
</context> |
| 418 |
|
| 419 |
<context name="class params" attribute="Normal Text" lineEndContext="#stay"> |
| 420 |
<!-- TODO: be more strict here --> |
| 421 |
<DetectSpaces/> |
| 422 |
<AnyChar String="=," context="#stay"/> |
| 423 |
<IncludeRules context="FindVariable"/> |
| 424 |
<IncludeRules context="parameter values"/> |
| 425 |
<DetectChar char=")" context="#pop"/> |
| 426 |
</context> |
| 427 |
|
| 428 |
<context name="class in" attribute="Normal Text" lineEndContext="#stay"> |
| 429 |
<IncludeRules context="common"/> |
| 430 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 431 |
</context> |
| 432 |
<!-- END Class --> |
| 433 |
|
| 434 |
<!-- BEGIN Resource --> |
| 435 |
<context name="resource" attribute="Normal Text" lineEndContext="#stay"> |
| 436 |
<DetectSpaces/> |
| 437 |
<DetectChar attribute="Resource" char="@" context="#stay"/> |
| 438 |
<RegExpr attribute="Resource" String="&BareWord;" context="#stay"/> |
| 439 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 440 |
<DetectChar attribute="Normal Text" char="{" beginRegion="resource" context="resource_in"/> |
| 441 |
<DetectChar attribute="Normal Text" char="}" endRegion="resource" context="#pop"/> |
| 442 |
</context> |
| 443 |
|
| 444 |
<context name="resource_in" attribute="Normal Text" lineEndContext="#stay"> |
| 445 |
<DetectSpaces/> |
| 446 |
<IncludeRules context="FindString"/> |
| 447 |
<IncludeRules context="FindVariable"/> |
| 448 |
<IncludeRules context="FindComment"/> |
| 449 |
<IncludeRules context="FindArray"/> |
| 450 |
<IncludeRules context="FindBareWord"/> |
| 451 |
<DetectChar attribute="Operator" char=":" context="resource_attrs"/> |
| 452 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 453 |
</context> |
| 454 |
|
| 455 |
<context name="resource_attrs" attribute="Normal Text" lineEndContext="#stay"> |
| 456 |
<DetectSpaces/> |
| 457 |
<RegExpr attribute="Attribute Name" String="&BareWord;" context="resource_attr"/> |
| 458 |
<IncludeRules context="FindComment"/> |
| 459 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 460 |
</context> |
| 461 |
|
| 462 |
<context name="resource_attr" attribute="Normal Text" lineEndContext="#stay"> |
| 463 |
<DetectSpaces/> |
| 464 |
<IncludeRules context="FindComment"/> |
| 465 |
<Detect2Chars attribute="AttributeOp" char="=" char1=">" context="resource_attr_val"/> |
| 466 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 467 |
</context> |
| 468 |
|
| 469 |
<context name="resource_attr_val" attribute="Normal Text" lineEndContext="#stay"> |
| 470 |
<IncludeRules context="parameter values"/> |
| 471 |
<DetectChar attribute="Normal Text" char="," context="#pop#pop"/> |
| 472 |
<DetectChar attribute="Normal Text" char=";" context="#pop#pop#pop"/> |
| 473 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 474 |
</context> |
| 475 |
<!-- END Resource --> |
| 476 |
|
| 477 |
<!-- BEGIN Resource Reference --> |
| 478 |
<context name="res_ref" attribute="Normal Text" lineEndContext="#stay"> |
| 479 |
<DetectSpaces/> |
| 480 |
<RegExpr attribute="ResourceReference" String="&CapWord;" context="#stay"/> |
| 481 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 482 |
<DetectChar attribute="Normal Text" char="[" context="res_ref_titles"/> |
| 483 |
</context> |
| 484 |
|
| 485 |
<context name="res_ref_titles" attribute="Normal Text" lineEndContext="#stay"> |
| 486 |
<IncludeRules context="list content"/> |
| 487 |
<DetectChar attribute="Normal Text" char="]" context="res_ref_params_opt"/> |
| 488 |
</context> |
| 489 |
|
| 490 |
<context name="res_ref_params_opt" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop#pop" lineEndContext="#stay"> |
| 491 |
<DetectSpaces/> |
| 492 |
<DetectChar attribute="Normal Text" char="{" beginRegion="res ref" context="res_ref_params"/> |
| 493 |
</context> |
| 494 |
|
| 495 |
<context name="res_ref_params" attribute="Normal Text" lineEndContext="#stay"> |
| 496 |
<DetectSpaces/> |
| 497 |
<RegExpr attribute="Attribute Name" String="&BareWord;" context="res_ref_param"/> |
| 498 |
<IncludeRules context="FindComment"/> |
| 499 |
<DetectChar attribute="Normal Text" char="}" endRegion="res ref" context="#pop#pop#pop#pop"/> |
| 500 |
</context> |
| 501 |
|
| 502 |
<context name="res_ref_param" attribute="Normal Text" lineEndContext="#stay"> |
| 503 |
<DetectSpaces/> |
| 504 |
<IncludeRules context="FindComment"/> |
| 505 |
<Detect2Chars attribute="AttributeOp" char="=" char1=">" context="res_ref_param_val"/> |
| 506 |
<Detect2Chars attribute="AttributeOp" char="+" char1=">" context="res_ref_param_val"/> |
| 507 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 508 |
</context> |
| 509 |
|
| 510 |
<context name="res_ref_param_val" attribute="Normal Text" lineEndContext="#stay"> |
| 511 |
<IncludeRules context="parameter values"/> |
| 512 |
<DetectChar attribute="Normal Text" char="," context="#pop#pop"/> |
| 513 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 514 |
</context> |
| 515 |
<!-- END Resource Reference --> |
| 516 |
|
| 517 |
<!-- BEGIN Resource Defaults --> |
| 518 |
<context name="res_defaults" attribute="Normal Text" lineEndContext="#stay"> |
| 519 |
<DetectSpaces/> |
| 520 |
<RegExpr attribute="ResourceReference" String="&CapWord;" context="#stay"/> |
| 521 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 522 |
<DetectChar attribute="Normal Text" char="{" beginRegion="res defs" context="res_defaults_params"/> |
| 523 |
<DetectChar attribute="Normal Text" char="}" endRegion="res defs" context="#pop"/> |
| 524 |
</context> |
| 525 |
|
| 526 |
<context name="res_defaults_params" attribute="Normal Text" lineEndContext="#stay"> |
| 527 |
<DetectSpaces/> |
| 528 |
<IncludeRules context="FindComment"/> |
| 529 |
<RegExpr attribute="Attribute Name" String="&BareWord;" context="res_defaults_param"/> |
| 530 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 531 |
</context> |
| 532 |
|
| 533 |
<context name="res_defaults_param" attribute="Normal Text" lineEndContext="#stay"> |
| 534 |
<DetectSpaces/> |
| 535 |
<IncludeRules context="FindComment"/> |
| 536 |
<Detect2Chars attribute="AttributeOp" char="=" char1=">" context="res_defaults_param_val"/> |
| 537 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 538 |
</context> |
| 539 |
|
| 540 |
<context name="res_defaults_param_val" attribute="Normal Text" lineEndContext="#stay"> |
| 541 |
<IncludeRules context="parameter values"/> |
| 542 |
<DetectChar attribute="Normal Text" char="," context="#pop#pop"/> |
| 543 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 544 |
</context> |
| 545 |
<!-- END Resource Defaults --> |
| 546 |
|
| 547 |
<!-- BEGIN Collector --> |
| 548 |
<context name="collector" attribute="Normal Text" lineEndContext="#stay"> |
| 549 |
<DetectSpaces/> |
| 550 |
<RegExpr attribute="Collector" String="&CapWord;" context="#stay"/> |
| 551 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 552 |
<Detect2Chars attribute="Normal Text" char="<" char1="|" context="collector in"/> |
| 553 |
<Detect2Chars attribute="Normal Text" char="|" char1=">" context="#pop"/> |
| 554 |
</context> |
| 555 |
|
| 556 |
<context name="collector in" attribute="Normal Text" lineEndContext="#stay"> |
| 557 |
<IncludeRules context="collector content"/> |
| 558 |
<Detect2Chars char="|" char1=">" lookAhead="true" context="#pop"/> |
| 559 |
</context> |
| 560 |
<!-- END Collector --> |
| 561 |
|
| 562 |
<!-- BEGIN Exported Collector --> |
| 563 |
<context name="exported collector" attribute="Normal Text" lineEndContext="#stay"> |
| 564 |
<DetectSpaces/> |
| 565 |
<RegExpr attribute="Collector" String="&CapWord;" context="#stay"/> |
| 566 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 567 |
<StringDetect attribute="Normal Text" String="<<|" context="exported collector in"/> |
| 568 |
<StringDetect attribute="Normal Text" String="|>>" context="#pop"/> |
| 569 |
</context> |
| 570 |
|
| 571 |
<context name="exported collector in" attribute="Normal Text" lineEndContext="#stay"> |
| 572 |
<IncludeRules context="collector content"/> |
| 573 |
<StringDetect String="|>>" lookAhead="true" context="#pop"/> |
| 574 |
</context> |
| 575 |
<!-- END Exported Collector --> |
| 576 |
|
| 577 |
<context name="resource path" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop"> |
| 578 |
<DetectSpaces/> |
| 579 |
<RegExpr attribute="Resource" String="&BareWord;" context="#stay"/> |
| 580 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 581 |
</context> |
| 582 |
|
| 583 |
<!-- BEGIN define --> |
| 584 |
<context name="resource definition" attribute="Normal Text" lineEndContext="#stay"> |
| 585 |
<!-- TODO: be more strict here --> |
| 586 |
<DetectSpaces/> |
| 587 |
<StringDetect attribute="Keyword" String="inherits" context="#stay"/> |
| 588 |
<RegExpr attribute="Class" String="&namespace;" context="#stay"/> |
| 589 |
<Detect2Chars attribute="Normal Text" char=":" char1=":" context="#stay"/> |
| 590 |
<DetectChar char="(" context="define params"/> |
| 591 |
<DetectChar attribute="Normal Text" char="{" beginRegion="define" context="define in"/> |
| 592 |
<DetectChar attribute="Normal Text" char="}" endRegion="define" context="#pop"/> |
| 593 |
</context> |
| 594 |
|
| 595 |
<context name="define params" attribute="Normal Text" lineEndContext="#stay"> |
| 596 |
<DetectSpaces/> |
| 597 |
<AnyChar String="=," context="#stay"/> |
| 598 |
<IncludeRules context="FindVariable"/> |
| 599 |
<IncludeRules context="parameter values"/> |
| 600 |
<DetectChar char=")" context="#pop"/> |
| 601 |
</context> |
| 602 |
|
| 603 |
<context name="define in" attribute="Normal Text" lineEndContext="#stay"> |
| 604 |
<IncludeRules context="common"/> |
| 605 |
<DetectChar char="}" lookAhead="true" context="#pop"/> |
| 606 |
</context> |
| 607 |
<!-- END define --> |
| 608 |
|
| 609 |
<!-- BEGIN Contents --> |
| 610 |
<context name="list content" attribute="Normal Text" lineEndContext="#stay"> |
| 611 |
<DetectSpaces/> |
| 612 |
<IncludeRules context="FindString"/> |
| 613 |
<IncludeRules context="FindVariable"/> |
| 614 |
<IncludeRules context="FindOperator"/> |
| 615 |
<Int attribute="Number" context="#stay"/> |
| 616 |
<IncludeRules context="FindResourceReference"/> |
| 617 |
<IncludeRules context="FindFunction"/> |
| 618 |
<IncludeRules context="FindBareWord"/> |
| 619 |
<DetectChar char="," context="#stay"/> |
| 620 |
</context> |
| 621 |
|
| 622 |
<context name="parameter values" attribute="Normal Text" lineEndContext="#stay"> |
| 623 |
<DetectSpaces/> |
| 624 |
<IncludeRules context="FindString"/> |
| 625 |
<IncludeRules context="FindComment"/> |
| 626 |
<IncludeRules context="FindOperator"/> |
| 627 |
<keyword attribute="Keyword" String="keywords" context="#stay"/> |
| 628 |
<Int attribute="Number" context="#stay"/> |
| 629 |
<IncludeRules context="FindVariable"/> |
| 630 |
<IncludeRules context="FindResourceReference"/> |
| 631 |
<IncludeRules context="FindArray"/> |
| 632 |
<IncludeRules context="FindFunction"/> |
| 633 |
<IncludeRules context="FindResourcePath"/> |
| 634 |
<IncludeRules context="FindBareWord"/> |
| 635 |
</context> |
| 636 |
|
| 637 |
<context name="hash keys" attribute="Normal Text" lineEndContext="#stay"> |
| 638 |
<DetectSpaces/> |
| 639 |
<IncludeRules context="FindString"/> |
| 640 |
<IncludeRules context="FindComment"/> |
| 641 |
<Int attribute="Number" context="#stay"/> |
| 642 |
<IncludeRules context="FindBareWord"/> |
| 643 |
</context> |
| 644 |
|
| 645 |
<context name="collector content" attribute="Normal Text" lineEndContext="#stay"> |
| 646 |
<DetectSpaces/> |
| 647 |
<keyword attribute="Operator" String="collector operators" context="#stay"/> |
| 648 |
<Detect2Chars attribute="Operator" char="=" char1="=" context="#stay"/> |
| 649 |
<Detect2Chars attribute="Operator" char="!" char1="=" context="#stay"/> |
| 650 |
<IncludeRules context="FindString"/> |
| 651 |
<Int attribute="Number" context="#stay"/> |
| 652 |
<IncludeRules context="FindComment"/> |
| 653 |
<IncludeRules context="FindBareWord"/> |
| 654 |
</context> |
| 655 |
|
| 656 |
<context name="condition" attribute="Normal Text" lineEndContext="#stay"> |
| 657 |
<IncludeRules context="FindComment"/> |
| 658 |
<IncludeRules context="FindString"/> |
| 659 |
<IncludeRules context="FindOperator"/> |
| 660 |
<Int attribute="Number" context="#stay" /> |
| 661 |
<keyword attribute="Keyword" String="keywords" context="#stay"/> |
| 662 |
<IncludeRules context="FindVariable"/> |
| 663 |
<IncludeRules context="FindResourceReference"/> |
| 664 |
<IncludeRules context="FindArray"/> |
| 665 |
<IncludeRules context="FindFunction"/> |
| 666 |
<IncludeRules context="FindBareWord"/> |
| 667 |
</context> |
| 668 |
|
| 669 |
<!-- END Contents --> |
| 670 |
</contexts> |
| 671 |
<itemDatas> |
| 672 |
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/> |
| 673 |
<itemData name="Comment" defStyleNum="dsComment"/> |
| 674 |
<itemData name="String" defStyleNum="dsString"/> |
| 675 |
<itemData name="Escape" defStyleNum="dsFloat"/> |
| 676 |
<itemData name="RegExp" defStyleNum="dsOthers" /> |
| 677 |
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> |
| 678 |
<itemData name="Variable" defStyleNum="dsChar" spellChecking="false"/> |
| 679 |
<itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/> |
| 680 |
<itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/> |
| 681 |
<itemData name="Operator" defStyleNum="dsOthers" spellChecking="false"/> |
| 682 |
|
| 683 |
<itemData name="Attribute Name" defStyleNum="dsKeyword" italic="true" bold="false" spellChecking="false"/> |
| 684 |
<itemData name="AttributeOp" defStyleNum="dsOthers" spellChecking="false"/> |
| 685 |
|
| 686 |
<itemData name="Node" defStyleNum="dsDataType" spellChecking="false"/> |
| 687 |
<itemData name="Class" defStyleNum="dsOthers" spellChecking="false"/> |
| 688 |
<itemData name="Resource" defStyleNum="dsDataType" spellChecking="false"/> |
| 689 |
<itemData name="ResourceReference" defStyleNum="dsOthers" spellChecking="false"/> |
| 690 |
<itemData name="Collector" defStyleNum="dsOthers" spellChecking="false"/> |
| 691 |
<itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/> |
| 692 |
</itemDatas> |
| 693 |
</highlighting> |
| 694 |
<general> |
| 695 |
<comments> |
| 696 |
<comment name="singleLine" start="#"/> |
| 697 |
<comment name="multiLine" start="/*" end="*/" region="comment"/> |
| 698 |
</comments> |
| 699 |
<keywords casesensitive="1" /> |
| 700 |
</general> |
| 701 |
</language> |
| 702 |
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; --> |