Warning, /frameworks/syntax-highlighting/data/syntax/4dos.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 "[a-zA-Z_][a-zA-Z_0-9]*"> <!-- so sehen Labels aus --> 0005 <!ENTITY varname "(?:[a-z_]\w*|[0-9]*[&])"> <!-- valid character in a variable name --> 0006 <!ENTITY pathpart "[^"*=/:<>?\\[\]\|]"> <!-- valid character in a file name --> 0007 <!ENTITY tasten "(?:(?:Strg|Alt|Shift)-)?(?:[a-z0-9]|F[1-9]|F1[0-2]|Esc|Bksp|Tab|Enter|Up|Down|Left|Right|PgUp|PgDn|Home|End|Ins|Del)"> 0008 ]> 0009 <language name="4DOS BatchToMemory" kateversion="5.0" version="10" section="Scripts" extensions="*.btm" casesensitive="0" indenter="cstyle" author="Stefan Huebner (st0ff@npl.de)" license="LGPL"> 0010 <!--DONE: 0011 - comments are there 0012 - substitutions are there 0013 - basic variable function handling, distinguishing the function result between numerical and string 0014 - variables are there (somehow) 0015 - numbers will be found 0016 - escape characters are found and highlit 0017 - jumps, gosubs and labels 0018 - command grouping 0019 - conditions 0020 - redirection 0021 - many different command handlings 0022 - iff 0023 - echo 0024 - text/endtext 0025 - set/unset 0026 - input/inkey 0027 - do 0028 - for 0029 - switch 0030 - internal commands of 4DOS 0031 TODO: 0032 - if someone finds that PATH-detection makes sense: create it... 0033 - whatever doesn't seem to be correctly lit after all the preceeding stuff ... 0034 - follow the TODO-Marks 0035 --> 0036 <highlighting> 0037 <list name="HighlightInsideComment"> 0038 <item>todo</item> 0039 <item>attention</item> 0040 <item>attn</item> 0041 <item>fixme</item> 0042 <item>achtung</item> 0043 <item>info</item> 0044 </list> 0045 <list name="IntFunctions"> 0046 <item>DOSMEM</item> <!-- b|k|m--> 0047 <item>EMS</item> <!-- b|k|m--> 0048 <item>EXTENDED</item> <!-- b|k|m--> 0049 <item>XMS</item> <!-- b|k|m--> 0050 <item>CDROM</item> <!--string--> 0051 <item>CLUSTSIZE</item> <!--string--> 0052 <item>CODEPAGE</item> <!--string--> 0053 <item>COM</item> <!-- int--> 0054 <item>DEVICE</item> <!--string--> 0055 <item>DISKFREE</item> <!--string, b|k|m--> 0056 <item>DISKTOTAL</item> <!--string, b|k|m--> 0057 <item>DISKUSED</item> <!--string, b|k|m--> 0058 <item>DRIVETYPE</item> <!--string--> 0059 <item>HDDSIZE</item> <!--string, b|k|m--> 0060 <item>LPT</item> <!-- int--> 0061 <item>READY</item> <!--string--> 0062 <item>REMOTE</item> <!--string--> 0063 <item>REMOVABLE</item> <!--string--> 0064 <item>ATTRIB</item> <!--string,-n|r|h|s|a|d,p]--><!--ATTENTION : nur mit 2 Parametern wird ein Int returned--> 0065 <item>COMPARE</item> <!--string--> 0066 <item>FILEAGE</item> <!--string,a|c|w]--> 0067 <item>FILECLOSE</item> <!-- int--> 0068 <item>FILEOPEN</item> <!--string, r|w|a,b|t]--> 0069 <item>FILEREAD</item> <!-- int, int]--> 0070 <item>FILEREADB</item> <!-- int, int--> 0071 <item>FILES</item> <!--string,-n|r|h|s|a|d]--> 0072 <item>FILESEEK</item> <!-- int, int, int--> 0073 <item>FILESEEKL</item> <!-- int, int--> 0074 <item>FILESIZE</item> <!--string,char,char]]--> 0075 <item>FILEWRITE</item> <!-- int,string--> 0076 <item>FILEWRITEB</item> <!-- int, int,string--> 0077 <item>FINDCLOSE</item> <!--string--> 0078 <item>LINES</item> <!--string--> 0079 <item>ASCII</item> <!-- char--> 0080 <item>COUNT</item> <!-- char,string--> 0081 <item>FIELDS</item> <!--"string",]string--> 0082 <item>INDEX</item> <!--string,string,int]--> 0083 <item>ISALNUM</item> <!--string--> 0084 <item>ISALPHA</item> <!--string--> 0085 <item>ISASCII</item> <!--string--> 0086 <item>ISCNTRL</item> <!--string--> 0087 <item>ISDIGIT</item> <!--string--> 0088 <item>ISLOWER</item> <!--string--> 0089 <item>ISPRINT</item> <!--string--> 0090 <item>ISPUNCT</item> <!--string--> 0091 <item>ISSPACE</item> <!--string--> 0092 <item>ISUPPER</item> <!--string--> 0093 <item>ISXDIGIT</item> <!--string--> 0094 <item>LEN</item> <!--string--> 0095 <item>SIMILAR</item> <!--string,string--> 0096 <item>WILD</item> <!--string,string--> 0097 <item>WORDS</item> <!--"string",]string--> 0098 <item>ABS</item> <!-- float--> 0099 <item>AVERAGE</item> <!-- float,float,float...]]]--> 0100 <item>CEILING</item> <!-- float--> 0101 <item>CONVERT</item> <!-- int, int, int--> 0102 <item>DEC</item> <!--expression--> 0103 <item>DECIMAL</item> <!-- float--> 0104 <item>DIGITS</item> <!--string--> 0105 <item>EVAL</item> <!--expression--> 0106 <item>FLOOR</item> <!-- float--> 0107 <item>INC</item> <!--expression--> 0108 <item>INT</item> <!-- float--> 0109 <item>MAX</item> <!-- float,float,float...]]]--> 0110 <item>MIN</item> <!-- float,float,float...]]]--> 0111 <item>NUMERIC</item> <!--string--> 0112 <item>RANDOM</item> <!-- float,float--> 0113 <item>DATE</item> <!-- date--> 0114 <item>DAY</item> <!-- date--> 0115 <item>DOWI</item> <!-- date--> 0116 <item>DOY</item> <!-- date--> 0117 <item>ISODOWI</item> <!-- date--> 0118 <item>ISOWEEK</item> <!-- date--> 0119 <item>ISOWYEAR</item> <!-- date--> 0120 <item>MAKEAGE</item> <!-- date,time]--> 0121 <item>MONTH</item> <!-- date--> 0122 <item>TIME</item> <!-- time--> 0123 <item>YEAR</item> <!-- date--> 0124 <item>EXEC</item> <!--expression--> 0125 <item>INIWRITE</item> <!--string,string,string,string--> 0126 </list> 0127 <list name="StringFunctions"> 0128 <item>DDCSTR</item> <!-- int--> 0129 <item>MASTER</item> <!--string--> 0130 <item>READSCR</item> <!-- int, int, int--> 0131 <item>SMBSTR</item> <!-- int, int--> 0132 <item>CWD</item> <!--string--> 0133 <item>CWDS</item> <!--string--> 0134 <item>FSTYPE</item> <!--string--> 0135 <item>LABEL</item> <!--string--> 0136 <item>SERIAL</item> <!--string--> 0137 <item>ATTRIB</item> <!--string--><!--ATTENTION : nur mit 1 Parameter wird ein String returned--> 0138 <item>FILEDATE</item> <!--string,acw],n]]--> 0139 <item>FILETIME</item> <!--string,acw],s]]--> 0140 <item>FINDFIRST</item> <!--string,-n|r|h|s|a|d]--> 0141 <item>FINDNEXT</item> <!--string,-n|r|h|s|a|d]--> 0142 <item>LINE</item> <!--string, int--> 0143 <item>MD5</item> <!--string--> 0144 <item>SEARCH</item> <!--string,string]--> 0145 <item>SHA1</item> <!--string--> 0146 <item>TRUENAME</item> <!--string--> 0147 <item>UNIQUE</item> <!--string--> 0148 <item>ALTNAME</item> <!--string--> 0149 <item>EXPAND</item> <!--string,-n|r|h|s|a|d]--> 0150 <item>EXT</item> <!--string--> 0151 <item>FILENAME</item> <!--string--> 0152 <item>FULL</item> <!--string--> 0153 <item>LFN</item> <!--string--> 0154 <item>NAME</item> <!--string--> 0155 <item>PATH</item> <!--string--> 0156 <item>QUOTE</item> <!--string--> 0157 <item>SFN</item> <!--string--> 0158 <item>UNQUOTE</item> <!--string--> 0159 <item>UNQUOTES</item> <!--string--> 0160 <item>ASCII</item> <!--string--> 0161 <item>CAPS</item> <!--"string",string--> 0162 <item>CHAR</item> <!--space-delimited list of int--> 0163 <item>FIELD</item> <!--"string",] int,string--> 0164 <item>FORMAT</item> <!--string,string--> 0165 <item>INSERT</item> <!-- int,string,string--> 0166 <item>INSTR</item> <!-- int, int,string--> 0167 <item>LCS</item> <!--string,string--> 0168 <item>LEFT</item> <!-- int,string--> 0169 <item>LOWER</item> <!--string--> 0170 <item>LTRIM</item> <!--string,string--> 0171 <item>REPEAT</item> <!-- char, int--> 0172 <item>REPLACE</item> <!--string,string,string--> 0173 <item>RIGHT</item> <!-- int,string--> 0174 <item>RTRIM</item> <!--string,string--> 0175 <item>REVERSE</item> <!--string--> 0176 <item>STRIP</item> <!--string,string--> 0177 <item>SUBST</item> <!-- int,string,string--> 0178 <item>SUBSTR</item> <!-- int, int,string--> 0179 <item>TRIM</item> <!--string--> 0180 <item>UPPER</item> <!--string--> 0181 <item>WORD</item> <!--"string",]n,string--> 0182 <item>COMMA</item> <!-- float--> 0183 <item>AGEDATE</item> <!-- int,format]--> 0184 <item>DATECONV</item> <!--string,format]--> 0185 <item>DOW</item> <!-- date--> 0186 <item>DOWF</item> <!-- date--> 0187 <item>MAKEDATE</item> <!-- int--> 0188 <item>MAKETIME</item> <!-- int--> 0189 <item>MONTHF</item> <!-- date--> 0190 <item>ALIAS</item> <!--string--> 0191 <item>CLIP</item> <!--string--> 0192 <item>CLIPW</item> <!--string--> 0193 <item>EXECSTR</item> <!--string--> 0194 <item>FUNCTION</item> <!--string--> 0195 <item>HISTORY</item> <!-- int, int]--> 0196 <item>IF</item> <!--condition,string,string--> 0197 <item>INIREAD</item> <!--string,string,string--> 0198 <item>SELECT</item> <!--string, int, int, int, int,string--> 0199 <item>TIMER</item> <!-- int--> 0200 </list> 0201 <list name="IfCommand"> <item>if</item> </list> 0202 <list name="IffCommand"> <item>iff</item> </list> 0203 <list name="TextCommand"> <item>text</item> </list> 0204 <list name="InputCommand"> <item>input</item> </list> 0205 <list name="InkeyCommand"> <item>inkey</item> </list> 0206 <list name="DoCommand"> <item>do</item> </list> 0207 <list name="EnddoCommand"> <item>enddo</item> </list> 0208 <list name="SkipdoCommand"> 0209 <item>iterate</item> 0210 <item>leave</item> 0211 </list> 0212 <list name="SwitchCommand"> <item>switch</item> </list> 0213 <list name="TestErrorlevel"><item>errorlevel</item></list> 0214 <list name="TestStatusVarname"> 0215 <item>defined</item> 0216 <item>isalias</item> 0217 <item>isfunction</item> 0218 <item>isinternal</item> 0219 <item>islabel</item> 0220 </list> 0221 <list name="SetCommand"> 0222 <item>set</item> 0223 <item>function</item> 0224 <item>alias</item> 0225 </list> 0226 <list name="UnsetCommand"> 0227 <item>ENDLOCAL</item> 0228 <item>UNALIAS</item> 0229 <item>UNFUNCTION</item> 0230 <item>UNSET</item> 0231 </list> 0232 <list name="BadCommands"> 0233 <item>for</item> 0234 <item>else</item> 0235 <item>elseiff</item> 0236 <item>endiff</item> 0237 <item>enddo</item> 0238 <item>endtext</item> 0239 <item>case</item> 0240 <item>endswitch</item> 0241 <item>default</item> 0242 <!-- the following is only valid within a do-loop. But obviously I didn't think about it twice: 0243 if inside a do-loop we enter an iff/endiff construct, we switch contexts and the "leave" will 0244 not be found by the "insideDo" context. There would need to be a way to create a dynamic list 0245 of keywords that can be shorted or expanded by a specific context, so that the above wouldn't 0246 happen. --> 0247 <!--item> iterate </item> 0248 <item> leave </item--> 0249 </list> 0250 <list name="NeedOnOffCommands"> 0251 <item>BREAK</item> 0252 <item>IDLE</item> 0253 <item>LFNFOR</item> 0254 <item>LOADBTM</item> 0255 <item>SWAPPING</item> 0256 <item>TRANSIENT</item> 0257 <item>VERIFY</item> 0258 </list> 0259 <list name="TakeAFileNameCommands"> 0260 <item>CALL</item> 0261 <item>CD</item> 0262 <item>CHDIR</item> 0263 <item>CDD</item> 0264 <item>DIR</item> 0265 <item>ERASE</item> 0266 <item>DEL</item> 0267 <item>DESCRIBE</item> 0268 <item>HEAD</item> 0269 <item>MD</item> 0270 <item>MKDIR</item> 0271 <item>RD</item> 0272 <item>RMDIR</item> 0273 <item>PUSHD</item> 0274 <item>REN</item> 0275 <item>RENAME</item> 0276 <item>TOUCH</item> 0277 </list> 0278 <list name="simpleNoChecksCommands"> 0279 <item>BEEP</item> 0280 <item>CANCEL</item> 0281 <item>DATE</item> 0282 <item>FREE</item> 0283 <item>KEYBD</item> 0284 <item>ELSE</item> 0285 <item>PAUSE</item> 0286 <item>POPD</item> 0287 <item>QUIT</item> 0288 <item>SETDOS</item> 0289 <item>SHIFT</item> 0290 <item>TAIL</item> 0291 <item>TEE</item> 0292 <item>TIME</item> 0293 <item>TIMER</item> 0294 <item>TYPE</item> 0295 </list> 0296 <list name="NeedAnIntegerCommands"> 0297 <item>CHCP</item> 0298 <item>DELAY</item> 0299 <item>COUNTRY</item> 0300 <item>SETERROR</item> 0301 </list> 0302 <list name="TakeColorsCommands"> 0303 <item>CLS</item> 0304 <item>COLOR</item> 0305 </list> 0306 <list name="FilesystemOperationCommands"> 0307 <item>ATTRIB</item> 0308 <item>COPY</item> 0309 <item>FFIND</item> 0310 <item>MOVE</item> 0311 </list> 0312 <list name="DrawCommands"> 0313 <item>DRAWBOX</item> 0314 <item>DRAWHLINE</item> 0315 <item>DRAWVLINE</item> 0316 <item>SCREEN</item> 0317 <item>SCRPUT</item> 0318 <item>VSCRPUT</item> 0319 </list> 0320 <list name="NeedsACommandCommands"> 0321 <item>EXCEPT</item> 0322 <item>GLOBAL</item> 0323 </list> 0324 <list name="NoParametersAtAllCommands"> 0325 <item>SETLOCAL</item> 0326 </list> 0327 <list name="OnOff"> 0328 <item>on</item> 0329 <item>off</item> 0330 </list> 0331 <contexts> 0332 <context name="base" attribute="Normal" lineEndContext="#stay"> 0333 <IncludeRules context="findComments"/> 0334 <IncludeRules context="findCommands"/> 0335 <IncludeRules context="findCommandSeparator"/> 0336 <IncludeRules context="findStrings"/> <!-- includes "findSubstitution"--> 0337 </context> 0338 <!-- 0339 the following contexts are meant to be included in other contexts. 0340 --> 0341 <!-- find any comments (we were even keen enough to highlight things like TODO/FIXME and so on)--> 0342 <context name="findComments" attribute="Normal" lineEndContext="#stay"> 0343 <Detect2Chars attribute="Comment" context="foundComment" char=":" char1=":" column="0"/> 0344 <WordDetect attribute="Comment" context="foundComment" String="rem" insensitive="true"/> 0345 </context> 0346 0347 <!-- whereever there should be a command start, the following should match in some way or another --> 0348 <context name="findCommands" attribute="Normal" lineEndContext="#stay"> 0349 <!-- Highlight command groups and start/end corresponding folding region --> 0350 <DetectChar attribute="Label" context="CommandGroup" char="(" beginRegion="true"/> 0351 <!-- find Labels and jmp/jsr/rts commands --> 0352 <IncludeRules context="findSpaghetti"/> 0353 <!-- find commands that need special handling--> 0354 <!-- TODO: replace single-item keyword lists with WordDetect as soon as WordDetect works properly again--> 0355 <keyword attribute="Keyword" context="conditionLeft" String="IfCommand"/> 0356 <keyword attribute="Keyword" context="cmdIff" String="IffCommand"/> 0357 <!-- find all "echo"-variations --> 0358 <RegExpr attribute="Keyword" String="[@]?echo\s+(?:on|off)(?=\s*($|\%\+|\)|\]))" insensitive="true"/> 0359 <RegExpr attribute="Keyword" context="cmdEcho" String="\becho[s]?(?:err)?[\.]?" insensitive="true"/> 0360 <!-- special treatment for Text and EndText --> 0361 <keyword attribute="Keyword" context="cmdText" String="TextCommand" insensitive="true" beginRegion="true"/> 0362 <!-- Set und Unset-Befehle --> 0363 <keyword attribute="Keyword" context="cmdSet" String="SetCommand"/> 0364 <keyword attribute="Keyword" context="cmdUnset" String="UnsetCommand"/> 0365 <!-- inkey/input --> 0366 <keyword attribute="Keyword" context="cmdInput" String="InputCommand"/> 0367 <keyword attribute="Keyword" context="cmdInkey" String="InkeyCommand"/> 0368 <!-- do loops --> 0369 <keyword attribute="Keyword" context="cmdDo" String="DoCommand" beginRegion="true"/> 0370 <!-- switch constructs --> 0371 <keyword attribute="Keyword" context="cmdSwitch" String="SwitchCommand" beginRegion="true"/> 0372 <!-- all the other internal 4DOS commands (with as little processing, as time permits) --> 0373 <keyword attribute="Keyword" context="cmdNeedOnOff" String="NeedOnOffCommands"/> 0374 <keyword attribute="Keyword" context="cmdTakeAFileName" String="TakeAFileNameCommands"/> 0375 <keyword attribute="Keyword" context="cmdsimpleNoChecks" String="simpleNoChecksCommands"/> 0376 <keyword attribute="Keyword" context="cmdNeedAnInteger" String="NeedAnIntegerCommands"/> 0377 <keyword attribute="Keyword" context="cmdTakeColors" String="TakeColorsCommands"/> 0378 <keyword attribute="Keyword" context="cmdFilesystemOperation" String="FilesystemOperationCommands"/> 0379 <keyword attribute="Keyword" context="cmdDraw" String="DrawCommands"/> 0380 <keyword attribute="Keyword" context="cmdNeedsACommand" String="NeedsACommandCommands"/> 0381 <keyword attribute="Keyword" context="popNeedEndOfCommand" String="NoParametersAtAllCommands"/> 0382 <!-- BAD COMMANDS: 0383 for :: if someone codes for 4DOS, he shall not use for-loops. The way to go is using do-loops, 0384 for-loops were just included into 4DOS to have M$-DOS command.com compatibility 0385 any other bad commands: are not available outside of their respective scopes, or it's the same 0386 as with "for" 0387 --> 0388 <keyword attribute="Error" context="Error" String="BadCommands"/> 0389 </context> 0390 0391 <!-- find jumps, labels and subroutine calls --> 0392 <context name="findSpaghetti" attribute="Normal" lineEndContext="#stay"> 0393 <RegExpr attribute="Label" context="foundLabel" String="^:&label;" beginRegion="true" insensitive="true" column="0"/> 0394 <RegExpr attribute="Label" context="foundSpagetti" String="(?:goto|gosub)\s+&label;" insensitive="true"/> 0395 <WordDetect attribute="Label" String="return" insensitive="true" endRegion="true"/> 0396 </context> 0397 0398 <!-- find any variable substitution--> 0399 <context name="findSubstitution" attribute="Normal" lineEndContext="#stay"> 0400 <DetectChar context="substitutionFound" char="%" lookAhead="true"/> 0401 </context> 0402 0403 <!-- findVariables just finds variable substitutions WITHOUT variable functions!!!--> 0404 <context name="findVariables" attribute="Normal" lineEndContext="#stay"> 0405 <Detect2Chars attribute="VariableBold" context="substitutionIndirect" char="%" char1="["/> 0406 <RegExpr attribute="Variable" String="%(?:[a-z_][a-z_0-9]*%?|[0-9]+&?|&|\?+|_\?|#)" insensitive="true"/> 0407 </context> 0408 0409 <!-- findNumbers finds Numbers and variableSubstitutions that may well be numbers--> 0410 <context name="findNumbers" attribute="Normal" lineEndContext="#stay"> 0411 <RegExpr attribute="Number" String="\s*[+-]?\d*[,.]?\d+"/> 0412 <Detect2Chars attribute="Function" context="substitutionFindIntFunction" char="%" char1="@"/> 0413 <IncludeRules context="findVariables"/> 0414 </context> 0415 0416 <!-- findStrings should skip over Strings, highlighting any substitution inside--> 0417 <context name="findStrings" attribute="Normal" lineEndContext="#stay"> 0418 <DetectChar attribute="Escape" context="foundStringBackQuote" char="`"/> 0419 <DetectChar attribute="String" context="foundStringQuote" char="""/> 0420 <IncludeRules context="findEscapes"/> 0421 <IncludeRules context="findSubstitution"/> 0422 <!-- a Number may well be interpreted as a string in 4dos, also --> 0423 <RegExpr attribute="Number" String="\s*[+-]?\d*[,.]?\d+"/> 0424 <!-- the following highlights ANSI-Escape-Sequences --> 0425 <RegExpr attribute="Escape" String="\x1b\[.*[fhlmpsuABCDHJKR]" minimal="true"/> 0426 <!-- 0427 we shall find strings - so why don't we find at least literal words? 0428 0429 There is one simple answer: if we are inside a context that shall highlight strings, 0430 then "findStrings" is included, to find things that evaluate to some kind of string. 0431 Normal plaintext strings shall be lit by the context itself. 0432 --> 0433 </context> 0434 0435 <!-- highlight escaped characters --> 0436 <context name="findEscapes" attribute="Normal" lineEndContext="#stay"> 0437 <RegExpr attribute="Escape" context="foundANSIEscape" String="%=e\[(?=.*[fhlmpsuABCDHJKR])" minimal="true"/> 0438 <RegExpr attribute="Escape" String="\x18.|%=."/> 0439 </context> 0440 0441 <!-- highlight the command seperator without changing contexts --> 0442 <context name="findCommandSeparator" attribute="Normal" lineEndContext="#stay"> 0443 <Detect2Chars attribute="Keyword" char="%" char1="+"/> 0444 </context> 0445 0446 <!-- highlight the command seperator and pop a context --> 0447 <context name="popNeedEndOfCommand" attribute="Error" lineEndContext="#pop"> 0448 <Detect2Chars attribute="Keyword" context="#pop" char="%" char1="+"/> 0449 <DetectSpaces attribute="Normal"/> 0450 </context> 0451 0452 <!-- Entry Point for finding conditions --> 0453 <context name="findCondition" attribute="Normal" lineEndContext="#stay"> 0454 <RegExpr attribute="Error" context="conditionLeft" String="(?:not\s+)*(?:(?:(?:dir)?exist|isdir|defined|is(?:alias|function|label|internal)|errorlevel)|(?:.+(?:(?:\s*(==|!=)\s*)|(?:\s+(?:eq|ne|gt|ge|lt|le|eqc)\s+)).))" lookAhead="true" insensitive="true" minimal="true"/> 0455 </context> 0456 0457 <!-- find redirections --> 0458 <context name="findRedirection" attribute="Error" lineEndContext="#stay"> 0459 <DetectChar attribute="Keyword" context="RedirectionInput1st" char="<"/> 0460 <RegExpr attribute="Keyword" context="RedirectionOutput1st" String="[>]{1,2}[&]?[>]?"/> 0461 </context> 0462 0463 <!-- find any Option --> 0464 <context name="findOption" attribute="Option" lineEndContext="#stay"> 0465 <DetectChar attribute="Option" context="Option" char="/"/> 0466 </context> 0467 0468 0469 <!-- 0470 Here we start with functional contexts. These actually do something more than just find something and should not be sourced directly 0471 --> 0472 <context name="CommandGroup" attribute="Normal" lineEndContext="#stay"> 0473 <DetectChar attribute="Label" context="#pop" char=")" endRegion="true"/> 0474 <IncludeRules context="base"/> 0475 </context> 0476 0477 <!-- Highlight ANSI Escap-Sequences - the "%=e[" are already eaten up --> 0478 <context name="foundANSIEscape" attribute="String" lineEndContext="#pop"> 0479 <IncludeRules context="findStrings"/> 0480 <AnyChar attribute="Escape" context="#pop" String="fhlmpsuABCDHJKR"/> 0481 </context> 0482 0483 <!-- if any substitution was found, we get here ... --> 0484 <context name="substitutionFound" attribute="Error" lineEndContext="#pop"> 0485 <Detect2Chars attribute="Function" context="#pop!substitutionFindFunction" char="%" char1="@"/> 0486 <Detect2Chars attribute="VariableBold" context="#pop!substitutionIndirect" char="%" char1="["/> 0487 <RegExpr attribute="Variable" context="#pop" String="%(?:[a-z_][a-z_0-9]*%?|[0-9]+&?|&|\?+|_\?|#)" insensitive="true"/> 0488 <!-- in @EVAL there is the modulo-operator %% - we'll have to filter it out! 0489 TODO: give eval a special handler and remove the following rule. --> 0490 <Detect2Chars attribute="Operator" context="#pop" char="%" char1="%"/> 0491 </context> 0492 0493 <context name="substitutionFindFunction" attribute="Error" lineEndContext="#pop"> 0494 <!-- TODO: add special function handlers for 0495 execstr 0496 if 0497 --> 0498 <keyword attribute="Function" context="#pop!substitutionFunctionFound" String="StringFunctions"/> 0499 <IncludeRules context="substitutionFindIntFunction"/> 0500 </context> 0501 0502 <context name="substitutionFindIntFunction" attribute="Error" lineEndContext="#pop"> 0503 <!-- TODO: add special function handlers for 0504 eval 0505 --> 0506 <keyword attribute="Function" context="#pop!substitutionFunctionFound" String="IntFunctions"/> 0507 <RegExpr attribute="Function" context="#pop!substitutionFunctionFound" String="&label;(?=\[)" insensitive="true"/> 0508 </context> 0509 0510 <!-- Variable Functions - the Masterpower of 4DOS -> we'll make this more complex later on!--> 0511 <context name="substitutionFunctionFound" attribute="Error" lineEndContext="Error"> 0512 <DetectChar attribute="Function" context="#pop!findFunctionParameters" beginRegion="true" char="["/> 0513 </context> 0514 0515 <context name="findFunctionParameters" attribute="String" lineEndContext="Error"> 0516 <DetectChar attribute="Function" char=","/> 0517 <DetectChar attribute="Function" context="#pop" endRegion="true" char="]"/> 0518 <IncludeRules context="findStrings"/> 0519 </context> 0520 0521 <!-- indirect Substitutions - they need to find their ending braces--> 0522 <context name="substitutionIndirect" attribute="Variable" lineEndContext="Error"> 0523 <DetectChar attribute="VariableBold" context="#pop" endRegion="true" char="]"/> 0524 <IncludeRules context="findStrings"/> 0525 </context> 0526 0527 <!-- Strings within quotes --> 0528 <context name="foundStringBackQuote" attribute="String" lineEndContext="#pop"> 0529 <DetectChar attribute="Escape" context="#pop" char="`"/> 0530 </context> 0531 0532 <context name="foundStringQuote" attribute="String" lineEndContext="#pop"> 0533 <DetectChar attribute="String" context="#pop" char="""/> 0534 <IncludeRules context="findStrings"/> 0535 </context> 0536 0537 <!-- stuff inside comments ... (a comment always runs until EOL) --> 0538 <context name="foundComment" attribute="Comment" lineEndContext="#pop"> 0539 <IncludeRules context="##Comments"/> 0540 <keyword attribute="Alert" String="HighlightInsideComment"/> 0541 </context> 0542 0543 <!-- Label definitions including parameter definitions for Gosub--> 0544 <context name="foundLabel" attribute="Error" lineEndContext="#pop"> 0545 <!-- Wir suchen nach Parameterdefinitionen für GOSUBs, alles andere sind Fehler! --> 0546 <DetectChar attribute="Label" context="#pop!foundLabelParameters" char="["/> 0547 <DetectSpaces attribute="Normal"/> 0548 </context> 0549 0550 <context name="foundLabelParameters" attribute="Error" lineEndContext="#pop"> 0551 <DetectIdentifier attribute="Variable" context="#stay"/> 0552 <DetectChar attribute="Label" context="#pop" char="]"/> 0553 <DetectSpaces attribute="Normal"/> 0554 </context> 0555 0556 <!-- highlight gosubs and gotos with additional parameters (only valid with gosub, actually)--> 0557 <context name="foundSpagetti" attribute="Normal" lineEndContext="#pop"> 0558 <IncludeRules context="popNeedEndOfCommand"/> 0559 <IncludeRules context="findStrings"/> 0560 </context> 0561 0562 <!-- Rules that highlight conditions (include the entry point "findCondition" to start this as a context that pops behind the condition(s))--> 0563 <context name="conditionLeft" attribute="Normal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!conditionLeftStandard"> 0564 <RegExpr attribute="Normal" context="conditionNot" String="\bnot\b" lookAhead="true" insensitive="true"/> 0565 <keyword attribute="Label" context="#pop!conditionVarname" String="TestStatusVarname"/> 0566 <!-- the end of a filename comes with any non-quoted space - so we need to eat up the first space after exist etc.--> 0567 <RegExpr attribute="Label" context="#pop!conditionFileTest" String="(?:(?:dir)?exist|isdir)\s+" insensitive="true"/> 0568 <keyword attribute="Label" context="#pop!conditionErrorlevel" String="TestErrorlevel"/> 0569 <DetectSpaces/> 0570 </context> 0571 0572 <context name="conditionNot" attribute="Error" lineEndContext="#pop#pop"> 0573 <!-- the context itself highlights everything as Error - just this rule finds the last not --> 0574 <RegExpr attribute="Alert" context="#pop" String="\bnot\b(?!\s*not\b)" insensitive="true"/> 0575 </context> 0576 0577 <context name="conditionVarname" attribute="Normal" lineEndContext="#pop"> 0578 <!-- basic variable name check just finds an identifier --> 0579 <DetectIdentifier attribute="Variable" context="#pop!conditionEnd"/> 0580 <!-- TODO: further checking, as a varname can also be calculated --> 0581 </context> 0582 0583 <context name="conditionFileTest" attribute="String" lineEndContext="#pop"> 0584 <IncludeRules context="findStrings"/> 0585 <DetectSpaces context="#pop!conditionEnd"/> 0586 </context> 0587 0588 <context name="conditionErrorlevel" attribute="Normal" lineEndContext="#pop"> 0589 <DetectSpaces/> 0590 <RegExpr attribute="Operator" String="==|!=|eq|ne|gt|ge|lt|le" insensitive="true"/> 0591 <RegExpr attribute="Number" context="#pop!conditionEnd" String="\s*[+-]?\d*[,.]?\d+"/> 0592 <!-- TODO: actually errorlevel-test can also take calculated numbers or int variables to test agains - but would we want to duplicate a lot of the functionality above again?--> 0593 </context> 0594 0595 <context name="conditionEnd" attribute="Normal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> 0596 <RegExpr attribute="Operator" context="#pop!conditionLeft" String="\.(?:and|x?or)\." insensitive="true"/> 0597 <!--DetectSpaces/--> 0598 </context> 0599 0600 <context name="conditionLeftStandard" attribute="Normal" lineEndContext="#pop"> 0601 <!--DetectSpaces/--> 0602 <RegExpr attribute="Operator" context="#pop!conditionLeftEval" String="\s*(?:==|!=|eq|ne|gt|ge|lt|le)" lookAhead="true" insensitive="true"/> 0603 <IncludeRules context="findStrings"/> 0604 </context> 0605 0606 <context name="conditionLeftEval" attribute="Normal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!conditionRight"> 0607 <DetectSpaces/> 0608 <RegExpr attribute="Operator" String="==|!=|eq|ne|gt|ge|lt|le|eqc" insensitive="true"/> 0609 </context> 0610 0611 <context name="conditionRight" attribute="Normal" lineEndContext="#pop"> 0612 <IncludeRules context="findStrings"/> 0613 <DetectSpaces context="#pop!conditionEnd"/> 0614 </context> 0615 0616 <!-- Handle Iff correctly: condition, then, wait for possible else/handle elseiff find endiff--> 0617 <context name="cmdIff" attribute="Normal" lineEndContext="#pop"> 0618 <IncludeRules context="findCondition"/> 0619 <DetectSpaces/> 0620 <!-- TODO: replace with WordDetect as soon as WordDetect works right--> 0621 <RegExpr attribute="Keyword" context="#pop!cmdIffThen" beginRegion="true" String="\bthen\b\s*(?:$|%\+)" insensitive="true"/> 0622 <!-- should the above regex not match, there is an error... --> 0623 <StringDetect attribute="Keyword" context="Error" String="then" insensitive="true"/> 0624 </context> 0625 0626 <context name="cmdIffThen" attribute="Normal" lineEndContext="#stay"> 0627 <!-- TODO: replace with WordDetect as soon as WordDetect works right--> 0628 <RegExpr attribute="Keyword" context="popNeedEndOfCommand" String="\belse\b" insensitive="true"/> 0629 <RegExpr attribute="Keyword" context="cmdElseiff" String="\belseiff\b" insensitive="true"/> 0630 <RegExpr attribute="Keyword" context="#pop!popNeedEndOfCommand" endRegion="true" String="\bendiff\b" insensitive="true"/> 0631 <IncludeRules context="base"/> 0632 </context> 0633 0634 <context name="cmdElseiff" attribute="Normal" lineEndContext="#pop"> 0635 <IncludeRules context="findCondition"/> 0636 <DetectSpaces/> 0637 <!-- TODO: replace with WordDetect as soon as WordDetect works right--> 0638 <RegExpr attribute="Keyword" context="#pop" String="\bthen\b\s*(?:$|%\+)" insensitive="true"/> 0639 <!-- should the above regex not match, there is an error... --> 0640 <StringDetect attribute="Keyword" context="Error" String="then" insensitive="true"/> 0641 </context> 0642 0643 <!-- echo --> 0644 <context name="cmdEcho" attribute="String" lineEndContext="#pop"> 0645 <IncludeRules context="findStrings"/> 0646 <IncludeRules context="findRedirection"/> 0647 <RegExpr attribute="Normal" context="#pop" String="\s*(?:$|\%\+|\)|\])" lookAhead="true"/> 0648 </context> 0649 0650 <!-- Redirection: kann ja auch mehrfach auftreten --> 0651 <context name="Redirection" attribute="String" lineEndContext="#pop"> 0652 <DetectSpaces attribute="Normal" context="#stay"/> 0653 <IncludeRules context="findStrings"/> 0654 <IncludeRules context="popNeedEndOfCommand"/> 0655 </context> 0656 0657 <context name="RedirectionOutput1st" attribute="String" lineEndContext="#pop"> 0658 <IncludeRules context="Redirection"/> 0659 <DetectChar attribute="Redirection" context="#pop!Redirection" char="<"/> 0660 </context> 0661 0662 <context name="RedirectionInput1st" attribute="String" lineEndContext="#pop"> 0663 <IncludeRules context="Redirection"/> 0664 <RegExpr attribute="Redirection" context="#pop!Redirection" String="[>]{1,2}[&]?[>]?"/> 0665 </context> 0666 0667 <!-- special treatment of text and endtext --> 0668 <context name="cmdText" attribute="Error" lineEndContext="#pop!cmdEndText"> 0669 <DetectSpaces attribute="Normal" context="#stay"/> 0670 <RegExpr attribute="Keyword" context="Redirection" String="[>]{1,2}"/> 0671 </context> 0672 0673 <context name="cmdEndText" attribute="String" lineEndContext="#stay"> 0674 <RegExpr attribute="Keyword" context="#pop" String="^\s*endtext\s*$" insensitive="true" column="0"/> 0675 <!-- As we are pretty 31337, we also highlight ANSI-Escapes in Textblocks. 0676 We're just not 1337 enough to also provide a syntactic checking for 0677 those sequences...--> 0678 <RegExpr attribute="Escape" String="\x1b\[.*[fhlmpsuABCDHJKR]" minimal="true"/> 0679 </context> 0680 0681 <!-- Set/Unset commands --> 0682 <context name="cmdUnset" attribute="Normal" lineEndContext="#pop"> 0683 <IncludeRules context="findOption"/> 0684 <DetectIdentifier attribute="Variable" context="#stay"/> 0685 <IncludeRules context="popNeedEndOfCommand"/> 0686 </context> 0687 0688 <context name="cmdSet" attribute="Normal" lineEndContext="#pop"> 0689 <DetectChar attribute="Keyword" context="#pop" char="="/> 0690 <IncludeRules context="cmdUnset"/> 0691 </context> 0692 0693 <!-- Highlight an Option, #pop on next space ...--> 0694 <context name="Option" attribute="Option" lineEndContext="#pop"> 0695 <IncludeRules context="findStrings"/> 0696 <DetectSpaces attribute="Normal" context="#pop"/> 0697 </context> 0698 0699 <!-- input und inkey - testing allowed Options ... --> 0700 <context name="cmdInput" attribute="String" lineEndContext="#pop" 0701 fallthroughContext="#pop!inputMessage" fallthrough="true"> 0702 <IncludeRules context="input"/> 0703 <RegExpr attribute="Option" String="/(?:[en]|l[0-9]+)\s" insensitive="true"/> 0704 </context> 0705 0706 <context name="cmdInkey" attribute="String" lineEndContext="#pop" 0707 fallthroughContext="#pop!inputMessage" fallthrough="true"> 0708 <StringDetect attribute="Option" context="inputKeysDP" String="/k:" insensitive="true"/> 0709 <StringDetect attribute="Option" context="inputKeysAZ" String="/k"" insensitive="true"/> 0710 <StringDetect attribute="Error" String="/k" insensitive="true"/> 0711 <StringDetect attribute="Option" String="/m" insensitive="true"/> 0712 <IncludeRules context="input"/> 0713 </context> 0714 0715 <context name="input" attribute="Error" lineEndContext="#stay"> 0716 <RegExpr attribute="Option" String="/(?:[cdpx]|[w][0-9]+)\s" insensitive="true"/> 0717 <DetectSpaces attribute="Normal" context="#stay"/> 0718 </context> 0719 0720 <context name="inputKeysDP" attribute="Error" lineEndContext="#pop#pop"> 0721 <DetectChar attribute="String" context="inputKeyDesc" char="["/> 0722 <DetectSpaces attribute="Normal" context="#pop"/> 0723 <RegExpr attribute="Function" String="\S"/> 0724 </context> 0725 0726 <context name="inputKeysAZ" attribute="Error" lineEndContext="#pop#pop"> 0727 <DetectChar attribute="String" context="inputKeyDesc" char="["/> 0728 <DetectChar attribute="Option" context="#pop" char="""/> 0729 <RegExpr attribute="Function" String="\S"/> 0730 </context> 0731 0732 <context name="inputKeyDesc" attribute="Error" lineEndContext="#pop#pop#pop"> 0733 <RegExpr attribute="Label" context="#pop!inputKeyDesc2" String="&tasten;"/> 0734 </context> 0735 0736 <context name="inputKeyDesc2" attribute="Error" lineEndContext="#pop#pop#pop"> 0737 <DetectChar attribute="String" context="#pop" char="]"/> 0738 </context> 0739 0740 <context name="inputMessage" attribute="String" lineEndContext="#pop"> 0741 <RegExpr attribute="Variable" context="#pop!popNeedEndOfCommand" String="%%[a-z_][a-z0-9_]*" insensitive="true"/> 0742 <IncludeRules context="findStrings"/> 0743 </context> 0744 0745 <!-- special treatment of DO --> 0746 <context name="cmdDo" attribute="Error" lineEndContext="Error"> 0747 <!-- do n | forever--> 0748 <RegExpr attribute="Label" context="#pop!insideDo" String="\s*forever(?=\s*$)" insensitive="true"/> 0749 <RegExpr attribute="Variable" context="#pop!fixedDo" String="\s*[%0-9]" lookAhead="true"/> 0750 <!-- WHILE | UNTIL --> 0751 <RegExpr attribute="Label" context="#pop!conditionalDo" String="\s*(?:while|until)" insensitive="true"/> 0752 <!-- varname = start TO end [BY n] | varname in blubberkram --> 0753 <RegExpr attribute="Variable" context="#pop!countedDo" String="\s*&varname;" insensitive="true"/> 0754 </context> 0755 0756 <context name="fixedDo" attribute="Error" lineEndContext="#pop!insideDo"> 0757 <DetectSpaces attribute="Normal"/> 0758 <IncludeRules context="findNumbers"/> 0759 </context> 0760 0761 <context name="countedDo" attribute="Error" lineEndContext="Error"> 0762 <RegExpr attribute="Keyword" context="#pop!countedDoIn" String="\bin\b" insensitive="true"/> 0763 <DetectChar attribute="Keyword" context="#pop!countedDoStart" char="="/> 0764 <DetectSpaces attribute="Normal"/> 0765 </context> 0766 0767 <context name="countedDoIn" attribute="String" lineEndContext="#pop!insideDo"> 0768 <DetectSpaces/> 0769 <IncludeRules context="findOption"/> 0770 <IncludeRules context="findStrings"/> 0771 </context> 0772 0773 <context name="countedDoStart" attribute="Error" lineEndContext="Error"> 0774 <RegExpr attribute="Keyword" context="#pop!countedDoTo" String="\bto\b" insensitive="true"/> 0775 <IncludeRules context="findNumbers"/> 0776 <DetectSpaces attribute="Normal"/> 0777 </context> 0778 0779 <context name="countedDoTo" attribute="Error" lineEndContext="#pop!insideDo"> 0780 <IncludeRules context="findNumbers"/> 0781 <DetectSpaces attribute="Normal"/> 0782 <RegExpr attribute="Keyword" context="#pop!countedDoBy" String="\bby\b" insensitive="true"/> 0783 </context> 0784 0785 <context name="countedDoBy" attribute="Error" lineEndContext="#pop!insideDo"> 0786 <IncludeRules context="findNumbers"/> 0787 <DetectSpaces attribute="Normal"/> 0788 </context> 0789 0790 <context name="conditionalDo" attribute="Error" lineEndContext="#pop!insideDo"> 0791 <IncludeRules context="findCondition"/> 0792 <DetectSpaces attribute="Normal"/> 0793 </context> 0794 0795 <context name="insideDo" attribute="Normal" lineEndContext="#stay"> 0796 <keyword attribute="Keyword" String="SkipdoCommand"/> 0797 <keyword attribute="Keyword" endRegion="true" context="#pop!popNeedEndOfCommand" String="EnddoCommand"/> 0798 <IncludeRules context="base"/> 0799 </context> 0800 0801 <!-- special treatment of switch statements --> 0802 <context name="cmdSwitch" attribute="Normal" lineEndContext="#pop!insideSwitch"> 0803 <IncludeRules context="findStrings"/> 0804 </context> 0805 0806 <context name="insideSwitch" attribute="Normal" lineEndContext="#stay"> 0807 <RegExpr attribute="Keyword" context="#pop!switchDefault" String="\s*default\s*$" insensitive="true"/> 0808 <IncludeRules context="switchDefault"/> 0809 </context> 0810 <!-- "Default" may be used only once, that's why we change contexts when it was found --> 0811 <context name="switchDefault" attribute="Normal" lineEndContext="#stay"> 0812 <RegExpr attribute="Keyword" context="switchCase" String="\bcase\b" insensitive="true"/> 0813 <RegExpr attribute="Keyword" context="#pop!popNeedEndOfCommand" String="\bendswitch\b" insensitive="true" endRegion="true"/> 0814 <IncludeRules context="base"/> 0815 </context> 0816 0817 <context name="switchCase" attribute="String" lineEndContext="#pop"> 0818 <DetectSpaces/> 0819 <StringDetect attribute="Operator" insensitive="true" String=".or."/> 0820 <IncludeRules context="findStrings"/> 0821 </context> 0822 0823 <!-- internal commands of the 4DOS interpreter (TODO: make it even better, like integrated syntax checking) --> 0824 <context name="cmdNeedOnOff" attribute="Error" lineEndContext="#pop"> 0825 <keyword attribute="String" context="#pop!popNeedEndOfCommand" String="OnOff"/> 0826 <DetectSpaces attribute="Normal"/> 0827 </context> 0828 0829 <context name="cmdNeedAnInteger" attribute="Error" lineEndContext="#pop"> 0830 <DetectSpaces attribute="Normal"/> 0831 <IncludeRules context="findOption"/> 0832 <IncludeRules context="findNumbers"/> 0833 <IncludeRules context="popNeedEndOfCommand"/> 0834 </context> 0835 0836 <context name="cmdNeedsACommand" attribute="String" lineEndContext="#pop"> 0837 <IncludeRules context="findOption"/> 0838 <IncludeRules context="base"/> 0839 </context> 0840 0841 <context name="cmdsimpleNoChecks" attribute="String" lineEndContext="#pop"> 0842 <IncludeRules context="findOption"/> 0843 <IncludeRules context="findStrings"/> 0844 <IncludeRules context="popNeedEndOfCommand"/> 0845 </context> 0846 0847 <context name="cmdTakeAFileName" attribute="String" lineEndContext="#pop"> 0848 <IncludeRules context="findOption"/> 0849 <IncludeRules context="findStrings"/> 0850 <IncludeRules context="popNeedEndOfCommand"/> 0851 </context> 0852 0853 <context name="cmdTakeColors" attribute="String" lineEndContext="#pop"> 0854 <RegExpr attribute="Operator" context="#pop!ColorHaveBrightFG" String="\bbri(?:ght)?\b" insensitive="true"/> 0855 <RegExpr attribute="Operator" context="#pop!ColorHaveBlinkFG" String="\bbli(?:nk)?\b" insensitive="true"/> 0856 <IncludeRules context="ColorHaveBlinkFG"/> 0857 </context> 0858 0859 <context name="ColorHaveBrightFG" attribute="String" lineEndContext="Error"> 0860 <RegExpr attribute="Operator" context="#pop!ColorHaveBlinkFG" String="\bbli(?:nk)?\b" insensitive="true"/> 0861 <IncludeRules context="ColorHaveBlinkFG"/> 0862 </context> 0863 0864 <context name="ColorHaveBlinkFG" attribute="String" lineEndContext="Error"> 0865 <RegExpr attribute="Option" context="#pop!ColorHaveFG" insensitive="true" String="\b(?:Bla(?:ck)?|Blue?|Gre(?:en)?|Red|Mag(?:enta)?|Cyan?|Yel(?:low)?|Whi(?:te)?)\b"/> 0866 <DetectSpaces/> 0867 </context> 0868 0869 <context name="ColorHaveFG" attribute="String" lineEndContext="Error"> 0870 <RegExpr attribute="Keyword" context="#pop!ColorBG" insensitive="true" String="\s+on\s+"/> 0871 </context> 0872 0873 <context name="ColorBG" attribute="String" lineEndContext="Error"> 0874 <RegExpr attribute="Operator" insensitive="true" String="\bbri(?:ght)?\b"/> 0875 <RegExpr attribute="Option" context="#pop!ColorHaveBG" insensitive="true" String="\b(?:Bla(?:ck)?|Blue?|Gre(?:en)?|Red|Mag(?:enta)?|Cyan?|Yel(?:low)?|Whi(?:te)?)\b"/> 0876 </context> 0877 0878 <context name="ColorHaveBG" attribute="String" lineEndContext="#pop"> 0879 <RegExpr attribute="Operator" context="#pop!ColorNeedBordercol" insensitive="true" String="\bBOR(?:der)?\b"/> 0880 <IncludeRules context="popNeedEndOfCommand"/> 0881 </context> 0882 0883 <context name="ColorNeedBordercol" attribute="String" lineEndContext="Error"> 0884 <RegExpr attribute="Option" context="#pop!popNeedEndOfCommand" insensitive="true" String="\s*(?:Bla(?:ck)?|Blue?|Gre(?:en)?|Red|Mag(?:enta)?|Cyan?|Yel(?:low)?|Whi(?:te)?)\b"/> 0885 </context> 0886 0887 <context name="cmdDraw" attribute="String" lineEndContext="#pop"> 0888 <!-- ToDo: check if we'll have to split this into multiple contexts, add the highlighting for drawing commands --> 0889 </context> 0890 0891 <context name="cmdFilesystemOperation" attribute="String" lineEndContext="#pop"> 0892 <IncludeRules context="findOption"/> 0893 <IncludeRules context="findStrings"/> 0894 <IncludeRules context="popNeedEndOfCommand"/> 0895 </context> 0896 0897 <context name="Error" attribute="Error" lineEndContext="#stay"> 0898 </context> 0899 </contexts> 0900 <itemDatas> 0901 <itemData name="Normal" defStyleNum="dsNormal"/> 0902 <itemData name="Comment" defStyleNum="dsComment"/> 0903 <itemData name="Keyword" defStyleNum="dsKeyword"/> 0904 <itemData name="Number" defStyleNum="dsDecVal"/> 0905 <itemData name="Option" defStyleNum="dsDecVal"/> 0906 <itemData name="Label" defStyleNum="dsOthers"/> 0907 <itemData name="Function" defStyleNum="dsFunction"/> 0908 <itemData name="Redirection" defStyleNum="dsKeyword"/> 0909 <itemData name="String" defStyleNum="dsString"/> 0910 <itemData name="Escape" defStyleNum="dsSpecialChar"/> 0911 <itemData name="Variable" defStyleNum="dsVariable"/> 0912 <itemData name="VariableBold" defStyleNum="dsVariable" bold="true"/> 0913 <itemData name="Alert" defStyleNum="dsAlert"/> 0914 <itemData name="Error" defStyleNum="dsError"/> 0915 <itemData name="Operator" defStyleNum="dsOperator"/> 0916 </itemDatas> 0917 </highlighting> 0918 <general> 0919 <comments> 0920 <comment name="singleLine" start="rem "/> 0921 </comments> 0922 <keywords casesensitive="0" additionalDeliminator="@"/> 0923 </general> 0924 </language> 0925 <!-- kate: replace-tabs off; -->