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="8" 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 <RegExpr attribute="Escape" context="#stay" String="\^."/> 0344 </context> 0345 0346 <context attribute="Normal Text" lineEndContext="#pop" name="FindUnquotedString"> 0347 <IncludeRules context="FindStrings"/> 0348 <IncludeRules context="FindSubstitutions"/> 0349 <IncludeRules context="FindUnquotedStringEscape"/> 0350 <IncludeRules context="FindRedirections"/> 0351 <IncludeRules context="FindBranches"/> 0352 </context> 0353 0354 <context attribute="Normal Text" lineEndContext="#pop" name="UnquotedString"> 0355 <DetectSpaces/> 0356 <DetectIdentifier/> 0357 <IncludeRules context="FindUnquotedString"/> 0358 </context> 0359 0360 <!-- special sub-contexts --> 0361 <context attribute="Error" lineEndContext="#pop" name="CmdSet" fallthroughContext="#pop!Error"> 0362 <IncludeRules context="CmdSetVar"/> 0363 <WordDetect attribute="Option" context="#pop!CmdSetVar" String="/p" insensitive="1"/> 0364 <WordDetect attribute="Option" context="#pop!CmdSetExpr" String="/a" insensitive="1"/> 0365 </context> 0366 <context attribute="Error" lineEndContext="#pop" name="CmdSetVar" fallthroughContext="#pop!Error"> 0367 <DetectSpaces attribute="Normal Text"/> 0368 <DetectChar attribute="String" context="#pop!CmdSetQuotedVar" char="""/> 0369 <RegExpr attribute="Variable" context="#pop!CmdSetVar=" String="&varname_set;"/> 0370 <DetectChar attribute="Symbol" context="#pop!UnquotedString" char="="/> 0371 </context> 0372 <!-- set var --> 0373 <context attribute="Error" lineEndContext="#pop" name="CmdSetVar="> 0374 <DetectChar attribute="Symbol" context="#pop!UnquotedString" char="="/> 0375 <IncludeRules context="FindCmdSetVarSuffix"/> 0376 </context> 0377 <context attribute="Error" lineEndContext="#pop" name="FindCmdSetVarSuffix"> 0378 <DetectChar attribute="Variable Expansion" char="!"/> 0379 <DetectIdentifier attribute="Variable"/> 0380 <IncludeRules context="FindVariableRegularKey"/> 0381 </context> 0382 <!-- set " --> 0383 <context attribute="Error" lineEndContext="#pop" name="CmdSetQuotedVar" fallthroughContext="#pop!Error"> 0384 <RegExpr attribute="Variable" context="#pop!CmdSetQuotedVar=" String="&varname_set;"/> 0385 <DetectChar attribute="Symbol" context="#pop!String" char="="/> 0386 <DetectChar attribute="String" context="#pop" char="""/> 0387 </context> 0388 <!-- set "var --> 0389 <context attribute="Error" lineEndContext="#pop" name="CmdSetQuotedVar="> 0390 <DetectChar attribute="Symbol" context="#pop!String" char="="/> 0391 <IncludeRules context="FindCmdSetVarSuffix"/> 0392 <DetectChar attribute="String" context="#pop" char="""/> 0393 </context> 0394 0395 <!-- set /a --> 0396 <context attribute="Error" lineEndContext="#pop" name="CmdSetExpr" fallthroughContext="#pop!CmdSetUnquotedExpr"> 0397 <DetectSpaces attribute="Normal Text"/> 0398 <DetectChar attribute="String" context="CmdSetQuotedExpr" char="""/> 0399 <DetectIdentifier attribute="Variable" context="CmdSetUnquotedExpr"/> 0400 <DetectChar attribute="Keyword" char=","/> 0401 </context> 0402 <context attribute="Error" lineEndContext="#pop" name="CmdSetQuotedExpr"> 0403 <IncludeRules context="FindVariables"/> 0404 <StringDetect attribute="Operator" String="%%"/> 0405 <AnyChar attribute="Operator" String="=*/%+-&^|!~"/> 0406 <AnyChar attribute="Symbol" String="()[],"/> 0407 <DetectIdentifier attribute="Variable"/> 0408 <StringDetect attribute="Operator" String="<<"/> 0409 <StringDetect attribute="Operator" String=">>"/> 0410 <IncludeRules context="FindNumber"/> 0411 <DetectSpaces attribute="Normal Text"/> 0412 <DetectChar attribute="String" context="#pop" char="""/> 0413 </context> 0414 <context attribute="Error" lineEndContext="#pop" name="CmdSetUnquotedExpr"> 0415 <AnyChar attribute="Symbol" String="()[]"/> 0416 <IncludeRules context="FindUnquotedString"/> 0417 <AnyChar attribute="Operator" String="=+-/^*!"/> 0418 <DetectChar attribute="Keyword" context="#pop" char=","/> 0419 <DetectIdentifier attribute="Variable"/> 0420 <IncludeRules context="FindNumber"/> 0421 <DetectSpaces attribute="Normal Text"/> 0422 </context> 0423 0424 <!-- echo --> 0425 <context attribute="Echoed Text" lineEndContext="#pop" name="CmdEcho"> 0426 <RegExpr attribute="Builtin" context="#pop" String="echo\s+o(ff|n)\s*(?=[&|]|$)" insensitive="1"/> 0427 <StringDetect attribute="Builtin" context="#pop!CmdEcho2" String="echo" insensitive="1"/> 0428 </context> 0429 <context attribute="Echoed Text" lineEndContext="#pop" name="CmdEcho2"> 0430 <DetectSpaces/> 0431 <IncludeRules context="FindSubstitutions"/> 0432 <IncludeRules context="FindUnquotedStringEscape"/> 0433 <IncludeRules context="FindRedirections"/> 0434 <IncludeRules context="FindBranches"/> 0435 <DetectIdentifier/> 0436 </context> 0437 0438 <!-- goto --> 0439 <context attribute="Error" lineEndContext="#pop" name="CmdGoto"> 0440 <DetectSpaces attribute="Normal Text" context="#stay"/> 0441 <DetectChar attribute="Label" char=":"/> 0442 <RegExpr attribute="Label" context="#pop" String="&label;"/> 0443 </context> 0444 0445 <!-- call --> 0446 <context attribute="Error" lineEndContext="#pop" name="CmdCall" fallthroughContext="#pop!Command"> 0447 <DetectSpaces attribute="Normal Text" context="#stay"/> 0448 <DetectChar attribute="Label" char=":"/> 0449 <RegExpr attribute="Label" context="#pop!Command" String="&label;"/> 0450 </context> 0451 0452 0453 <!-- if --> 0454 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIf" fallthroughContext="CmdIfCond"> 0455 <DetectSpaces/> 0456 <StringDetect attribute="Option" String="/i" insensitive="1"/> 0457 <WordDetect attribute="Keyword" String="not" insensitive="1"/> 0458 </context> 0459 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCond" fallthroughContext="CmdIfCondCmp"> 0460 <WordDetect attribute="Option" context="CmdIfCondExist" String="exist" insensitive="1"/> 0461 <WordDetect attribute="Option" context="CmdIfCondDefined" String="defined" insensitive="1"/> 0462 <WordDetect attribute="Option" context="CmdIfCondNum" String="errorlevel" insensitive="1"/> 0463 <WordDetect attribute="Option" context="CmdIfCondNum" String="cmdextversion" insensitive="1"/> 0464 </context> 0465 0466 <!-- if exist --> 0467 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondExist" fallthroughContext="#pop#pop#pop"> 0468 <DetectSpaces context="CmdIfCondExistPath"/> 0469 </context> 0470 <context attribute="Path" lineEndContext="#pop" name="CmdIfCondExistPath" fallthroughContext="#pop#pop#pop#pop"> 0471 <DetectSpaces context="#pop#pop#pop#pop" attribute="Normal Text"/> 0472 <IncludeRules context="FindStrings"/> 0473 <IncludeRules context="FindSubstitutions"/> 0474 <DetectIdentifier/> 0475 </context> 0476 0477 <!-- if defined --> 0478 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondDefined" fallthroughContext="#pop#pop#pop"> 0479 <DetectSpaces/> 0480 <DetectIdentifier context="#pop#pop#pop" attribute="Variable"/> 0481 </context> 0482 0483 <!-- if errorlevel | if cmdextversion --> 0484 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondNum" fallthroughContext="#pop#pop#pop"> 0485 <DetectSpaces/> 0486 <Int context="#pop#pop#pop" attribute="Number"/> 0487 <IncludeRules context="FindVariables"/> 0488 </context> 0489 0490 <!-- For 0491 if xxx op yyy 0492 and 0493 if xxx==yyy 0494 --> 0495 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondCmp"> 0496 <DetectSpaces context="#pop!CmdIfCondCmpOp"/> 0497 <IncludeRules context="FindStrings"/> 0498 <IncludeRules context="FindSubstitutions"/> 0499 <DetectIdentifier/> 0500 <StringDetect String="==" attribute="Keyword" context="CmdIfCondCmpOperand2"/> 0501 </context> 0502 <!-- fallthroughContext for operand as option: if %CasseSensitive% "%a%"=="x" --> 0503 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondCmpOp" fallthroughContext="#pop#pop"> 0504 <keyword context="CmdIfCondCmpOpSpace" String="comparators" attribute="Keyword"/> 0505 </context> 0506 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondCmpOpSpace"> 0507 <DetectSpaces context="#pop!CmdIfCondCmpOperand2"/> 0508 <RegExpr String="[^\s]+" attribute="Error" /> 0509 </context> 0510 <context attribute="Normal Text" lineEndContext="#pop" name="CmdIfCondCmpOperand2"> 0511 <DetectSpaces context="#pop#pop#pop#pop"/> 0512 <IncludeRules context="FindStrings"/> 0513 <IncludeRules context="FindSubstitutions"/> 0514 <DetectIdentifier/> 0515 </context> 0516 0517 0518 <!-- 'for' sub-contexts --> 0519 <context attribute="Error" lineEndContext="#pop" name="CmdFor"> 0520 <DetectSpaces attribute="Normal Text"/> 0521 <RegExpr attribute="Variable" context="CmdForIn" String="%%[a-z#$@]" insensitive="1"/> 0522 <StringDetect attribute="Option" context="#stay" String="/d" insensitive="1"/> 0523 <StringDetect attribute="Option" context="CmdForR" String="/r" insensitive="1"/> 0524 <StringDetect attribute="Option" context="CmdForR" String="/f" insensitive="1"/> 0525 <StringDetect attribute="Option" context="CmdForL" String="/l" insensitive="1"/> 0526 </context> 0527 0528 <context attribute="Error" lineEndContext="#pop" name="CmdForIn"> 0529 <DetectSpaces attribute="Normal Text" context="#stay"/> 0530 <WordDetect attribute="Keyword" context="CmdForList" String="in" insensitive="1"/> 0531 </context> 0532 0533 <context attribute="Error" lineEndContext="#pop" name="CmdForList"> 0534 <DetectSpaces attribute="Normal Text" context="#stay"/> 0535 <DetectChar attribute="Keyword" context="CmdForListBody" char="("/> 0536 </context> 0537 0538 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForListBody" fallthroughContext="#pop!CmdForListBodyText"> 0539 <DetectSpaces/> 0540 <AnyChar String="`'" context="#pop!CmdForListBodyStartCmd"/> 0541 </context> 0542 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForListBodyStartCmd" fallthroughContext="#pop!CmdForListBodyText"> 0543 <DetectSpaces/> 0544 <keyword attribute="Builtin" context="#pop!CmdForListBodyCmd" String="builtins"/> 0545 <keyword attribute="Command" context="#pop!CmdForListBodyCmd" String="commands"/> 0546 <RegExpr attribute="Path" context="#pop!CmdForListBodyCmd" String="[^\s%!;*?"><|&]+"/> 0547 </context> 0548 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForListBodyCmd"> 0549 <DetectSpaces/> 0550 <DetectIdentifier/> 0551 <IncludeRules context="FindStrings"/> 0552 <IncludeRules context="FindSubstitutions"/> 0553 <StringDetect attribute="Escape" context="#pop!CmdForListBodyStartCmd" String="^|"/> 0554 <StringDetect attribute="Escape" context="#pop!CmdForListBodyStartCmd" String="^&"/> 0555 <IncludeRules context="FindUnquotedStringEscape"/> 0556 <IncludeRules context="FindRedirections"/> 0557 <IncludeRules context="FindSpecialCommandOption"/> 0558 <DetectChar attribute="Keyword" context="CmdForDo" char=")"/> 0559 <AnyChar attribute="Error" String="&|^<>()"/> 0560 </context> 0561 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForListBodyText"> 0562 <DetectSpaces/> 0563 <DetectIdentifier/> 0564 <IncludeRules context="FindStrings"/> 0565 <IncludeRules context="FindSubstitutions"/> 0566 <DetectChar attribute="Keyword" context="CmdForDo" char=")"/> 0567 </context> 0568 0569 <context attribute="Error" lineEndContext="#pop" name="CmdForDo"> 0570 <DetectSpaces attribute="Normal Text" context="#stay"/> 0571 <WordDetect attribute="Keyword" context="#pop#pop#pop#pop#pop" String="do" insensitive="1"/> 0572 </context> 0573 0574 <context attribute="Normal Text" lineEndContext="#pop" name="CmdForR"> 0575 <DetectSpaces attribute="Normal Text"/> 0576 <IncludeRules context="FindStrings"/> 0577 <IncludeRules context="FindUnquotedStringEscape"/> 0578 <RegExpr attribute="Path" String="([a-z][a-z.]*:)?[.]*\\*[^^\s\\%!;/:*?"><|&%]*&eop;" insensitive="1"/> 0579 <DetectIdentifier attribute="Normal Text"/> 0580 <RegExpr attribute="Variable" context="#pop!CmdForIn" String="%%[a-z#$@](?=[$\s])" insensitive="1"/> 0581 <IncludeRules context="FindSubstitutions"/> 0582 </context> 0583 0584 <!-- 'for /L' sub-contexts --> 0585 <context attribute="Error" lineEndContext="#pop" name="CmdForL"> 0586 <DetectSpaces attribute="Normal Text" context="#stay"/> 0587 <RegExpr attribute="Variable" context="CmdForLIn" String="%%[a-z#$@]" insensitive="1"/> 0588 </context> 0589 0590 <context attribute="Error" lineEndContext="#pop" name="CmdForLIn"> 0591 <DetectSpaces attribute="Normal Text" context="#stay"/> 0592 <WordDetect attribute="Keyword" context="CmdForLRange" String="in" insensitive="1"/> 0593 </context> 0594 0595 <context attribute="Error" lineEndContext="#pop" name="CmdForLRange"> 0596 <DetectSpaces attribute="Normal Text" context="#stay"/> 0597 <DetectChar attribute="Keyword" context="CmdForLStart" char="("/> 0598 </context> 0599 0600 <context attribute="Error" lineEndContext="#pop" name="CmdForLStart"> 0601 <DetectSpaces attribute="Normal Text"/> 0602 <AnyChar attribute="Keyword" String=";,="/> 0603 <DetectChar attribute="Number" char="-"/> 0604 <IncludeRules context="FindNumber"/> 0605 <IncludeRules context="FindVariables"/> 0606 <DetectChar attribute="Keyword" context="#pop!CmdForDo" char=")"/> 0607 <DetectIdentifier attribute="String"/> 0608 </context> 0609 0610 </contexts> 0611 0612 <itemDatas> 0613 <itemData name="Normal Text" defStyleNum="dsNormal"/> 0614 <itemData name="Comment" defStyleNum="dsComment"/> 0615 <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> 0616 <itemData name="ControlFlow" defStyleNum="dsControlFlow" spellChecking="false"/> 0617 <itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/> 0618 <itemData name="Label" defStyleNum="dsOthers"/> 0619 <itemData name="Builtin" defStyleNum="dsBuiltIn"/> 0620 <itemData name="Command" defStyleNum="dsKeyword"/> 0621 <itemData name="Redirection" defStyleNum="dsKeyword" spellChecking="false"/> 0622 <itemData name="String" defStyleNum="dsString"/> 0623 <itemData name="Escape" defStyleNum="dsSpecialChar" spellChecking="false"/> 0624 <itemData name="Echoed Text" defStyleNum="dsNormal"/> 0625 <itemData name="Variable" defStyleNum="dsVariable"/> 0626 <itemData name="Variable Expansion" defStyleNum="dsPreprocessor" spellChecking="false"/> 0627 <itemData name="Path" defStyleNum="dsNormal"/> 0628 <itemData name="Option" defStyleNum="dsAttribute" spellChecking="false"/> 0629 <itemData name="Error" defStyleNum="dsError" spellChecking="false"/> 0630 <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/> 0631 <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/> 0632 <itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false"/> 0633 <itemData name="Operator" defStyleNum="dsOperator" spellChecking="false"/> 0634 </itemDatas> 0635 </highlighting> 0636 <general> 0637 <comments> 0638 <comment name="singleLine" start="rem "/> 0639 </comments> 0640 <keywords casesensitive="0" additionalDeliminator="@"/> 0641 </general> 0642 </language> 0643 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->