summaryrefslogtreecommitdiff
path: root/inc/geshi/dos.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/geshi/dos.php')
-rw-r--r--inc/geshi/dos.php72
1 files changed, 39 insertions, 33 deletions
diff --git a/inc/geshi/dos.php b/inc/geshi/dos.php
index b57e7bc42..d5b031f96 100644
--- a/inc/geshi/dos.php
+++ b/inc/geshi/dos.php
@@ -4,20 +4,21 @@
* -------
* Author: Alessandro Staltari (staltari@geocities.com)
* Copyright: (c) 2005 Alessandro Staltari (http://www.geocities.com/SiliconValley/Vista/8155/)
- * Release Version: 1.0.7.21
+ * Release Version: 1.0.7.22
* Date Started: 2005/07/05
*
* DOS language file for GeSHi.
*
* CHANGES
* -------
+ * 2008/05/23 (1.0.7.22)
+ * - Added description of extra language features (SF#1970248)
* 2005/07/05 (1.0.0)
* - First Release
*
* TODO (updated 2005/07/05)
* -------------------------
*
- * - Find a way to higlight %*
* - Highlight pipes and redirection (do we really need this?)
* - Add missing keywords.
* - Find a good hyperlink for keywords.
@@ -60,15 +61,17 @@
$language_data = array (
'LANG_NAME' => 'DOS',
- 'COMMENT_SINGLE' => array(1 =>'REM', 2 => '@REM'),
+ 'COMMENT_SINGLE' => array(),
'COMMENT_MULTI' => array(),
+ //DOS comment lines
+ 'COMMENT_REGEXP' => array(1 => "/^\s*@?REM/mi"),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array(),
'ESCAPE_CHAR' => '',
'KEYWORDS' => array(
/* Flow control keywords */
1 => array(
- 'if', 'else', 'goto',
+ 'if', 'else', 'goto', 'shift',
'for', 'in', 'do',
'call', 'exit'
),
@@ -80,26 +83,27 @@ $language_data = array (
),
/* Internal commands */
3 => array(
- 'shift',
- 'cd', 'dir', 'echo',
+ 'cd', 'md', 'rd', 'chdir', 'mkdir', 'rmdir', 'dir',
+ 'del', 'copy',
+ 'echo',
'setlocal', 'endlocal', 'set',
'pause'
),
/* Special files */
-
4 => array(
'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con',
'com4', 'com3', 'com2', 'com1', 'aux'
)
),
'SYMBOLS' => array(
- '(', ')'
+ '(', ')', '@', '%'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false,
+ 4 => false
),
'STYLES' => array(
'KEYWORDS' => array(
@@ -113,6 +117,7 @@ $language_data = array (
2 => 'color: #808080; font-style: italic;'
),
'ESCAPE_CHAR' => array(
+ 0 => 'color: #ff0000; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: #66cc66;'
@@ -147,39 +152,40 @@ $language_data = array (
4 => 'http://www.ss64.com/nt/{FNAME}.html'
),
'REGEXPS' => array(
- /* Label */
+ /* Label */
0 => array(
-/* GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\s\n]*)',*/
- GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\n]*)',
- GESHI_REPLACE => '\\2',
- GESHI_MODIFIERS => 'si',
- GESHI_BEFORE => '\\1',
- GESHI_AFTER => ''
- ),
- /* Variable assignement */
+/* GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\s\n]*)',*/
+ GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((?<!\n)[^\n]*)',
+ GESHI_REPLACE => '\\2',
+ GESHI_MODIFIERS => 'si',
+ GESHI_BEFORE => '\\1',
+ GESHI_AFTER => ''
+ ),
+ /* Variable assignement */
1 => array(
-/* GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\s\n]+)([\s]*=)',*/
- GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\n]+)([\s]*=)',
- GESHI_REPLACE => '\\2',
- GESHI_MODIFIERS => 'si',
- GESHI_BEFORE => '\\1',
- GESHI_AFTER => '\\3'
- ),
- /* Arguments or variable evaluation */
+/* GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\s\n]+)([\s]*=)',*/
+ GESHI_SEARCH => '(SET[\s]+(?si:/A[\s]+|/P[\s]+|))([^=\n]+)([\s]*=)',
+ GESHI_REPLACE => '\\2',
+ GESHI_MODIFIERS => 'si',
+ GESHI_BEFORE => '\\1',
+ GESHI_AFTER => '\\3'
+ ),
+ /* Arguments or variable evaluation */
2 => array(
-/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((?<!%\d)%|)',*/
- GESHI_SEARCH => '(%)([\d*]|[^%]*(?=%))((?<!%\d)%|)',
- GESHI_REPLACE => '\\2',
- GESHI_MODIFIERS => 'si',
- GESHI_BEFORE => '\\1',
- GESHI_AFTER => '\\3'
- )
+/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((?<!%\d)%|)',*/
+ GESHI_SEARCH => '(%)([\d*]|[^%]*(?=%))((?<!%\d)%|)',
+ GESHI_REPLACE => '\\2',
+ GESHI_MODIFIERS => 'si',
+ GESHI_BEFORE => '\\1',
+ GESHI_AFTER => '\\3'
+ )
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(
),
'HIGHLIGHT_STRICT_BLOCK' => array(
- )
+ ),
+ 'TAB_WIDTH' => 4
);
?>