PageRenderTime 18ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

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