plugins/geshi/geshi/dos.php
changeset 0 441963e5b07a
child 2 9e3258dfae15
equal deleted inserted replaced
-1:000000000000 0:441963e5b07a
       
     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.20
       
     8  * Date Started: 2005/07/05
       
     9  *
       
    10  * DOS language file for GeSHi.
       
    11  *
       
    12  * CHANGES
       
    13  * -------
       
    14  * 2005/07/05 (1.0.0)
       
    15  *  -  First Release
       
    16  *
       
    17  * TODO (updated 2005/07/05)
       
    18  * -------------------------
       
    19  *
       
    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.
       
    24  * - Improve styles.
       
    25  *
       
    26  * KNOWN ISSUES (updated 2005/07/07)
       
    27  * ---------------------------------
       
    28  *
       
    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.
       
    40  *
       
    41  *************************************************************************************
       
    42  *
       
    43  *     This file is part of GeSHi.
       
    44  *
       
    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.
       
    49  *
       
    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.
       
    54  *
       
    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
       
    58  *
       
    59  ************************************************************************************/
       
    60 
       
    61 $language_data = array (
       
    62 	'LANG_NAME' => 'DOS',
       
    63 	'COMMENT_SINGLE' => array(1 =>'REM', 2 => '@REM'),
       
    64 	'COMMENT_MULTI' => array(),
       
    65 	'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
       
    66 	'QUOTEMARKS' => array(),
       
    67 	'ESCAPE_CHAR' => '',
       
    68 	'KEYWORDS' => array(
       
    69 	    /* Flow control keywords */
       
    70 		1 => array(
       
    71 			'if', 'else', 'goto',
       
    72 			'for', 'in', 'do',
       
    73 			'call', 'exit'
       
    74 			),
       
    75 	    /* IF statement keywords */
       
    76 		2 => array(
       
    77 			'not', 'exist', 'errorlevel',
       
    78 			'defined',
       
    79 			'equ', 'neq', 'lss', 'leq', 'gtr', 'geq'
       
    80 			),
       
    81 	    /* Internal commands */
       
    82 		3 => array(
       
    83 			'shift',
       
    84 			'cd', 'dir', 'echo',
       
    85 			'setlocal', 'endlocal', 'set',
       
    86 			'pause'
       
    87 			),
       
    88 	    /* Special files */
       
    89 
       
    90 		4 => array(
       
    91 			'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con',
       
    92 			'com4', 'com3', 'com2', 'com1', 'aux'
       
    93 			)
       
    94 		),
       
    95 	'SYMBOLS' => array(
       
    96 		'(', ')'
       
    97 		),
       
    98 	'CASE_SENSITIVE' => array(
       
    99 		GESHI_COMMENTS => false,
       
   100 		1 => false
       
   101 		),
       
   102 	'STYLES' => array(
       
   103 		'KEYWORDS' => array(
       
   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;'
       
   108 			),
       
   109 		'COMMENTS' => array(
       
   110 			1 => 'color: #808080; font-style: italic;',
       
   111 			2 => 'color: #808080; font-style: italic;'
       
   112 			),
       
   113 		'ESCAPE_CHAR' => array(
       
   114 			),
       
   115 		'BRACKETS' => array(
       
   116 			0 => 'color: #66cc66;'
       
   117 			),
       
   118 		'STRINGS' => array(
       
   119 			0 => 'color: #ff0000;'
       
   120 			),
       
   121 		'NUMBERS' => array(
       
   122 /*			0 => 'color: #cc66cc;' */
       
   123 			),
       
   124 		'METHODS' => array(
       
   125 			),
       
   126 		'SYMBOLS' => array(
       
   127 			0 => 'color: #33cc33;',
       
   128 			1 => 'color: #33cc33;'
       
   129 			),
       
   130 		'SCRIPT' => array(
       
   131 			),
       
   132 		'REGEXPS' => array(
       
   133 			0 => 'color: #b100b1; font-weight: bold;',
       
   134 			1 => 'color: #448844;',
       
   135 			2 => 'color: #448888;'
       
   136 			)
       
   137 		),
       
   138 	'OOLANG' => false,
       
   139 	'OBJECT_SPLITTERS' => array(
       
   140 		),
       
   141     'URLS' => 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'
       
   146          ),
       
   147 	'REGEXPS' => array(
       
   148 	/* Label */
       
   149 	    0 => array(
       
   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',
       
   155 		GESHI_AFTER => ''
       
   156 		),
       
   157 	/* Variable assignement */
       
   158 	    1 => array(
       
   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',
       
   164 		GESHI_AFTER => '\\3'
       
   165 		),
       
   166 	/* Arguments or variable evaluation */
       
   167 	    2 => array(
       
   168 /*		GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((?<!%\d)%|)',*/
       
   169 		GESHI_SEARCH => '(%)([\d*]|[^%]*(?=%))((?<!%\d)%|)',
       
   170 		GESHI_REPLACE => '\\2',
       
   171 		GESHI_MODIFIERS => 'si',
       
   172 		GESHI_BEFORE => '\\1',
       
   173 		GESHI_AFTER => '\\3'
       
   174 		)
       
   175 		),
       
   176 	'STRICT_MODE_APPLIES' => GESHI_NEVER,
       
   177 	'SCRIPT_DELIMITERS' => array(
       
   178 		),
       
   179 	'HIGHLIGHT_STRICT_BLOCK' => array(
       
   180 		)
       
   181 );
       
   182 
       
   183 ?>