Warning, /frameworks/syntax-highlighting/data/syntax/dosbat.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 label "[^\s]+"> 0005 <!ENTITY varname "[A-Za-z_][A-Za-z0-9_.]*"> <!-- valid character in a variable name --> 0006 <!ENTITY varname_set "&varname;(?=(\[(%%)?(&varname;|\d+)\]|!&varname;!)?(=|\s*$))|%~?\d|%%(&varname;|[0-9*#])"> <!-- variable in set cmd --> 0007 <!ENTITY eop "(?=([\s\\;"%]|$))"> <!-- end of path --> 0008 <!ENTITY pathpart "[^\s\\%!;/:*?"><|&]"> <!-- valid character in a file name --> 0009 ]> 0010 <language name="MS-DOS Batch" version="9" kateversion="5.62" section="Scripts" extensions="*.bat;*.cmd" mimetype="application/x-dos" casesensitive="0" author="Matthew Woehlke (mw_triad@users.sourceforge.net)" license="LGPL"> 0011 0012 <!-- (c) 2006, 2009, 2010 Matthew Woehlke (mw_triad@users.sourceforge.net) 0013 Released under the LGPL --> 0014 0015 <highlighting> 0016 <list name="builtins"> 0017 <item>assoc</item> 0018 <item>break</item> 0019 <item>cd</item> 0020 <item>chdir</item> 0021 <item>cls</item> 0022 <item>color</item> 0023 <item>copy</item> 0024 <item>date</item> 0025 <item>del</item> 0026 <item>dir</item> 0027 <item>endlocal</item> 0028 <item>erase</item> 0029 <item>exit</item> 0030 <item>ftype</item> 0031 <item>md</item> 0032 <item>mkdir</item> 0033 <item>move</item> 0034 <item>path</item> 0035 <item>pause</item> 0036 <item>popd</item> 0037 <item>prompt</item> 0038 <item>pushd</item> 0039 <item>rd</item> 0040 <item>ren</item> 0041 <item>rename</item> 0042 <item>rmdir</item> 0043 <item>runas</item> 0044 <item>setlocal</item> 0045 <item>shift</item> 0046 <item>start</item> 0047 <item>time</item> 0048 <item>title</item> 0049 <item>type</item> 0050 <item>ver</item> 0051 <item>verify</item> 0052 <item>vol</item> 0053 </list> 0054 0055 <!-- these need special handling --> 0056 <list name="special commands"> 0057 <item>call</item> 0058 <item>echo</item> 0059 <item>else</item> 0060 <item>for</item> 0061 <item>in</item> 0062 <item>do</item> 0063 <item>goto</item> 0064 <item>if</item> 0065 <item>not</item> 0066 <item>rem</item> 0067 <item>set</item> 0068 </list> 0069 0070 <list name="commands"> 0071 <!-- the basics --> 0072 <item>at</item> 0073 <item>attrib</item> 0074 <item>break</item> 0075 <item>cacls</item> 0076 <item>chcp</item> 0077 <item>chkdsk</item> 0078 <item>chkntfs</item> 0079 <item>cmd</item> 0080 <item>comp</item> 0081 <item>compact</item> 0082 <item>convert</item> 0083 <item>diskcomp</item> 0084 <item>diskcopy</item> 0085 <item>doskey</item> 0086 <item>fc</item> 0087 <item>find</item> 0088 <item>findstr</item> 0089 <item>format</item> 0090 <item>graftabl</item> 0091 <item>help</item> 0092 <item>label</item> 0093 <item>mode</item> 0094 <item>more</item> 0095 <item>print</item> 0096 <item>recover</item> 0097 <item>replace</item> 0098 <item>sort</item> 0099 <item>subst</item> 0100 <item>tree</item> 0101 <item>xcopy</item> 0102 </list> 0103 0104 <list name="comparators"> 0105 <item>EQU</item> 0106 <item>NEQ</item> 0107 <item>LSS</item> 0108 <item>LEQ</item> 0109 <item>GTR</item> 0110 <item>GEQ</item> 0111 </list> 0112 0113 <contexts> 0114 <context attribute="Normal Text" lineEndContext="#stay" name="Start"> 0115 <DetectSpaces/> 0116 <!-- general syntactical stuff --> 0117 <keyword attribute="Builtin" context="Command" String="builtins"/> 0118 <keyword attribute="Command" context="Command" String="commands"/> 0119 <!-- special built-ins --> 0120 <WordDetect attribute="Builtin" context="CmdSet" String="set" insensitive="1"/> 0121 <WordDetect attribute="Builtin" context="CmdEcho" String="echo" insensitive="1" lookAhead="1"/> 0122 <WordDetect attribute="ControlFlow" context="CmdIf" String="if" insensitive="1"/> 0123 <WordDetect attribute="ControlFlow" context="#stay" String="else" insensitive="1"/> 0124 <WordDetect attribute="ControlFlow" context="CmdFor" String="for" insensitive="1"/> 0125 <WordDetect attribute="ControlFlow" context="CmdGoto" String="goto" insensitive="1"/> 0126 <WordDetect attribute="Builtin" context="CmdCall" String="call" insensitive="1"/> 0127 <WordDetect attribute="Comment" context="Comment" String="rem" insensitive="1"/> 0128 <DetectChar attribute="Keyword" context="#stay" char="@"/> 0129 <!-- other syntaxes --> 0130 <StringDetect attribute="Comment" context="Comment" String="::"/> 0131 <DetectChar attribute="Label" context="Label" char=":" firstNonSpace="true"/> 0132 <DetectChar attribute="Keyword" context="NestedStart" char="(" beginRegion="body"/> 0133 <IncludeRules context="FindRedirections"/> 0134 <RegExpr attribute="Path" context="Command" String="[^\s%!;*?"><|&]+"/> 0135 <StringDetect attribute="Keyword" String="||"/> 0136 <StringDetect attribute="Keyword" String="&&"/> 0137 <DetectChar attribute="Redirection" char="|"/> 0138 <DetectChar attribute="Keyword" char="&"/> 0139 <IncludeRules context="FindStrings"/> 0140 <IncludeRules context="FindSubstitutions"/> 0141 </context> 0142 <context attribute="Normal Text" lineEndContext="#stay" name="NestedStart"> 0143 <DetectChar attribute="Keyword" context="#pop" char=")" endRegion="body"/> 0144 <IncludeRules context="Start"/> 0145 </context> 0146 0147 <context attribute="Normal Text" lineEndContext="#stay" name="FindBranches"> 0148 <StringDetect attribute="Keyword" context="#pop" String="||"/> 0149 <StringDetect attribute="Keyword" context="#pop" String="&&"/> 0150 <DetectChar attribute="Redirection" context="#pop" char="|"/> 0151 <DetectChar attribute="Keyword" context="#pop" char="&"/> 0152 <DetectChar attribute="Keyword" context="#pop" char=")" endRegion="body"/> 0153 </context> 0154 0155 <context attribute="Normal Text" lineEndContext="#stay" name="FindRedirections"> 0156 <RegExpr attribute="Redirection" context="Redirection" String="[0-9]*(>>?|<)"/> 0157 </context> 0158 <context attribute="Normal Text" lineEndContext="#stay" name="Redirection" fallthroughContext="#pop!Path"> 0159 <DetectSpaces context="#pop!Path"/> 0160 <RegExpr attribute="Redirection" context="#pop" String="&[0-9]+|"/> 0161 </context> 0162 0163 <context attribute="Normal Text" lineEndContext="#stay" name="FindStrings"> 0164 <DetectChar attribute="String" context="String" char="""/> 0165 </context> 0166 0167 <context attribute="Normal Text" lineEndContext="#stay" name="FindSubstitutions"> 0168 <Detect2Chars attribute="Escape" context="Substitution" char="%" char1="%"/> 0169 <IncludeRules context="FindVariables"/> 0170 </context> 0171 <context attribute="Normal Text" lineEndContext="#stay" name="Substitution" fallthroughContext="#pop"> 0172 <RegExpr attribute="Variable Expansion" context="#pop!SubstitutionVariable" String="&varname;(\[(%%)?(&varname;|\d+)\])*(:~(%%&varname;|-?[0-9]+)(,(%%&varname;|-?[0-9]+))?|:[^=]+=[^%]*)?%|[0-9*#]|~[fdpnxsatz]*(\$&varname;:)?[0-9#]|" lookAhead="1"/> 0173 <DetectIdentifier attribute="Variable" context="#pop"/> 0174 </context> 0175 <context attribute="Normal Text" lineEndContext="#stay" name="SubstitutionVariable" fallthroughContext="#pop!VariableRegular1"> 0176 <DetectChar attribute="Variable Expansion" char="~" context="#pop!VariableModificator"/> 0177 </context> 0178 0179 <context attribute="Normal Text" lineEndContext="#stay" name="FindVariables"> 0180 <!-- 0181 %var% 0182 %var:~N,N% 0183 %var:old=new% 0184 %~n1 0185 %~$var:1 0186 %1 0187 %* 0188 !var! 0189 !var:~N,N! 0190 !var:old=new! 0191 !%...%! 0192 0193 prefix: 0194 [%!]var[...] 0195 [%!]var%% 0196 --> 0197 <RegExpr attribute="Variable Expansion" context="Variable" String="%(&varname;(\[(%%)?(&varname;|\d+)\])*(:~(%%&varname;|-?[0-9]+)(,(%%&varname;|-?[0-9]+))?|:[^=]+=[^%]*)?%|[0-9*#])|%~[fdpnxsatz]*(\$&varname;:)?[0-9#]|!%(&varname;(\[(%%)?(&varname;|\d+)\]|%%&varname;)*%|[0-9*#])!|!&varname;(\[(%%)?(&varname;|\d+)\]|%%&varname;)*(:~(%%&varname;|-?[0-9]+)(,(%%&varname;|-?[0-9]+))?|:[^=]+=[^!]*)?!" lookAhead="1"/> 0198 </context> 0199 <context attribute="Normal Text" lineEndContext="#pop" name="Variable"> 0200 <StringDetect attribute="Variable Expansion" String="%~" context="#pop!VariableModificator"/> 0201 <DetectChar attribute="Variable Expansion" char="%" context="#pop!VariableRegular1"/> 0202 <DetectChar attribute="Variable Expansion" char="!" context="#pop!VariableRegular2"/> 0203 </context> 0204 <!-- %~ --> 0205 <context attribute="Normal Text" lineEndContext="#pop" name="VariableModificator"> 0206 <AnyChar attribute="Variable Expansion" String="fdpnxsatz"/> 0207 <DetectChar attribute="Variable Expansion" char="$" context="#pop!VariableFind"/> 0208 <AnyChar attribute="Variable" String="0123456789#" context="#pop"/> 0209 </context> 0210 <!-- %~$ --> 0211 <context attribute="Normal Text" lineEndContext="#pop" name="VariableFind"> 0212 <DetectIdentifier attribute="Variable"/> 0213 <DetectChar attribute="Variable Expansion" char=":"/> 0214 <AnyChar attribute="Variable" String="0123456789#" context="#pop"/> 0215 <DetectChar attribute="Variable" char="."/> 0216 </context> 0217 <!-- % --> 0218 <context attribute="Normal Text" lineEndContext="#pop" name="VariableRegular1"> 0219 <DetectChar attribute="Variable Expansion" char="%" context="#pop"/> 0220 <DetectIdentifier attribute="Variable"/> 0221 <AnyChar attribute="Variable" String="0123456789*#" context="#pop"/> 0222 <StringDetect attribute="Variable Expansion" String=":~" context="#pop!VariableSub"/> 0223 <DetectChar attribute="Variable Expansion" char=":" context="#pop!VariableReplace1"/> 0224 <IncludeRules context="FindVariableRegularKey"/> 0225 <DetectChar attribute="Variable" char="."/> 0226 </context> 0227 <!-- ! --> 0228 <context attribute="Normal Text" lineEndContext="#pop" name="VariableRegular2"> 0229 <DetectChar attribute="Variable Expansion" char="!" context="#pop"/> 0230 <DetectIdentifier attribute="Variable"/> 0231 <StringDetect attribute="Variable Expansion" String=":~" context="#pop!VariableSub"/> 0232 <DetectChar attribute="Variable Expansion" char=":" context="#pop!VariableReplace2"/> 0233 <IncludeRules context="FindVariableRegularKey"/> 0234 <IncludeRules context="FindVariableRegularEscaped"/> 0235 <DetectChar attribute="Variable Expansion" char="%" context="VariableRegular1"/> 0236 <DetectChar attribute="Variable" char="."/> 0237 </context> 0238 <!-- %% in !var1%%var2! --> 0239 <context attribute="Normal Text" lineEndContext="#stay" name="FindVariableRegularEscaped"> 0240 <StringDetect attribute="Escape" String="%%" context="VariableRegularEscaped"/> 0241 </context> 0242 <context attribute="Normal Text" lineEndContext="#pop" name="VariableRegularEscaped"> 0243 <DetectIdentifier attribute="Variable" context="#pop"/> 0244 </context> 0245 <!-- for [ ... ] --> 0246 <context attribute="Normal Text" lineEndContext="#stay" name="FindVariableRegularKey"> 0247 <DetectChar attribute="Symbol" char="[" context="VariableRegularKey"/> 0248 </context> 0249 <!-- [ --> 0250 <context attribute="String" lineEndContext="#stay" name="VariableRegularKey"> 0251 <DetectChar attribute="Symbol" char="]" context="#pop"/> 0252 <StringDetect attribute="Escape" String="%%" context="VariableRegularKeyVar"/> 0253 <IncludeRules context="FindNumber"/> 0254 <DetectIdentifier attribute="String"/> 0255 </context> 0256 <context attribute="Normal Text" lineEndContext="#stay" name="VariableRegularKeyVar" fallthroughContext="#pop"> 0257 <DetectIdentifier attribute="Variable" context="#pop"/> 0258 </context> 0259 <!-- %var:~ and !var:~ --> 0260 <context attribute="Normal Text" lineEndContext="#pop" name="VariableSub"> 0261 <StringDetect attribute="Escape" String="%%"/> 0262 <AnyChar attribute="Variable Expansion" String="%!" context="#pop"/> 0263 <IncludeRules context="FindNumber"/> 0264 <DetectIdentifier attribute="Variable"/> 0265 <DetectChar attribute="Number" char="-"/> 0266 <DetectChar attribute="Variable Expansion" char=","/> 0267 <DetectChar attribute="Variable" char="."/> 0268 </context> 0269 <!-- %var: --> 0270 <context attribute="Normal Text" lineEndContext="#pop" name="VariableReplace1"> 0271 <RegExpr attribute="String" String="[^=]+" context="#pop!VariableReplace1Sep"/> 0272 </context> 0273 <context attribute="Normal Text" lineEndContext="#pop" name="VariableReplace1Sep"> 0274 <DetectChar attribute="Variable Expansion" char="=" context="#pop!VariableReplace1P2"/> 0275 </context> 0276 <context attribute="Normal Text" lineEndContext="#pop" name="VariableReplace1P2"> 0277 <DetectChar attribute="Variable Expansion" char="%" context="#pop"/> 0278 <RegExpr attribute="String" String="[^%]+"/> 0279 </context> 0280 <!-- !var: --> 0281 <context attribute="Normal Text" lineEndContext="#pop" name="VariableReplace2"> 0282 <RegExpr attribute="String" String="[^=]+" context="#pop!VariableReplace2Sep"/> 0283 </context> 0284 <context attribute="Normal Text" lineEndContext="#pop" name="VariableReplace2Sep"> 0285 <DetectChar attribute="Variable Expansion" char="=" context="#pop!VariableReplace2P2"/> 0286 </context> 0287 <context attribute="Normal Text" lineEndContext="#pop" name="VariableReplace2P2"> 0288 <DetectChar attribute="Variable Expansion" char="!" context="#pop"/> 0289 <RegExpr attribute="String" String="[^!]+"/> 0290 </context> 0291 0292 <!-- basic sub-contexts --> 0293 <context attribute="Comment" lineEndContext="#pop" name="Comment"> 0294 <DetectSpaces/> 0295 <IncludeRules context="##Comments"/> 0296 <DetectIdentifier/> 0297 <IncludeRules context="FindUnquotedStringEscape"/> 0298 <AnyChar attribute="Error" String="&|^<>()"/> 0299 </context> 0300 0301 <context attribute="String" lineEndContext="#pop" name="String"> 0302 <DetectSpaces attribute="String"/> 0303 <Detect2Chars attribute="Escape" char="\" char1="""/> 0304 <Detect2Chars attribute="Escape" char="\" char1="\"/> 0305 <DetectChar attribute="String" context="#pop" char="""/> 0306 <IncludeRules context="FindSubstitutions"/> 0307 <DetectIdentifier attribute="String"/> 0308 </context> 0309 0310 <context attribute="Normal Text" lineEndContext="#pop" name="Command"> 0311 <DetectSpaces/> 0312 <IncludeRules context="FindUnquotedString"/> 0313 <IncludeRules context="FindSpecialCommandOption"/> 0314 <DetectIdentifier/> 0315 </context> 0316 0317 <context attribute="Normal Text" lineEndContext="#pop" name="FindSpecialCommandOption"> 0318 <RegExpr attribute="Option" context="#stay" String="[/-][A-Za-z0-9][A-Za-z0-9_]*:?"/> 0319 <RegExpr attribute="Path" context="#stay" String="[.]+&eop;|[A-Za-z][A-Za-z.]*:(\\+&pathpart;*)*|&pathpart;*(\\+&pathpart;*)+"/> 0320 </context> 0321 0322 <context attribute="Error" lineEndContext="#pop" name="Label"> 0323 <RegExpr attribute="Label" context="Comment" String="&label;"/> 0324 </context> 0325 0326 <context attribute="Path" lineEndContext="#pop" name="Path"> 0327 <IncludeRules context="FindStrings"/> 0328 <IncludeRules context="FindSubstitutions"/> 0329 <AnyChar attribute="Normal Text" context="#pop" String=" 	\%/:*?"><|&" lookAhead="true"/> 0330 <DetectIdentifier/> 0331 </context> 0332 0333 <context attribute="Error" lineEndContext="#pop" name="Error"> 0334 </context> 0335 0336 <context attribute="Normal Text" lineEndContext="#pop" name="FindNumber"> 0337 <HlCHex attribute="Hex"/> 0338 <HlCOct attribute="Octal"/> 0339 <Int attribute="Number"/> 0340 </context> 0341 0342 <context attribute="Normal Text" lineEndContext="#pop" name="FindUnquotedStringEscape"> 0343 <LineContinue attribute="Escape" char="^"/> 0344 <RegExpr attribute="Escape" context="#stay" String="\^."/> 0345 </context> 0346 0347 <context attribute="Normal Text" lineEndContext="#pop" name="FindUnquotedString"> 0348 <IncludeRules context="FindStrings"/> 0349 <IncludeRules context="FindSubstitutions"/> 0350 <IncludeRules context="FindUnquotedStringEscape"/> 0351 <IncludeRules context="FindRedirections"/> 0352 <IncludeRules context="FindBranches"/> 0353 </context> 0354 0355 <context attribute="Normal Text" lineEndContext="#pop" name="UnquotedString"> 0356 <DetectSpaces/> 0357 <DetectIdentifier/> 0358 <IncludeRules context="FindUnquotedString"/> 0359 </context> 0360 0361 <!-- special sub-contexts --> 0362 <context attribute="Error" lineEndContext="#pop" name="CmdSet" fallthroughContext="#pop!Error"> 0363 <IncludeRules context="CmdSetVar"/> 0364 <WordDetect attribute="Option" context="#pop!CmdSetVar" String="/p" insensitive="1"/> 0365 <WordDetect attribute="Option" context="#pop!CmdSetExpr" String="/a" insensitive="1"/> 0366 </context> 0367 <context attribute="Error" lineEndContext="#pop" name="CmdSetVar" fallthroughContext="#pop!Error"> 0368 <DetectSpaces attribute="Normal Text"/> 0369 <DetectChar attribute="String" context="#pop!CmdSetQuotedVar" char="""/> 0370 <RegExpr attribute="Variable" context="#pop!CmdSetVar=" String="&varname_set;"/> 0371 <DetectChar attribute="Symbol" context="#pop!UnquotedString" char="="/> 0372 </context> 0373 <!-- set var --> 0374 <context attribute="Error" lineEndContext="#pop" name="CmdSetVar="> 0375 <DetectChar attribute="Symbol" context="#pop!UnquotedString" char="="/> 0376 <IncludeRules context="FindCmdSetVarSuffix"/> 0377 </context> 0378 <context attribute="Error" lineEndContext="#pop" name="FindCmdSetVarSuffix"> 0379 <DetectChar attribute="Variable Expansion" char="!"/> 0380 <DetectIdentifier attribute="Variable"/> 0381 <IncludeRules context="FindVariableRegularKey"/> 0382 </context> 0383 <!-- set " --> 0384 <context attribute="Error" lineEndContext="#pop" name="CmdSetQuotedVar" fallthroughContext="#pop!Error"> 0385 <RegExpr attribute="Variable" context="#pop!CmdSetQuotedVar=" String="&varname_set;"/> 0386 <DetectChar attribute="Symbol" context="#pop!String" char="="/> 0387 <DetectChar attribute="String" context="#pop" char="""/> 0388 </context> 0389 <!-- set "var --> 0390 <context attribute="Error" lineEndContext="#pop" name="CmdSetQuotedVar="> 0391 <DetectChar attribute="Symbol" context="#pop!String" char="="/> 0392 <IncludeRules context="FindCmdSetVarSuffix"/> 0393 <DetectChar attribute="String" context="#pop" char="""/> 0394 </context> 0395 0396 <!-- set /a --> 0397 <context attribute="Error" lineEndContext="#pop" name="CmdSetExpr" fallthroughContext="#pop!CmdSetUnquotedExpr"> 0398 <DetectSpaces attribute="Normal Text"/> 0399 <DetectChar attribute="String" context="CmdSetQuotedExpr" char="""/> 0400 <DetectIdentifier attribute="Variable" context="CmdSetUnquotedExpr"/> 0401 <DetectChar attribute="Keyword" char=","/> 0402 </context> 0403 <context attribute="Error" lineEndContext="#pop" name="CmdSetQuotedExpr"> 0404 <IncludeRules context="FindVariables"/> 0405 <StringDetect attribute="Operator" String="%%"/> 0406 <AnyChar attribute="Operator" String="=*/%+-&^|!~"/> 0407 <AnyChar attribute="Symbol" String="()[],"/> 0408 <DetectIdentifier attribute="Variable"/> 0409 <StringDetect attribute="Operator" String="<<"/> 0410 <StringDetect attribute="Operator" String=">>"/> 0411 <IncludeRules context="FindNumber"/> 0412 <DetectSpaces attribute="Normal Text"/> 0413 <DetectChar attribute="String" context="#pop" char="""/> 0414 </context> 0415 <context attribute="Error" lineEndContext="#pop" name="CmdSetUnquotedExpr"> 0416 <AnyChar attribute="Symbol" String="()[]"/> 0417 <IncludeRules context="FindUnquotedString"/> 0418 <AnyChar attribute="Operator" String="=+-/^*!"/> 0419 <DetectChar attribute="Keyword" context="#pop" char=","/> 0420 <DetectIdentifier attribute="Variable"/> 0421 <IncludeRules context="FindNumber"/> 0422 <DetectSpaces attribute="Normal Text"/> 0423 </context> 0424 0425 <!-- echo --> 0426 <context attribute="Echoed Text" lineEndContext="#pop" name="CmdEcho"> 0427 <RegExpr attribute="Builtin" context="#pop" String="echo\s+o(ff|n)\s*(?=[&|]|$)" insensitive="1"/> 0428 <StringDetect attribute="Builtin" context="#pop!CmdEcho2" String="echo" insensitive="1"/> 0429 </context> 0430 <context attribute="Echoed Text" lineEndContext="#pop" name="CmdEcho2"> 0431 <DetectSpaces/> 0432 <IncludeRules context="FindSubstitutions"/> 0433 <IncludeRules context="FindUnquotedStringEscape"/> 0434 <IncludeRules context="FindRedirections"/> 0435 <IncludeRules context="FindBranches"/> 0436 <DetectIdentifier/> 0437 </context> 0438 0439 <!-- goto --> 0440 <context attribute="Error" lineEndContext="#pop" name="CmdGoto"> 0441 <DetectSpaces attribute="Normal Text" context="#stay"/> 0442 <DetectChar attribute="Label" char=":"/> 0443 <RegExpr attribute="Label" context="#pop" String="&label;"/> 0444 </context> 0445 0446 <!-- call --> 0447 <context attribute="Error" lineEndContext="#pop" name="CmdCall" fallthroughContext="#pop!Command"> 0448 <DetectSpaces attribute="Normal Text" context="#stay"/> 0449 <DetectChar attribute="Label" char=":"/> 0450 <RegExpr attribute="Label" context="#pop!Command" String="&label;"/> 0451 </context> 0452 0453 0454 <!-- if --> 0455 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIf" fallthroughContext="CmdIfCond"> 0456 <DetectSpaces/> 0457 <StringDetect attribute="Option" String="/i" insensitive="1"/> 0458 <WordDetect attribute="Keyword" String="not" insensitive="1"/> 0459 </context> 0460 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCond" fallthroughContext="CmdIfCondCmp"> 0461 <WordDetect attribute="Option" context="CmdIfCondExist" String="exist" insensitive="1"/> 0462 <WordDetect attribute="Option" context="CmdIfCondDefined" String="defined" insensitive="1"/> 0463 <WordDetect attribute="Option" context="CmdIfCondNum" String="errorlevel" insensitive="1"/> 0464 <WordDetect attribute="Option" context="CmdIfCondNum" String="cmdextversion" insensitive="1"/> 0465 </context> 0466 0467 <!-- if exist --> 0468 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondExist" fallthroughContext="#pop#pop#pop"> 0469 <DetectSpaces context="CmdIfCondExistPath"/> 0470 </context> 0471 <context attribute="Path" lineEndContext="#pop" name="CmdIfCondExistPath" fallthroughContext="#pop#pop#pop#pop"> 0472 <DetectSpaces context="#pop#pop#pop#pop" attribute="Normal Text"/> 0473 <IncludeRules context="FindStrings"/> 0474 <IncludeRules context="FindSubstitutions"/> 0475 <DetectIdentifier/> 0476 </context> 0477 0478 <!-- if defined --> 0479 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondDefined" fallthroughContext="#pop#pop#pop"> 0480 <DetectSpaces/> 0481 <DetectIdentifier context="#pop#pop#pop" attribute="Variable"/> 0482 </context> 0483 0484 <!-- if errorlevel | if cmdextversion --> 0485 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondNum" fallthroughContext="#pop#pop#pop"> 0486 <DetectSpaces/> 0487 <Int context="#pop#pop#pop" attribute="Number"/> 0488 <IncludeRules context="FindVariables"/> 0489 </context> 0490 0491 <!-- For 0492 if xxx op yyy 0493 and 0494 if xxx==yyy 0495 --> 0496 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondCmp"> 0497 <DetectSpaces context="#pop!CmdIfCondCmpOp"/> 0498 <IncludeRules context="FindStrings"/> 0499 <IncludeRules context="FindSubstitutions"/> 0500 <DetectIdentifier/> 0501 <StringDetect String="==" attribute="Keyword" context="CmdIfCondCmpOperand2"/> 0502 </context> 0503 <!-- fallthroughContext for operand as option: if %CasseSensitive% "%a%"=="x" --> 0504 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondCmpOp" fallthroughContext="#pop#pop"> 0505 <keyword context="CmdIfCondCmpOpSpace" String="comparators" attribute="Keyword"/> 0506 </context> 0507 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondCmpOpSpace"> 0508 <DetectSpaces context="#pop!CmdIfCondCmpOperand2"/> 0509 <RegExpr String="[^\s]+" attribute="Error" /> 0510 </context> 0511 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondCmpOperand2"> 0512 <DetectSpaces context="#pop#pop#pop#pop"/> 0513 <IncludeRules context="FindStrings"/> 0514 <IncludeRules context="FindSubstitutions"/> 0515 <DetectIdentifier/> 0516 </context> 0517 0518 0519 <!-- 'for' sub-contexts --> 0520 <context attribute="Error" lineEndContext="#pop" name="CmdFor"> 0521 <DetectSpaces attribute="Normal Text"/> 0522 <RegExpr attribute="Variable" context="CmdForIn" String="%%[a-z#$@]" insensitive="1"/> 0523 <StringDetect attribute="Option" context="#stay" String="/d" insensitive="1"/> 0524 <StringDetect attribute="Option" context="CmdForR" String="/r" insensitive="1"/> 0525 <StringDetect attribute="Option" context="CmdForR" String="/f" insensitive="1"/> 0526 <StringDetect attribute="Option" context="CmdForL" String="/l" insensitive="1"/> 0527 </context> 0528 0529 <context attribute="Error" lineEndContext="#pop" name="CmdForIn"> 0530 <DetectSpaces attribute="Normal Text" context="#stay"/> 0531 <WordDetect attribute="Keyword" context="CmdForList" String="in" insensitive="1"/> 0532 </context> 0533 0534 <context attribute="Error" lineEndContext="#pop" name="CmdForList"> 0535 <DetectSpaces attribute="Normal Text" context="#stay"/> 0536 <DetectChar attribute="Keyword" context="CmdForListBody" char="("/> 0537 </context> 0538 0539 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForListBody" fallthroughContext="#pop!CmdForListBodyText"> 0540 <DetectSpaces/> 0541 <AnyChar String="`'" context="#pop!CmdForListBodyStartCmd"/> 0542 </context> 0543 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForListBodyStartCmd" fallthroughContext="#pop!CmdForListBodyText"> 0544 <DetectSpaces/> 0545 <keyword attribute="Builtin" context="#pop!CmdForListBodyCmd" String="builtins"/> 0546 <keyword attribute="Command" context="#pop!CmdForListBodyCmd" String="commands"/> 0547 <RegExpr attribute="Path" context="#pop!CmdForListBodyCmd" String="[^\s%!;*?"><|&]+"/> 0548 </context> 0549 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForListBodyCmd"> 0550 <DetectSpaces/> 0551 <DetectIdentifier/> 0552 <IncludeRules context="FindStrings"/> 0553 <IncludeRules context="FindSubstitutions"/> 0554 <StringDetect attribute="Escape" context="#pop!CmdForListBodyStartCmd" String="^|"/> 0555 <StringDetect attribute="Escape" context="#pop!CmdForListBodyStartCmd" String="^&"/> 0556 <IncludeRules context="FindUnquotedStringEscape"/> 0557 <IncludeRules context="FindRedirections"/> 0558 <IncludeRules context="FindSpecialCommandOption"/> 0559 <DetectChar attribute="Keyword" context="CmdForDo" char=")"/> 0560 <AnyChar attribute="Error" String="&|^<>()"/> 0561 </context> 0562 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForListBodyText"> 0563 <DetectSpaces/> 0564 <DetectIdentifier/> 0565 <IncludeRules context="FindStrings"/> 0566 <IncludeRules context="FindSubstitutions"/> 0567 <DetectChar attribute="Keyword" context="CmdForDo" char=")"/> 0568 </context> 0569 0570 <context attribute="Error" lineEndContext="#pop" name="CmdForDo"> 0571 <DetectSpaces attribute="Normal Text" context="#stay"/> 0572 <WordDetect attribute="Keyword" context="#pop#pop#pop#pop#pop" String="do" insensitive="1"/> 0573 </context> 0574 0575 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForR"> 0576 <DetectSpaces attribute="Normal Text"/> 0577 <IncludeRules context="FindStrings"/> 0578 <IncludeRules context="FindUnquotedStringEscape"/> 0579 <RegExpr attribute="Path" String="([a-z][a-z.]*:)?[.]*\\*[^^\s\\%!;/:*?"><|&%]*&eop;" insensitive="1"/> 0580 <DetectIdentifier attribute="Normal Text"/> 0581 <RegExpr attribute="Variable" context="#pop!CmdForIn" String="%%[a-z#$@](?=[$\s])" insensitive="1"/> 0582 <IncludeRules context="FindSubstitutions"/> 0583 </context> 0584 0585 <!-- 'for /L' sub-contexts --> 0586 <context attribute="Error" lineEndContext="#pop" name="CmdForL"> 0587 <DetectSpaces attribute="Normal Text" context="#stay"/> 0588 <RegExpr attribute="Variable" context="CmdForLIn" String="%%[a-z#$@]" insensitive="1"/> 0589 </context> 0590 0591 <context attribute="Error" lineEndContext="#pop" name="CmdForLIn"> 0592 <DetectSpaces attribute="Normal Text" context="#stay"/> 0593 <WordDetect attribute="Keyword" context="CmdForLRange" String="in" insensitive="1"/> 0594 </context> 0595 0596 <context attribute="Error" lineEndContext="#pop" name="CmdForLRange"> 0597 <DetectSpaces attribute="Normal Text" context="#stay"/> 0598 <DetectChar attribute="Keyword" context="CmdForLStart" char="("/> 0599 </context> 0600 0601 <context attribute="Error" lineEndContext="#pop" name="CmdForLStart"> 0602 <DetectSpaces attribute="Normal Text"/> 0603 <AnyChar attribute="Keyword" String=";,="/> 0604 <DetectChar attribute="Number" char="-"/> 0605 <IncludeRules context="FindNumber"/> 0606 <IncludeRules context="FindVariables"/> 0607 <DetectChar attribute="Keyword" context="#pop!CmdForDo" char=")"/> 0608 <DetectIdentifier attribute="String"/> 0609 </context> 0610 0611 </contexts> 0612 0613 <itemDatas> 0614 <itemData name="Normal Text" defStyleNum="dsNormal"/> 0615 <itemData name="Comment" defStyleNum="dsComment"/> 0616 <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> 0617 <itemData name="ControlFlow" defStyleNum="dsControlFlow" spellChecking="false"/> 0618 <itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/> 0619 <itemData name="Label" defStyleNum="dsOthers"/> 0620 <itemData name="Builtin" defStyleNum="dsBuiltIn"/> 0621 <itemData name="Command" defStyleNum="dsKeyword"/> 0622 <itemData name="Redirection" defStyleNum="dsKeyword" spellChecking="false"/> 0623 <itemData name="String" defStyleNum="dsString"/> 0624 <itemData name="Escape" defStyleNum="dsSpecialChar" spellChecking="false"/> 0625 <itemData name="Echoed Text" defStyleNum="dsNormal"/> 0626 <itemData name="Variable" defStyleNum="dsVariable"/> 0627 <itemData name="Variable Expansion" defStyleNum="dsPreprocessor" spellChecking="false"/> 0628 <itemData name="Path" defStyleNum="dsNormal"/> 0629 <itemData name="Option" defStyleNum="dsAttribute" spellChecking="false"/> 0630 <itemData name="Error" defStyleNum="dsError" spellChecking="false"/> 0631 <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/> 0632 <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/> 0633 <itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false"/> 0634 <itemData name="Operator" defStyleNum="dsOperator" spellChecking="false"/> 0635 </itemDatas> 0636 </highlighting> 0637 <general> 0638 <comments> 0639 <comment name="singleLine" start="rem "/> 0640 </comments> 0641 <keywords casesensitive="0" additionalDeliminator="@"/> 0642 </general> 0643 </language> 0644 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->