A tumblelog CMS built on AJAX, PHP and MySQL.

dos.php 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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.21
  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. $language_data = array (
  61. 'LANG_NAME' => 'DOS',
  62. 'COMMENT_SINGLE' => array(1 =>'REM', 2 => '@REM'),
  63. 'COMMENT_MULTI' => array(),
  64. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  65. 'QUOTEMARKS' => array(),
  66. 'ESCAPE_CHAR' => '',
  67. 'KEYWORDS' => array(
  68. /* Flow control keywords */
  69. 1 => array(
  70. 'if', 'else', 'goto',
  71. 'for', 'in', 'do',
  72. 'call', 'exit'
  73. ),
  74. /* IF statement keywords */
  75. 2 => array(
  76. 'not', 'exist', 'errorlevel',
  77. 'defined',
  78. 'equ', 'neq', 'lss', 'leq', 'gtr', 'geq'
  79. ),
  80. /* Internal commands */
  81. 3 => array(
  82. 'shift',
  83. 'cd', 'dir', 'echo',
  84. 'setlocal', 'endlocal', 'set',
  85. 'pause'
  86. ),
  87. /* Special files */
  88. 4 => array(
  89. 'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con',
  90. 'com4', 'com3', 'com2', 'com1', 'aux'
  91. )
  92. ),
  93. 'SYMBOLS' => array(
  94. '(', ')'
  95. ),
  96. 'CASE_SENSITIVE' => array(
  97. GESHI_COMMENTS => false,
  98. 1 => false,
  99. 2 => false,
  100. 3 => 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. ?>