Warning, /frameworks/syntax-highlighting/data/syntax/yaml.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 null "(?:null|Null|NULL|~)"> 0005 <!ENTITY bool "(?:y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)"> 0006 0007 <!ENTITY int "(?:0|[\-\+]?[1-9][0-9_]*)"> 0008 <!ENTITY intOther "[\-\+]?0(?:x_*[0-9a-fA-F][0-9a-fA-F_]*|o?_*[0-7][0-7_]*|b_*[01][01_]*)"> <!-- Hex, Octal, Binary --> 0009 <!ENTITY intBase60 "[\-\+]?[1-9][0-9_]*(?:\:[0-5]?[0-9])+"> 0010 <!ENTITY allInt "(?:&intBase60;|&intOther;|∫)"> 0011 0012 <!ENTITY float "[\-\+]?(?:[0-9][0-9_]*\.[0-9\._]*|\._*[0-9][0-9\._]*)(?:[eE][\-\+]?[0-9]+)?"> 0013 <!ENTITY floatExp "[\-\+]?[0-9][0-9_]*[eE][\-\+]?[0-9]+"> 0014 <!ENTITY floatBase60 "[\-\+]?[0-9][0-9_]*(?:\:[0-5]?[0-9])+\.[0-9_]*"> 0015 <!ENTITY inf "[\-\+]?\.(?:inf|Inf|INF)\b"> 0016 <!ENTITY nan "\.(?:nan|NaN|NAN)\b"> 0017 <!ENTITY allFloat "(?:&float;|&floatExp;|&floatBase60;|&inf;|&nan;)"> 0018 0019 <!ENTITY endValue "(?:\s*$|\s+#)"> 0020 <!ENTITY endValueInline "\s*[:,\[\]\{\}]"> 0021 <!ENTITY space "[ ]"> 0022 0023 <!-- Key quoted --> 0024 <!ENTITY keyDQ ""(?:\\.|[^"])+"\s*"> 0025 <!ENTITY keySQ "'(?:[^']|'')+'\s*"> 0026 <!-- Literal/folded operator --> 0027 <!ENTITY literalOp "[\|>][\-\+]?"> 0028 <!-- Key after "?" or "-", used to detect literal/folded operator --> 0029 <!ENTITY keyAfterOp "(?:[^"'#\-\?\s][^:#]*|\-(?:[^\s:#][^:#]*)?|&keyDQ;|&keySQ;)"> 0030 0031 <!ENTITY dataTypes "!!\S+"> 0032 <!ENTITY alias "&\S+"> 0033 <!ENTITY reference "\*\S+"> 0034 0035 <!ENTITY dpointsHashAttrPreInline1 "[^\s"'#\-,\}\s][^:#,\}]*(?=\:(?:\s|$))"> 0036 <!ENTITY dpointsHashAttrPreInline2 "\-(?:[^\s:#,\}][^:#,\}]*)?(?=\:(?:\s|$))"> 0037 <!ENTITY dpointsHashAttrPreInline3 "&keyDQ;(?=\:(?:\s|$))"> 0038 <!ENTITY dpointsHashAttrPreInline4 "&keySQ;(?=\:(?:\s|$))"> 0039 0040 <!ENTITY dpointsListAttrPreInline1 "[^"'#\-,\]\s][^:#,\]]*(?=\:(?:\s|$))"> 0041 <!ENTITY dpointsListAttrPreInline2 "\-(?:[^\s:#,\]][^:#,\]]*)?(?=\:(?:\s|$))"> 0042 <!ENTITY dpointsListAttrPreInline3 "&keyDQ;(?=\:(?:\s|$))"> 0043 <!ENTITY dpointsListAttrPreInline4 "&keySQ;(?=\:(?:\s|$))"> 0044 0045 <!ENTITY dpointsAttrPre1 "[^"'#\-\s][^:#]*(?=\:(?:\s|$))"> 0046 <!ENTITY dpointsAttrPre2 "\-(?:[^\s:#][^:#]*)?(?=\:(?:\s|$))"> 0047 <!ENTITY dpointsAttrPre3 "&keyDQ;(?=\:(?:\s|$))"> 0048 <!ENTITY dpointsAttrPre4 "&keySQ;(?=\:(?:\s|$))"> 0049 0050 ]> 0051 0052 <!-- Author: Dr Orlovsky MA <maxim@orlovsky.info> //--> 0053 <!-- Modifications (YAML 1.2), values & support for literal/folded style: 0054 Nibaldo González S. <nibgonz@gmail.com> 0055 These modifications are under the MIT license. //--> 0056 <language name="YAML" version="11" kateversion="5.0" section="Markup" 0057 extensions="*.yaml;*.yml" mimetype="text/yaml" priority="9" 0058 author="Dr Orlovsky MA (dr.orlovsky@gmail.com), Nibaldo González (nibgonz@gmail.com)" license="LGPL"> 0059 <highlighting> 0060 <contexts> 0061 <context attribute="Attribute" lineEndContext="#stay" name="normal" > 0062 <StringDetect attribute="Document Header" context="header" String="---" column="0"/> 0063 <RegExpr attribute="End of Document" context="EOD" String="^\.\.\.$" column="0"/> 0064 <DetectChar attribute="Directive" context="directive" char="%" column="0"/> 0065 0066 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0067 0068 <!-- Literal/Folded Style --> 0069 <IncludeRules context="find-literal-block" /> 0070 0071 <RegExpr attribute="Operator" firstNonSpace="true" context="dash" String="\-(?=\s|$)" /> 0072 <DetectChar attribute="Operator" firstNonSpace="true" context="mapping-key" char="?" /> 0073 0074 <DetectChar attribute="Operator" firstNonSpace="true" context="list" char="[" beginRegion="List" /> 0075 <DetectChar attribute="Operator" firstNonSpace="true" context="hash" char="{" beginRegion="Hash" /> 0076 0077 <RegExpr attribute="Data Types" firstNonSpace="true" context="after-data" String="&dataTypes;" /> 0078 <RegExpr attribute="Alias" firstNonSpace="true" context="after-data" String="&alias;" /> 0079 <RegExpr attribute="Reference" firstNonSpace="true" context="after-data" String="&reference;" /> 0080 0081 <RegExpr attribute="Key" context="dpoints-attribute-pre" String="&dpointsAttrPre1;|&dpointsAttrPre2;|&dpointsAttrPre3;|&dpointsAttrPre4;"/> 0082 <RegExpr attribute="Key Points Operator" context="attribute-pre" String=":(?=\s|$)"/> 0083 0084 <DetectChar attribute="String" firstNonSpace="true" context="string" char="'" beginRegion="String" /> 0085 <DetectChar attribute="String" firstNonSpace="true" context="stringx" char=""" beginRegion="String" /> 0086 <IncludeRules context="values-firstnonspace" /> 0087 <DetectSpaces/> 0088 </context> 0089 0090 <context attribute="Normal Text" lineEndContext="#pop" name="mapping-key" fallthrough="true" fallthroughContext="#pop"> 0091 <RegExpr attribute="Comment" context="#pop!comment" String="(?:^|\s+)#" /> 0092 <DetectSpaces /> 0093 <RegExpr attribute="Operator" context="#pop!dash" String="\-(?=\s|$)" /> 0094 <RegExpr attribute="Data Types" context="#pop!after-data" String="&dataTypes;" /> 0095 <RegExpr attribute="Alias" context="#pop!after-data" String="&alias;" /> 0096 <RegExpr attribute="Reference" context="#pop!after-data" String="&reference;" /> 0097 0098 <DetectChar attribute="Operator" context="#pop!list" char="[" beginRegion="List" /> 0099 <DetectChar attribute="Operator" context="#pop!hash" char="{" beginRegion="Hash" /> 0100 <DetectChar attribute="String" context="#pop!string" char="'" beginRegion="String" /> 0101 <DetectChar attribute="String" context="#pop!stringx" char=""" beginRegion="String" /> 0102 </context> 0103 0104 <context attribute="Normal Text" lineEndContext="#pop" name="dash" fallthrough="true" fallthroughContext="#pop"> 0105 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0106 <DetectSpaces/> 0107 <RegExpr attribute="Data Types" context="#stay" String="&dataTypes;" /> 0108 <RegExpr attribute="Alias" context="#stay" String="&alias;" /> 0109 <RegExpr attribute="Reference" context="#stay" String="&reference;" /> 0110 <IncludeRules context="values" /> 0111 <DetectChar attribute="Operator" context="#pop!mapping-key" char="?" /> 0112 <RegExpr attribute="Operator" context="#stay" String="\-(?=\s|$)" /> 0113 0114 <DetectChar attribute="Operator" context="#pop!list" char="[" beginRegion="List" /> 0115 <DetectChar attribute="Operator" context="#pop!hash" char="{" beginRegion="Hash" /> 0116 <DetectChar attribute="String" context="#pop!string" char="'" beginRegion="String" /> 0117 <DetectChar attribute="String" context="#pop!stringx" char=""" beginRegion="String" /> 0118 </context> 0119 0120 <!-- Highlight lists, hashes and strings after a data type, reference or alias --> 0121 <context attribute="Normal Text" lineEndContext="#pop" name="after-data" fallthrough="true" fallthroughContext="#pop"> 0122 <RegExpr attribute="Comment" context="#pop!comment" String="(?:^|\s+)#" /> 0123 <DetectSpaces /> 0124 <RegExpr attribute="Data Types" context="#stay" String="&dataTypes;" /> 0125 <RegExpr attribute="Alias" context="#stay" String="&alias;" /> 0126 <RegExpr attribute="Reference" context="#stay" String="&reference;" /> 0127 0128 <DetectChar attribute="Operator" context="list" char="[" beginRegion="List" /> 0129 <DetectChar attribute="Operator" context="hash" char="{" beginRegion="Hash" /> 0130 <DetectChar attribute="String" context="string" char="'" beginRegion="String" /> 0131 <DetectChar attribute="String" context="stringx" char=""" beginRegion="String" /> 0132 </context> 0133 0134 <context attribute="Document Header" lineEndContext="#pop" name="header"> 0135 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0136 <RegExpr attribute="Literal/Folded Operator" context="header-literal-operator" String="\s&literalOp;(?=&endValue;)" lookAhead="true" /> 0137 </context> 0138 <context attribute="Document Header" lineEndContext="#pop#pop" name="header-literal-operator" fallthrough="true" fallthroughContext="#pop"> 0139 <DetectSpaces /> 0140 <RegExpr attribute="Literal/Folded Operator" context="#pop#pop!literal-block-simple" String="&literalOp;" beginRegion="Literal" /> 0141 </context> 0142 0143 <context attribute="End of Document" lineEndContext="#stay" name="EOD"> 0144 </context> 0145 0146 <context attribute="Directive" lineEndContext="#pop" name="directive"> 0147 </context> 0148 0149 <context attribute="Attribute" lineEndContext="#pop#pop" name="attribute"> 0150 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0151 </context> 0152 0153 <context attribute="Attribute" lineEndContext="#stay" name="list-attribute-inline"> 0154 <AnyChar attribute="Operator" context="#pop#pop" lookAhead="true" String=",]" /> 0155 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0156 </context> 0157 <context attribute="Attribute" lineEndContext="#stay" name="hash-attribute-inline"> 0158 <AnyChar attribute="Operator" context="#pop#pop" lookAhead="true" String=",}" /> 0159 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0160 </context> 0161 0162 <!-- Attribute --> 0163 <context attribute="Attribute" lineEndContext="#pop" name="dpoints-attribute-pre" fallthrough="true" fallthroughContext="#pop!attribute-pre"> 0164 <DetectChar attribute="Key Points Operator" context="#pop!attribute-pre" char=":" /> <!-- Highlight two points after Key --> 0165 </context> 0166 <context attribute="Attribute" lineEndContext="#pop" name="attribute-pre" fallthrough="true" fallthroughContext="attribute"> 0167 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0168 <DetectSpaces/> 0169 <DetectChar attribute="Operator" context="#stay" char="?" /> 0170 <RegExpr attribute="Data Types" context="#stay" String="&dataTypes;" /> 0171 <DetectChar attribute="Operator" context="list" char="[" beginRegion="List" /> 0172 <DetectChar attribute="Operator" context="hash" char="{" beginRegion="Hash" /> 0173 <DetectChar attribute="String" context="attribute-string" char="'" beginRegion="String" /> 0174 <DetectChar attribute="String" context="attribute-stringx" char=""" beginRegion="String" /> 0175 <RegExpr attribute="Alias" context="#stay" String="&alias;(?=\s+[\[\{])" /> 0176 <RegExpr attribute="Reference" context="#stay" String="&reference;(?=\s+[\[\{])" /> 0177 <RegExpr attribute="Alias" context="attribute" String="&alias;" /> 0178 <RegExpr attribute="Reference" context="attribute" String="&reference;" /> 0179 <IncludeRules context="values" /> 0180 <RegExpr attribute="Literal/Folded Operator" context="#stay" String="&literalOp;(?=&endValue;)" /> 0181 </context> 0182 0183 <context attribute="Attribute" lineEndContext="#pop" name="default-attribute-pre-inline"> 0184 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0185 <DetectSpaces/> 0186 0187 <DetectChar attribute="Operator" context="#stay" char="?" /> 0188 <RegExpr attribute="Data Types" context="#stay" String="&dataTypes;" /> 0189 <DetectChar attribute="Operator" context="list" char="[" beginRegion="List" /> 0190 <DetectChar attribute="Operator" context="hash" char="{" beginRegion="Hash" /> 0191 <DetectChar attribute="String" context="attribute-string-inline" char="'" beginRegion="String" /> 0192 <DetectChar attribute="String" context="attribute-stringx-inline" char=""" beginRegion="String" /> 0193 <RegExpr attribute="Alias" context="#stay" String="&alias;(?=\s+[\[\{])" /> 0194 <RegExpr attribute="Reference" context="#stay" String="&reference;(?=\s+[\[\{])" /> 0195 </context> 0196 0197 <!-- Attribute Inline, Within List --> 0198 <context attribute="Attribute" lineEndContext="#pop" name="dpoints-list-attribute-pre-inline" fallthrough="true" fallthroughContext="#pop!list-attribute-pre-inline"> 0199 <DetectChar attribute="Key Points Operator" context="#pop!list-attribute-pre-inline" char=":" /> <!-- Highlight two points after Key --> 0200 </context> 0201 <context attribute="Attribute" lineEndContext="#pop" name="list-attribute-pre-inline" fallthrough="true" fallthroughContext="list-attribute-inline"> 0202 <IncludeRules context="default-attribute-pre-inline" /> 0203 <RegExpr attribute="Alias" context="list-attribute-inline" String="&alias;" /> 0204 <RegExpr attribute="Reference" context="list-attribute-inline" String="&reference;" /> 0205 0206 <AnyChar attribute="Operator" context="#pop" lookAhead="true" String=",]" /> 0207 <IncludeRules context="values-inline" /> 0208 </context> 0209 0210 <!-- Attribute Inline, Within Hash --> 0211 <context attribute="Attribute" lineEndContext="#pop" name="dpoints-hash-attribute-pre-inline" fallthrough="true" fallthroughContext="#pop!hash-attribute-pre-inline"> 0212 <DetectChar attribute="Key Points Operator" context="#pop!hash-attribute-pre-inline" char=":" /> <!-- Highlight two points after Key --> 0213 </context> 0214 <context attribute="Attribute" lineEndContext="#pop" name="hash-attribute-pre-inline" fallthrough="true" fallthroughContext="hash-attribute-inline"> 0215 <IncludeRules context="default-attribute-pre-inline" /> 0216 <RegExpr attribute="Alias" context="hash-attribute-inline" String="&alias;" /> 0217 <RegExpr attribute="Reference" context="hash-attribute-inline" String="&reference;" /> 0218 0219 <AnyChar attribute="Operator" context="#pop" lookAhead="true" String=",}" /> 0220 <IncludeRules context="values-inline" /> 0221 </context> 0222 0223 <!-- List --> 0224 <!-- Context "find-values-list" highlights values and then sends to "list-element" --> 0225 <context attribute="List" lineEndContext="#stay" name="list" fallthrough="true" fallthroughContext="#pop!find-values-list" noIndentationBasedFolding="true"> 0226 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0227 <DetectSpaces /> 0228 <DetectChar attribute="Operator" context="#pop!find-values-list" char="?" /> 0229 </context> 0230 <context attribute="List" lineEndContext="#stay" name="list-element" noIndentationBasedFolding="true"> 0231 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0232 0233 <DetectChar attribute="Operator" context="#pop" char="]" endRegion="List" /> 0234 <DetectChar attribute="Operator" context="list" char="[" beginRegion="List" /> 0235 <DetectChar attribute="Operator" context="hash" char="{" beginRegion="Hash" /> 0236 0237 <RegExpr attribute="Key" context="dpoints-list-attribute-pre-inline" String="&dpointsListAttrPreInline1;|&dpointsListAttrPreInline2;|&dpointsListAttrPreInline3;|&dpointsListAttrPreInline4;"/> 0238 <RegExpr attribute="Key Points Operator" context="list-attribute-pre-inline" String=":(?=\s|$)" firstNonSpace="true" /> 0239 0240 <RegExpr attribute="Data Types" context="#stay" String="&dataTypes;" /> 0241 <RegExpr attribute="Alias" context="#stay" String="&alias;" /> 0242 <RegExpr attribute="Reference" context="#stay" String="&reference;" /> 0243 <DetectChar attribute="String" context="string" char="'" beginRegion="String" /> 0244 <DetectChar attribute="String" context="stringx" char=""" beginRegion="String" /> 0245 0246 <DetectChar attribute="Operator" context="#pop!list" char="," /> 0247 <IncludeRules context="values-list" /> 0248 </context> 0249 0250 <!-- Hash --> 0251 <context attribute="Hash" lineEndContext="#stay" name="hash" fallthrough="true" fallthroughContext="#pop!hash-element" noIndentationBasedFolding="true"> 0252 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0253 <DetectSpaces /> 0254 <DetectChar attribute="Operator" context="#pop!hash-element" char="?" /> 0255 </context> 0256 <context attribute="Hash" lineEndContext="#stay" name="hash-element" noIndentationBasedFolding="true"> 0257 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0258 <DetectSpaces/> 0259 0260 <RegExpr attribute="Key" context="dpoints-hash-attribute-pre-inline" String="&dpointsHashAttrPreInline1;|&dpointsHashAttrPreInline2;|&dpointsHashAttrPreInline3;|&dpointsHashAttrPreInline4;"/> 0261 <RegExpr attribute="Key Points Operator" context="hash-attribute-pre-inline" String=":(?=\s|$)"/> 0262 0263 <DetectChar attribute="Operator" context="#pop" char="}" endRegion="Hash" /> 0264 <DetectChar attribute="Operator" context="#pop!hash" char="," /> 0265 0266 <!-- This improves highlighting in keys with multiple lines --> 0267 <RegExpr attribute="Data Types" context="#stay" String="&dataTypes;" /> 0268 <RegExpr attribute="Alias" context="#stay" String="&alias;" /> 0269 <RegExpr attribute="Reference" context="#stay" String="&reference;" /> 0270 <DetectChar attribute="String" context="string" char="'" beginRegion="String" /> 0271 <DetectChar attribute="String" context="stringx" char=""" beginRegion="String" /> 0272 </context> 0273 0274 <!-- Strings --> 0275 <context attribute="String" lineEndContext="#stay" name="attribute-string" noIndentationBasedFolding="true"> 0276 <DetectIdentifier /> 0277 <IncludeRules context="escaped-char-singleq" /> 0278 <DetectChar attribute="String" context="attribute-end" char="'" endRegion="String" /> 0279 </context> 0280 0281 <context attribute="String" lineEndContext="#stay" name="attribute-stringx" noIndentationBasedFolding="true"> 0282 <DetectIdentifier /> 0283 <IncludeRules context="escaped-char-doubleq" /> 0284 <DetectChar attribute="String" context="attribute-end" char=""" endRegion="String" /> 0285 </context> 0286 0287 <context attribute="String" lineEndContext="#stay" name="attribute-string-inline" noIndentationBasedFolding="true"> 0288 <DetectIdentifier /> 0289 <IncludeRules context="escaped-char-singleq" /> 0290 <DetectChar attribute="String" context="attribute-end-inline" char="'" endRegion="String" /> 0291 </context> 0292 0293 <context attribute="String" lineEndContext="#stay" name="attribute-stringx-inline" noIndentationBasedFolding="true"> 0294 <DetectIdentifier /> 0295 <IncludeRules context="escaped-char-doubleq" /> 0296 <DetectChar attribute="String" context="attribute-end-inline" char=""" endRegion="String" /> 0297 </context> 0298 0299 <context attribute="Error" lineEndContext="#pop#pop#pop" name="attribute-end"> 0300 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0301 <DetectSpaces attribute="Normal Text" context="#stay"/> 0302 </context> 0303 0304 <context attribute="Error" lineEndContext="#pop#pop#pop" name="attribute-end-inline"> 0305 <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> 0306 <DetectSpaces attribute="Normal Text" context="#stay"/> 0307 <AnyChar context="#pop#pop#pop" lookAhead="true" String="}],"/> 0308 </context> 0309 0310 <context attribute="String" lineEndContext="#stay" name="string" noIndentationBasedFolding="true"> 0311 <DetectIdentifier /> 0312 <IncludeRules context="escaped-char-singleq" /> 0313 <DetectChar attribute="String" context="#pop" char="'" endRegion="String" /> 0314 </context> 0315 0316 <context attribute="String" lineEndContext="#stay" name="stringx" noIndentationBasedFolding="true"> 0317 <DetectIdentifier /> 0318 <IncludeRules context="escaped-char-doubleq" /> 0319 <DetectChar attribute="String" context="#pop" char=""" endRegion="String" /> 0320 </context> 0321 0322 <context attribute="Normal Text" lineEndContext="#stay" name="escaped-char-doubleq"> 0323 <RegExpr attribute="Escaped Character" context="#stay" String="\\(?:[\s0abtnvfre"/\\N_Lp]|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8})"/> 0324 </context> 0325 0326 <context attribute="Normal Text" lineEndContext="#stay" name="escaped-char-singleq"> 0327 <Detect2Chars attribute="Escaped Character" context="#stay" char="'" char1="'" /> 0328 </context> 0329 0330 <context attribute="Comment" lineEndContext="#pop" name="comment"> 0331 <DetectSpaces /> 0332 <IncludeRules context="##Comments" /> 0333 </context> 0334 0335 <!-- Values --> 0336 <context attribute="Normal Text" lineEndContext="#stay" name="values"> 0337 <RegExpr attribute="Null" context="#stay" String="&null;(?=&endValue;)"/> 0338 <RegExpr attribute="Boolean" context="#stay" String="&bool;(?=&endValue;)"/> 0339 <RegExpr attribute="Float" context="#stay" String="&allFloat;(?=&endValue;)"/> 0340 <RegExpr attribute="Integer" context="#stay" String="&allInt;(?=&endValue;)"/> 0341 </context> 0342 <context attribute="Normal Text" lineEndContext="#stay" name="values-firstnonspace"> 0343 <RegExpr attribute="Null" firstNonSpace="true" context="#stay" String="&null;(?=&endValue;)"/> 0344 <RegExpr attribute="Boolean" firstNonSpace="true" context="#stay" String="&bool;(?=&endValue;)"/> 0345 <RegExpr attribute="Float" firstNonSpace="true" context="#stay" String="&allFloat;(?=&endValue;)"/> 0346 <RegExpr attribute="Integer" firstNonSpace="true" context="#stay" String="&allInt;(?=&endValue;)"/> 0347 </context> 0348 <context attribute="Normal Text" lineEndContext="#stay" name="values-inline"> 0349 <RegExpr attribute="Null" context="#stay" String="&null;(?=&endValueInline;|&endValue;)"/> 0350 <RegExpr attribute="Boolean" context="#stay" String="&bool;(?=&endValueInline;|&endValue;)"/> 0351 <RegExpr attribute="Float" context="#stay" String="&allFloat;(?=&endValueInline;|&endValue;)"/> 0352 <RegExpr attribute="Integer" context="#stay" String="&allInt;(?=&endValueInline;|&endValue;)"/> 0353 </context> 0354 0355 <context attribute="Normal Text" lineEndContext="#stay" name="values-list"> 0356 <RegExpr attribute="Null" context="#stay" String="(?:\s|^)&null;(?=&endValueInline;|&endValue;)"/> 0357 <RegExpr attribute="Boolean" context="#stay" String="(?:\s|^)&bool;(?=&endValueInline;|&endValue;)"/> 0358 <RegExpr attribute="Float" context="#stay" String="(?:\s|^)&allFloat;(?=&endValueInline;|&endValue;)"/> 0359 <RegExpr attribute="Integer" context="#stay" String="(?:\s|^)&allInt;(?=&endValueInline;|&endValue;)"/> 0360 </context> 0361 <!-- If the value is found immediately at the beginning of the list item --> 0362 <context attribute="Normal Text" lineEndContext="#pop!list-element" name="find-values-list" fallthrough="true" fallthroughContext="#pop!list-element"> 0363 <RegExpr attribute="Null" context="#pop!list-element" String="&null;(?=&endValueInline;|&endValue;)"/> 0364 <RegExpr attribute="Boolean" context="#pop!list-element" String="&bool;(?=&endValueInline;|&endValue;)"/> 0365 <RegExpr attribute="Float" context="#pop!list-element" String="&allFloat;(?=&endValueInline;|&endValue;)"/> 0366 <RegExpr attribute="Integer" context="#pop!list-element" String="&allInt;(?=&endValueInline;|&endValue;)"/> 0367 </context> 0368 0369 <!-- Literal/Folded Style: http://yaml.org/spec/1.2/spec.html#id2795688 --> 0370 0371 <context attribute="Normal Text" lineEndContext="#stay" name="find-literal-block"> 0372 <!-- Do not allow indentation with tabs: --> 0373 <RegExpr attribute="Alert" context="#stay" column="0" 0374 String="^&space;*\t+\s*(?=(?:(?:&keyDQ;|&keySQ;|[^#])*[^#\w\|<>"'])?&literalOp;&endValue;)" /> 0375 0376 <!-- CASE 1: The literal/folded operator is the first character of a line. 0377 The text after a space is considered literal. 0378 Ex: 0379 > | 0380 > ^Start the literal text 0381 --> 0382 <RegExpr attribute="Literal/Folded Operator" context="literal-block-simple" column="0" 0383 String="^&literalOp;(?=&endValue;)" beginRegion="Literal" /> 0384 0385 <!-- CASE 2: Only the literal/folded operator is present in a line, after a space (the indentation 0386 is captured). The text with the same indentation of the operator will be highlighted as literal. 0387 Ex: 0388 > key: 0389 > | 0390 > ^Start the literal text 0391 0392 However, in this case, the correct way is to use the indentation of the block, not the 0393 indentation of the the operator. The problem is that it is difficult to capture. 0394 > key1: 0395 > key2: 0396 > key3: 0397 > | 0398 > ^Block indentation (correct literal text) 0399 --> 0400 <RegExpr attribute="Literal/Folded Operator" context="literal-block-only-operator" column="0" 0401 String="^(&space;+)&literalOp;(?=&endValue;)" beginRegion="Literal" /> 0402 0403 <!-- CASE 3: There is a Key before the literal/folded operator (Key indentation is captured). 0404 The text with the Key's indentation plus a space is considered literal. 0405 Ex: 0406 > key: | 0407 > ^Start the literal text 0408 > key: !!type >- 0409 > ^Start the folded text 0410 --> 0411 <RegExpr attribute="Key Points Operator" context="literal-block-key" column="0" 0412 String="^(&space;*)\:(?=\s+(?:(?:&keyDQ;|&keySQ;|[^#])*[^#\w\|<>"'])?&literalOp;&endValue;)" /> 0413 <RegExpr attribute="Key" context="literal-block-key" column="0" 0414 String="^(&space;*)(?:[^"'#\-\?\s][^:#]*|\-(?:[^\s:#][^:#]*)?|&keyDQ;|&keySQ;)(?=\:\s+(?:(?:&keyDQ;|&keySQ;|[^#])*[^#\w\|<>"'])?&literalOp;&endValue;)" /> 0415 0416 <!-- CASE 4: Is there an operator "?" or "-" at the beginning of the line. 0417 NOTE: Nested characters "-" and "?" are considered as part of the indentation. 0418 Therefore, the indentation of the Key or the last operator "?" or "-" is captured. 0419 Ex: 0420 > ? | 0421 > ^Start the literal Text 0422 > ? - - | 0423 > ^Start the literal text 0424 > - Key: | 0425 > ^Start the literal text 0426 > ? - - - - Key: | 0427 > ^Start the literal text 0428 --> 0429 <RegExpr context="start-literal-block-withdash" lookAhead="true" column="0" 0430 String="^&space;*(?:\?&space;*|\-&space;+){1,6}(?:(?:&keyDQ;|&keySQ;|[^#\-\?\s]|\-[^\s#])(?:(?:&keyDQ;|&keySQ;|[^#])*[^#\w\|<>"'])?)?&literalOp;&endValue;" /> 0431 0432 <!-- CASE 5: Literal/folded operator after a data type or other content. 0433 Ex: 0434 > !!type | 0435 > ^Start the literal text 0436 > key1: 0437 > key2: 0438 > !!type | 0439 > ^Start the literal text 0440 --> 0441 <RegExpr context="start-literal-block-other" lookAhead="true" column="0" 0442 String="^&space;*(?:(?:[&\*]|!!)\S+\s+)+&literalOp;&endValue;" /> 0443 </context> 0444 0445 <!-- If the line with the literal operator starts with the "-" or "?" operator. 0446 NOTE: The indentation capture is limited to 6 nested operators. --> 0447 <context attribute="Normal Text" lineEndContext="#pop" name="start-literal-block-withdash" noIndentationBasedFolding="true"> 0448 <!-- With Key: Capture the Key indentation --> 0449 <RegExpr attribute="Operator" context="#pop!literal-block-key-withdash-s2" String="^(&space;*)[\?\-](&space;*)(?=&keyAfterOp;:\s)" column="0"/> 0450 <RegExpr attribute="Operator" context="#pop!literal-block-key-withdash-s3" String="^(&space;*)[\?\-](&space;*)[\?\-](&space;*)(?=&keyAfterOp;:\s)" column="0"/> 0451 <RegExpr attribute="Operator" context="#pop!literal-block-key-withdash-s4" String="^(&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)(?=&keyAfterOp;:\s)" column="0"/> 0452 <RegExpr attribute="Operator" context="#pop!literal-block-key-withdash-s5" String="^(&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)(?=&keyAfterOp;:\s)" column="0"/> 0453 <RegExpr attribute="Operator" context="#pop!literal-block-key-withdash-s6" String="^(&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)(?=&keyAfterOp;:\s)" column="0"/> 0454 <RegExpr attribute="Operator" context="#pop!literal-block-key-withdash-s7" String="^(&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)(?=&keyAfterOp;:\s)" column="0"/> 0455 <!-- Without Key: Capture the indentation of the last operator "?" or "-" --> 0456 <RegExpr attribute="Operator" context="#pop!literal-block-withdash-s1" String="^(&space;*)[\?\-]\s*(?=[^#\-\?\s]|\-[^\s#])" column="0"/> 0457 <RegExpr attribute="Operator" context="#pop!literal-block-withdash-s2" String="^(&space;*)[\?\-](&space;*)[\?\-]\s*(?=[^#\-\?\s]|\-[^\s#])" column="0"/> 0458 <RegExpr attribute="Operator" context="#pop!literal-block-withdash-s3" String="^(&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-]\s*(?=[^#\-\?\s]|\-[^\s#])" column="0"/> 0459 <RegExpr attribute="Operator" context="#pop!literal-block-withdash-s4" String="^(&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-]\s*(?=[^#\-\?\s]|\-[^\s#])" column="0"/> 0460 <RegExpr attribute="Operator" context="#pop!literal-block-withdash-s5" String="^(&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-]\s*(?=[^#\-\?\s]|\-[^\s#])" column="0"/> 0461 <RegExpr attribute="Operator" context="#pop!literal-block-withdash-s6" String="^(&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-](&space;*)[\?\-]\s*(?=[^#\-\?\s]|\-[^\s#])" column="0"/> 0462 </context> 0463 <!-- Capture the indentation of data type, reference or alias --> 0464 <context attribute="Normal Text" lineEndContext="#pop" name="start-literal-block-other" noIndentationBasedFolding="true"> 0465 <!-- The text with the same indentation will be considered literal --> 0466 <RegExpr attribute="Data Types" context="#pop!literal-block-after-data" String="^(&space;+)&dataTypes;" column="0" /> 0467 <RegExpr attribute="Alias" context="#pop!literal-block-after-data" String="^(&space;+)&alias;" column="0" /> 0468 <RegExpr attribute="Reference" context="#pop!literal-block-after-data" String="^(&space;+)&reference;" column="0" /> 0469 <!-- The text after a space will be considered literal (empty text is captured) --> 0470 <RegExpr attribute="Data Types" context="#pop!literal-block-withdash-s1" String="^()&dataTypes;" column="0" /> 0471 <RegExpr attribute="Alias" context="#pop!literal-block-withdash-s1" String="^()&alias;" column="0" /> 0472 <RegExpr attribute="Reference" context="#pop!literal-block-withdash-s1" String="^()&reference;" column="0" /> 0473 </context> 0474 0475 <!-- Highlight data/attribute before the literal operator (Note that if there is a line 0476 break within a string or bracket, the literal line will not be highlighted). --> 0477 <context attribute="Attribute" lineEndContext="#pop#pop" name="before-literal-operator" noIndentationBasedFolding="true"> 0478 <RegExpr attribute="Literal/Folded Operator" context="#pop!end-literal-operator" String="&literalOp;(?=&endValue;)" beginRegion="Literal" /> 0479 0480 <RegExpr attribute="Error" context="#pop#pop" String="(?:[&\*]|!!)\S*&literalOp;(?=&endValue;)" /> 0481 <RegExpr attribute="Data Types" context="#stay" String="&dataTypes;" /> 0482 <RegExpr attribute="Alias" context="#stay" String="&alias;" /> 0483 <RegExpr attribute="Reference" context="#stay" String="&reference;" /> 0484 0485 <DetectChar attribute="Operator" context="list" char="[" beginRegion="List" /> 0486 <DetectChar attribute="Operator" context="hash" char="{" beginRegion="Hash" /> 0487 <DetectChar attribute="String" context="string" char="'" beginRegion="String" /> 0488 <DetectChar attribute="String" context="stringx" char=""" beginRegion="String" /> 0489 </context> 0490 0491 <context attribute="Normal Text" lineEndContext="#pop#pop" name="dpoints-key-before-literal-operator" fallthrough="true" fallthroughContext="#pop#pop" noIndentationBasedFolding="true"> 0492 <DetectChar attribute="Key Points Operator" context="#pop!key-before-literal-operator" char=":" /> 0493 </context> 0494 <context attribute="Attribute" lineEndContext="#pop#pop" name="key-before-literal-operator" noIndentationBasedFolding="true"> 0495 <IncludeRules context="before-literal-operator" /> 0496 <DetectChar attribute="Operator" context="#stay" char="?" /> 0497 </context> 0498 <context attribute="Attribute" lineEndContext="#pop" name="end-literal-operator" noIndentationBasedFolding="true"> 0499 <RegExpr attribute="Comment" context="#pop!comment" String="(?:^|\s+)#" /> 0500 </context> 0501 0502 <!-- Common rules for the content of the literal blocks --> 0503 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-default" noIndentationBasedFolding="true"> 0504 <!-- End literal/folded block --> 0505 <RegExpr attribute="Normal Text" context="#pop" String="^\s*\S" lookAhead="true" column="0" endRegion="Literal" /> 0506 <!-- Find literal/folded operator --> 0507 <RegExpr context="before-literal-operator" String="\S" lookAhead="true" /> 0508 </context> 0509 <context attribute="Normal Text" lineEndContext="#pop" name="literal-block-key-default" noIndentationBasedFolding="true"> 0510 <!-- End literal/folded block --> 0511 <RegExpr attribute="Normal Text" context="#pop" String="^\s*\S" lookAhead="true" column="0" endRegion="Literal" /> 0512 <!-- Detect Key before the literal/folded operator --> 0513 <RegExpr attribute="Key" context="dpoints-key-before-literal-operator" String="&keyAfterOp;(?=:\s)" /> 0514 <RegExpr attribute="Normal Text" context="#pop" String="\S" lookAhead="true" endRegion="Literal" /> 0515 </context> 0516 0517 <!-- Content of the literal block: --> 0518 0519 <!-- If the literal operator is starting the line (after a space, use block indentation) --> 0520 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-only-operator" dynamic="true" noIndentationBasedFolding="true"> 0521 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1.*$" dynamic="true" column="0" /> 0522 0523 <RegExpr attribute="Normal Text" context="#pop" String="^\s*\S" lookAhead="true" column="0" endRegion="Literal" /> 0524 <RegExpr attribute="Comment" context="comment" String="(?:^|\s)#" /> 0525 <RegExpr context="#pop" String="\S" lookAhead="true" endRegion="Literal" /> 0526 </context> 0527 <!-- If the literal operator is the first character of a line (or after header) --> 0528 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-simple" noIndentationBasedFolding="true"> 0529 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^\s.*$" column="0" /> 0530 0531 <RegExpr attribute="Normal Text" context="#pop" String="^\s*\S" lookAhead="true" column="0" endRegion="Literal" /> 0532 <RegExpr attribute="Comment" context="comment" String="(?:^|\s)#" /> 0533 </context> 0534 <!-- If there is a data type or other content before the liretal operator (use block indentation) --> 0535 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-after-data" dynamic="true" noIndentationBasedFolding="true"> 0536 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1.*$" dynamic="true" column="0" /> 0537 0538 <RegExpr attribute="Normal Text" context="#pop" String="^\s*\S" lookAhead="true" column="0" endRegion="Literal" /> 0539 <RegExpr context="before-literal-operator" String="\S" lookAhead="true" /> 0540 </context> 0541 <!-- If there is a key before the literal operator --> 0542 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-key" dynamic="true" noIndentationBasedFolding="true"> 0543 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1\s.*$" dynamic="true" column="0" /> 0544 0545 <RegExpr attribute="Normal Text" context="#pop" String="^\s*\S" lookAhead="true" column="0" endRegion="Literal" /> 0546 <!-- Attribute of the Key (the Key was previously highlighted) --> 0547 <RegExpr attribute="Key Points Operator" context="key-before-literal-operator" String=":\s" /> 0548 <RegExpr context="key-before-literal-operator" String="\S" lookAhead="true" /> 0549 </context> 0550 0551 <!-- If there are dashes/"?" before the literal operator --> 0552 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-withdash-s1" dynamic="true" noIndentationBasedFolding="true"> 0553 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1\s.*$" dynamic="true" column="0" /> 0554 <IncludeRules context="literal-block-default" /> 0555 </context> 0556 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-withdash-s2" dynamic="true" noIndentationBasedFolding="true"> 0557 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2&space;\s.*$" dynamic="true" column="0" /> 0558 <IncludeRules context="literal-block-default" /> 0559 </context> 0560 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-withdash-s3" dynamic="true" noIndentationBasedFolding="true"> 0561 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2%3&space;{2}\s.*$" dynamic="true" column="0" /> 0562 <IncludeRules context="literal-block-default" /> 0563 </context> 0564 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-withdash-s4" dynamic="true" noIndentationBasedFolding="true"> 0565 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2%3%4&space;{3}\s.*$" dynamic="true" column="0" /> 0566 <IncludeRules context="literal-block-default" /> 0567 </context> 0568 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-withdash-s5" dynamic="true" noIndentationBasedFolding="true"> 0569 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2%3%4%5&space;{4}\s.*$" dynamic="true" column="0" /> 0570 <IncludeRules context="literal-block-default" /> 0571 </context> 0572 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-withdash-s6" dynamic="true" noIndentationBasedFolding="true"> 0573 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2%3%4%5%6&space;{5}\s.*$" dynamic="true" column="0" /> 0574 <IncludeRules context="literal-block-default" /> 0575 </context> 0576 <!-- If there are dashes/"?" and a Key before the literal operator --> 0577 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-key-withdash-s2" dynamic="true" noIndentationBasedFolding="true"> 0578 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2&space;\s.*$" dynamic="true" column="0" /> 0579 <IncludeRules context="literal-block-key-default" /> 0580 </context> 0581 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-key-withdash-s3" dynamic="true" noIndentationBasedFolding="true"> 0582 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2%3&space;{2}\s.*$" dynamic="true" column="0" /> 0583 <IncludeRules context="literal-block-key-default" /> 0584 </context> 0585 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-key-withdash-s4" dynamic="true" noIndentationBasedFolding="true"> 0586 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2%3%4&space;{3}\s.*$" dynamic="true" column="0" /> 0587 <IncludeRules context="literal-block-key-default" /> 0588 </context> 0589 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-key-withdash-s5" dynamic="true" noIndentationBasedFolding="true"> 0590 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2%3%4%5&space;{4}\s.*$" dynamic="true" column="0" /> 0591 <IncludeRules context="literal-block-key-default" /> 0592 </context> 0593 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-key-withdash-s6" dynamic="true" noIndentationBasedFolding="true"> 0594 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2%3%4%5%6&space;{5}\s.*$" dynamic="true" column="0" /> 0595 <IncludeRules context="literal-block-key-default" /> 0596 </context> 0597 <context attribute="Normal Text" lineEndContext="#stay" name="literal-block-key-withdash-s7" dynamic="true" noIndentationBasedFolding="true"> 0598 <RegExpr attribute="Literal/Folded Block" context="#stay" String="^%1%2%3%4%5%6%7&space;{6}\s.*$" dynamic="true" column="0" /> 0599 <IncludeRules context="literal-block-key-default" /> 0600 </context> 0601 </contexts> 0602 0603 <itemDatas> 0604 <itemData name="Normal Text" defStyleNum="dsAttribute" /> 0605 <itemData name="Attribute" defStyleNum="dsAttribute" /> 0606 <itemData name="List" defStyleNum="dsAttribute" /> 0607 <itemData name="Hash" defStyleNum="dsAttribute" /> 0608 <itemData name="Comment" defStyleNum="dsComment" /> 0609 <itemData name="End of Document" defStyleNum="dsComment" /> 0610 <itemData name="Document Header" defStyleNum="dsPreprocessor" /> 0611 <itemData name="Data Types" defStyleNum="dsOthers" /> 0612 <itemData name="Alias" defStyleNum="dsOthers" /> 0613 <itemData name="Reference" defStyleNum="dsOthers" /> 0614 <itemData name="Key" defStyleNum="dsFunction" bold="1" /> 0615 <itemData name="Directive" defStyleNum="dsPreprocessor" /> 0616 <itemData name="Key Points Operator" defStyleNum="dsKeyword" /> 0617 <itemData name="Operator" defStyleNum="dsKeyword" /> 0618 <itemData name="String" defStyleNum="dsString" /> 0619 <itemData name="Escaped Character" defStyleNum="dsSpecialChar" /> 0620 <itemData name="Literal/Folded Operator" defStyleNum="dsChar" bold="1" /> 0621 <itemData name="Literal/Folded Block" defStyleNum="dsNormal" /> 0622 <itemData name="Null" defStyleNum="dsChar" /> 0623 <itemData name="Boolean" defStyleNum="dsChar" /> 0624 <itemData name="Integer" defStyleNum="dsDecVal" /> 0625 <itemData name="Float" defStyleNum="dsFloat" /> 0626 <itemData name="Error" defStyleNum="dsError" /> 0627 <itemData name="Alert" defStyleNum="dsAlert" backgroundColor="#EF9A9A" /> 0628 </itemDatas> 0629 </highlighting> 0630 0631 <general> 0632 <folding indentationsensitive="1" /> 0633 <emptyLines> 0634 <emptyLine regexpr="(?:\s+|\s*#.*)"/> 0635 </emptyLines> 0636 <comments> 0637 <comment name="singleLine" start="#" position="afterwhitespace" /> 0638 </comments> 0639 <keywords casesensitive="1"/> 0640 </general> 0641 </language> 0642 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->