1 <?xml version="1.0"?>
\r
3 <!DOCTYPE MODE SYSTEM "xmode.dtd">
\r
6 09-10-2003 - Mirco Bova
\r
7 Added some new batch commands using win2K help as reference.
\r
9 04-12-2001 - Mirco Bova
\r
10 this file is based on the original JEdit batch.xml mode.
\r
11 The main upgrade consisting in adding the standard MS-DOS
\r
12 commands as keywords and functions:
\r
13 - keywords = internal shell commands;
\r
14 - functions = standard MS-DOS commands (.exe or .com in DOS or
\r
15 windows\command directory).
\r
17 Minor enhancements by Alex Jacoby on 28-feb-2003
\r
20 <!-- The keywords and functions here defined are those of MS-DOS 6.22,
\r
21 plus a few as of Windows XP.
\r
26 <PROPERTY NAME="lineComment" VALUE="rem" />
\r
27 <PROPERTY NAME="indentOpenBrackets" VALUE="(" />
\r
28 <PROPERTY NAME="indentCloseBrackets" VALUE=")" />
\r
30 <RULES IGNORE_CASE="TRUE" HIGHLIGHT_DIGITS="FALSE">
\r
31 <!-- 'echo off' statements -->
\r
32 <SEQ TYPE="KEYWORD3">@</SEQ>
\r
34 <SEQ TYPE="OPERATOR">+</SEQ>
\r
35 <SEQ TYPE="OPERATOR">|</SEQ>
\r
36 <SEQ TYPE="OPERATOR">&</SEQ>
\r
37 <SEQ TYPE="OPERATOR">!</SEQ>
\r
38 <SEQ TYPE="OPERATOR">></SEQ>
\r
39 <SEQ TYPE="OPERATOR"><</SEQ>
\r
41 <!-- labels - eg ":test" or "goto :test" -->
\r
42 <MARK_FOLLOWING AT_WORD_START="TRUE" TYPE="LABEL">:</MARK_FOLLOWING>
\r
45 <EOL_SPAN_REGEXP AT_WHITESPACE_END="TRUE" HASH_CHAR="REM" TYPE="COMMENT1">REM\s</EOL_SPAN_REGEXP>
\r
48 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
\r
54 <SEQ TYPE="KEYWORD2">%0</SEQ>
\r
55 <SEQ TYPE="KEYWORD2">%1</SEQ>
\r
56 <SEQ TYPE="KEYWORD2">%2</SEQ>
\r
57 <SEQ TYPE="KEYWORD2">%3</SEQ>
\r
58 <SEQ TYPE="KEYWORD2">%4</SEQ>
\r
59 <SEQ TYPE="KEYWORD2">%5</SEQ>
\r
60 <SEQ TYPE="KEYWORD2">%6</SEQ>
\r
61 <SEQ TYPE="KEYWORD2">%7</SEQ>
\r
62 <SEQ TYPE="KEYWORD2">%8</SEQ>
\r
63 <SEQ TYPE="KEYWORD2">%9</SEQ>
\r
64 <!-- for-loop variable (one char after %%) -->
\r
65 <SEQ_REGEXP TYPE="KEYWORD2"
\r
67 AT_WORD_START="TRUE"
\r
68 >%%[\p{Alpha}]</SEQ_REGEXP>
\r
69 <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
\r
75 <!-- KEYWORD1 are internal MS-DOS shell commands -->
\r
76 <KEYWORD1>cd</KEYWORD1>
\r
77 <KEYWORD1>chdir</KEYWORD1>
\r
78 <KEYWORD1>md</KEYWORD1>
\r
79 <KEYWORD1>mkdir</KEYWORD1>
\r
81 <KEYWORD1>cls</KEYWORD1>
\r
83 <KEYWORD1>for</KEYWORD1>
\r
84 <KEYWORD1>if</KEYWORD1>
\r
86 <KEYWORD1>echo</KEYWORD1>
\r
87 <KEYWORD1>echo.</KEYWORD1>
\r
89 <KEYWORD1>move</KEYWORD1>
\r
90 <KEYWORD1>copy</KEYWORD1>
\r
91 <KEYWORD1>move</KEYWORD1>
\r
92 <KEYWORD1>ren</KEYWORD1>
\r
93 <KEYWORD1>del</KEYWORD1>
\r
94 <KEYWORD1>set</KEYWORD1>
\r
96 <!-- new KEYWORDS from Win2K help -->
\r
97 <KEYWORD1>call</KEYWORD1>
\r
98 <KEYWORD1>exit</KEYWORD1>
\r
99 <KEYWORD1>setlocal</KEYWORD1>
\r
100 <KEYWORD1>shift</KEYWORD1>
\r
101 <KEYWORD1>endlocal</KEYWORD1>
\r
102 <KEYWORD1>pause</KEYWORD1>
\r
104 <!-- KEYWORD2 are commands options -->
\r
106 <KEYWORD2>defined</KEYWORD2>
\r
107 <KEYWORD2>exist</KEYWORD2>
\r
108 <KEYWORD2>errorlevel</KEYWORD2>
\r
110 <!-- new KEYWORD options from Win2K help -->
\r
111 <KEYWORD2>else</KEYWORD2>
\r
113 <KEYWORD2>in</KEYWORD2>
\r
114 <KEYWORD2>do</KEYWORD2>
\r
116 <KEYWORD2>NUL</KEYWORD2>
\r
117 <KEYWORD2>AUX</KEYWORD2>
\r
118 <KEYWORD2>PRN</KEYWORD2>
\r
120 <KEYWORD1>not</KEYWORD1>
\r
122 <!-- goto is a special case we want to distinguish it -->
\r
123 <KEYWORD3>goto</KEYWORD3>
\r
125 <!-- FUNCTION are standard MS-DOS commands -->
\r
126 <!-- (those you find as stand-alone .exe or .com) in win95 %windows_root%\command folder -->
\r
127 <FUNCTION>APPEND</FUNCTION>
\r
128 <FUNCTION>ATTRIB</FUNCTION>
\r
129 <FUNCTION>CHKDSK</FUNCTION>
\r
130 <FUNCTION>CHOICE</FUNCTION>
\r
131 <FUNCTION>DEBUG</FUNCTION>
\r
132 <FUNCTION>DEFRAG</FUNCTION>
\r
133 <FUNCTION>DELTREE</FUNCTION>
\r
134 <FUNCTION>DISKCOMP</FUNCTION>
\r
135 <FUNCTION>DISKCOPY</FUNCTION>
\r
136 <FUNCTION>DOSKEY</FUNCTION>
\r
137 <FUNCTION>DRVSPACE</FUNCTION>
\r
138 <FUNCTION>EMM386</FUNCTION>
\r
139 <FUNCTION>EXPAND</FUNCTION>
\r
140 <FUNCTION>FASTOPEN</FUNCTION>
\r
141 <FUNCTION>FC</FUNCTION>
\r
142 <FUNCTION>FDISK</FUNCTION>
\r
143 <FUNCTION>FIND</FUNCTION>
\r
144 <FUNCTION>FORMAT</FUNCTION>
\r
145 <FUNCTION>GRAPHICS</FUNCTION>
\r
146 <FUNCTION>KEYB</FUNCTION>
\r
147 <FUNCTION>LABEL</FUNCTION>
\r
148 <FUNCTION>LOADFIX</FUNCTION>
\r
149 <FUNCTION>MEM</FUNCTION>
\r
150 <FUNCTION>MODE</FUNCTION>
\r
151 <FUNCTION>MORE</FUNCTION>
\r
152 <FUNCTION>MOVE</FUNCTION>
\r
153 <FUNCTION>MSCDEX</FUNCTION>
\r
154 <FUNCTION>NLSFUNC</FUNCTION>
\r
155 <FUNCTION>POWER</FUNCTION>
\r
156 <FUNCTION>PRINT</FUNCTION>
\r
157 <FUNCTION>RD</FUNCTION>
\r
158 <FUNCTION>REPLACE</FUNCTION>
\r
159 <FUNCTION>RESTORE</FUNCTION>
\r
160 <FUNCTION>SETVER</FUNCTION>
\r
161 <FUNCTION>SHARE</FUNCTION>
\r
162 <FUNCTION>SORT</FUNCTION>
\r
163 <FUNCTION>SUBST</FUNCTION>
\r
164 <FUNCTION>SYS</FUNCTION>
\r
165 <FUNCTION>TREE</FUNCTION>
\r
166 <FUNCTION>UNDELETE</FUNCTION>
\r
167 <FUNCTION>UNFORMAT</FUNCTION>
\r
168 <FUNCTION>VSAFE</FUNCTION>
\r
169 <FUNCTION>XCOPY</FUNCTION>
\r