1<?php
2/*************************************************************************************
3 * dos.php
4 * -------
5 * Author: Alessandro Staltari (staltari@geocities.com)
6 * Copyright: (c) 2005 Alessandro Staltari (http://www.geocities.com/SiliconValley/Vista/8155/)
7 * Release Version: 1.0.7.15
8 * CVS Revision Version: $Revision: 1.14.2.4 $
9 * Date Started: 2005/07/05
10 * Last Modified: $Date: 2006/09/23 02:05:47 $
11 *
12 * DOS language file for GeSHi.
13 *
14 * CHANGES
15 * -------
16 * 2005/07/05 (1.0.0)
17 *  -  First Release
18 *
19 * TODO (updated 2005/07/05)
20 * -------------------------
21 *
22 * - Find a way to higlight %*
23 * - Highlight pipes and redirection (do we really need this?)
24 * - Add missing keywords.
25 * - Find a good hyperlink for keywords.
26 * - Improve styles.
27 *
28 * KNOWN ISSUES (updated 2005/07/07)
29 * ---------------------------------
30 *
31 * - Doesn't even try to handle spaces in variables name or labels (I can't
32 *   find a reliable way to establish if a sting is a name or not, in some
33 *   cases it depends on the contex or enviroment status).
34 * - Doesn't handle %%[letter] pseudo variable used inside FOR constructs
35 *   (it should be done only into its scope: how to handle variable it?).
36 * - Doesn't handle %~[something] pseudo arguments.
37 * - If the same keyword is placed at the end of the line and the
38 *   beginning of the next, the second occourrence is not highlighted
39 *   (this should be a GeSHi bug, not related to the language definition).
40 * - I can't avoid to have keyword highlighted even when they are not used
41 *   as keywords but, for example, as arguments to the echo command.
42 *
43 *************************************************************************************
44 *
45 *     This file is part of GeSHi.
46 *
47 *   GeSHi is free software; you can redistribute it and/or modify
48 *   it under the terms of the GNU General Public License as published by
49 *   the Free Software Foundation; either version 2 of the License, or
50 *   (at your option) any later version.
51 *
52 *   GeSHi is distributed in the hope that it will be useful,
53 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
54 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
55 *   GNU General Public License for more details.
56 *
57 *   You should have received a copy of the GNU General Public License
58 *   along with GeSHi; if not, write to the Free Software
59 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
60 *
61 ************************************************************************************/
62
63$language_data = array (
64	'LANG_NAME' => 'DOS',
65	'COMMENT_SINGLE' => array(1 =>'REM', 2 => '@REM'),
66	'COMMENT_MULTI' => array(),
67	'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
68	'QUOTEMARKS' => array(),
69	'ESCAPE_CHAR' => '',
70	'KEYWORDS' => array(
71	    /* Flow control keywords */
72		1 => array(
73			'if', 'else', 'goto',
74			'for', 'in', 'do',
75			'call', 'exit'
76			),
77	    /* IF statement keywords */
78		2 => array(
79			'not', 'exist', 'errorlevel',
80			'defined',
81			'equ', 'neq', 'lss', 'leq', 'gtr', 'geq'
82			),
83	    /* Internal commands */
84		3 => array(
85			'shift',
86			'cd', 'dir', 'echo',
87			'setlocal', 'endlocal', 'set',
88			'pause'
89			),
90	    /* Special files */
91
92		4 => array(
93			'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con',
94			'com4', 'com3', 'com2', 'com1', 'aux'
95			)
96		),
97	'SYMBOLS' => array(
98		'(', ')'
99		),
100	'CASE_SENSITIVE' => array(
101		GESHI_COMMENTS => false,
102		1 => false
103		),
104	'STYLES' => array(
105		'KEYWORDS' => array(
106			1 => 'color: #00b100; font-weight: bold;',
107			2 => 'color: #000000; font-weight: bold;',
108			3 => 'color: #b1b100; font-weight: bold;',
109			4 => 'color: #0000ff; font-weight: bold;'
110			),
111		'COMMENTS' => array(
112			1 => 'color: #808080; font-style: italic;',
113			2 => 'color: #808080; font-style: italic;'
114			),
115		'ESCAPE_CHAR' => array(
116			),
117		'BRACKETS' => array(
118			0 => 'color: #66cc66;'
119			),
120		'STRINGS' => array(
121			0 => 'color: #ff0000;'
122			),
123		'NUMBERS' => array(
124/*			0 => 'color: #cc66cc;' */
125			),
126		'METHODS' => array(
127			),
128		'SYMBOLS' => array(
129			0 => 'color: #33cc33;',
130			1 => 'color: #33cc33;'
131			),
132		'SCRIPT' => array(
133			),
134		'REGEXPS' => array(
135			0 => 'color: #b100b1; font-weight: bold;',
136			1 => 'color: #448844;',
137			2 => 'color: #448888;'
138			)
139		),
140	'OOLANG' => false,
141	'OBJECT_SPLITTERS' => array(
142		),
143    'URLS' => array(
144         1 => 'http://www.ss64.com/nt/{FNAME}.html',
145         2 => 'http://www.ss64.com/nt/{FNAME}.html',
146         3 => 'http://www.ss64.com/nt/{FNAME}.html',
147         4 => 'http://www.ss64.com/nt/{FNAME}.html'
148         ),
149	'REGEXPS' => array(
150	/* Label */
151	    0 => array(
152/*		GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\s\n]*)',*/
153		GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\n]*)',
154		GESHI_REPLACE => '\\2',
155		GESHI_MODIFIERS => 'si',
156		GESHI_BEFORE => '\\1',
157		GESHI_AFTER => ''
158		),
159	/* Variable assignement */
160	    1 => array(
161/*		GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\s\n]+)([\s]*=)',*/
162		GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\n]+)([\s]*=)',
163		GESHI_REPLACE => '\\2',
164		GESHI_MODIFIERS => 'si',
165		GESHI_BEFORE => '\\1',
166		GESHI_AFTER => '\\3'
167		),
168	/* Arguments or variable evaluation */
169	    2 => array(
170/*		GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((?<!%\d)%|)',*/
171		GESHI_SEARCH => '(%)([\d*]|[^%]*(?=%))((?<!%\d)%|)',
172		GESHI_REPLACE => '\\2',
173		GESHI_MODIFIERS => 'si',
174		GESHI_BEFORE => '\\1',
175		GESHI_AFTER => '\\3'
176		)
177		),
178	'STRICT_MODE_APPLIES' => GESHI_NEVER,
179	'SCRIPT_DELIMITERS' => array(
180		),
181	'HIGHLIGHT_STRICT_BLOCK' => array(
182		)
183);
184
185?>
186