PageRenderTime 146ms CodeModel.GetById 139ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre14/modes/batch.xml

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