2 /*************************************************************************************
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.19
8 * Date Started: 2005/07/05
10 * DOS language file for GeSHi.
17 * TODO (updated 2005/07/05)
18 * -------------------------
20 * - Find a way to higlight %*
21 * - Highlight pipes and redirection (do we really need this?)
22 * - Add missing keywords.
23 * - Find a good hyperlink for keywords.
26 * KNOWN ISSUES (updated 2005/07/07)
27 * ---------------------------------
29 * - Doesn't even try to handle spaces in variables name or labels (I can't
30 * find a reliable way to establish if a sting is a name or not, in some
31 * cases it depends on the contex or enviroment status).
32 * - Doesn't handle %%[letter] pseudo variable used inside FOR constructs
33 * (it should be done only into its scope: how to handle variable it?).
34 * - Doesn't handle %~[something] pseudo arguments.
35 * - If the same keyword is placed at the end of the line and the
36 * beginning of the next, the second occourrence is not highlighted
37 * (this should be a GeSHi bug, not related to the language definition).
38 * - I can't avoid to have keyword highlighted even when they are not used
39 * as keywords but, for example, as arguments to the echo command.
41 *************************************************************************************
43 * This file is part of GeSHi.
45 * GeSHi is free software; you can redistribute it and/or modify
46 * it under the terms of the GNU General Public License as published by
47 * the Free Software Foundation; either version 2 of the License, or
48 * (at your option) any later version.
50 * GeSHi is distributed in the hope that it will be useful,
51 * but WITHOUT ANY WARRANTY; without even the implied warranty of
52 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 * GNU General Public License for more details.
55 * You should have received a copy of the GNU General Public License
56 * along with GeSHi; if not, write to the Free Software
57 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
59 ************************************************************************************/
61 $language_data = array (
63 'COMMENT_SINGLE' => array(1 =>'REM', 2 => '@REM'),
64 'COMMENT_MULTI' => array(),
65 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
66 'QUOTEMARKS' => array(),
69 /* Flow control keywords */
75 /* IF statement keywords */
77 'not', 'exist', 'errorlevel',
79 'equ', 'neq', 'lss', 'leq', 'gtr', 'geq'
81 /* Internal commands */
85 'setlocal', 'endlocal', 'set',
91 'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con',
92 'com4', 'com3', 'com2', 'com1', 'aux'
98 'CASE_SENSITIVE' => array(
99 GESHI_COMMENTS
=> false
,
104 1 => 'color: #00b100; font-weight: bold;',
105 2 => 'color: #000000; font-weight: bold;',
106 3 => 'color: #b1b100; font-weight: bold;',
107 4 => 'color: #0000ff; font-weight: bold;'
110 1 => 'color: #808080; font-style: italic;',
111 2 => 'color: #808080; font-style: italic;'
113 'ESCAPE_CHAR' => array(
116 0 => 'color: #66cc66;'
119 0 => 'color: #ff0000;'
122 /* 0 => 'color: #cc66cc;' */
127 0 => 'color: #33cc33;',
128 1 => 'color: #33cc33;'
133 0 => 'color: #b100b1; font-weight: bold;',
134 1 => 'color: #448844;',
135 2 => 'color: #448888;'
139 'OBJECT_SPLITTERS' => array(
142 1 => 'http://www.ss64.com/nt/{FNAME}.html',
143 2 => 'http://www.ss64.com/nt/{FNAME}.html',
144 3 => 'http://www.ss64.com/nt/{FNAME}.html',
145 4 => 'http://www.ss64.com/nt/{FNAME}.html'
150 /* GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\s\n]*)',*/
151 GESHI_SEARCH
=> '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\n]*)',
152 GESHI_REPLACE
=> '\\2',
153 GESHI_MODIFIERS
=> 'si',
154 GESHI_BEFORE
=> '\\1',
157 /* Variable assignement */
159 /* GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\s\n]+)([\s]*=)',*/
160 GESHI_SEARCH
=> '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\n]+)([\s]*=)',
161 GESHI_REPLACE
=> '\\2',
162 GESHI_MODIFIERS
=> 'si',
163 GESHI_BEFORE
=> '\\1',
166 /* Arguments or variable evaluation */
168 /* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((?<!%\d)%|)',*/
169 GESHI_SEARCH
=> '(%)([\d*]|[^%]*(?=%))((?<!%\d)%|)',
170 GESHI_REPLACE
=> '\\2',
171 GESHI_MODIFIERS
=> 'si',
172 GESHI_BEFORE
=> '\\1',
176 'STRICT_MODE_APPLIES' => GESHI_NEVER
,
177 'SCRIPT_DELIMITERS' => array(
179 'HIGHLIGHT_STRICT_BLOCK' => array(