A tumblelog CMS built on AJAX, PHP and MySQL.

reg.php 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <?php
  2. /*************************************************************************************
  3. * reg.php
  4. * -------
  5. * Author: Sean Hanna (smokingrope@gmail.com)
  6. * Copyright: (c) 2006 Sean Hanna
  7. * Release Version: 1.0.7.21
  8. * Date Started: 03/15/2006
  9. *
  10. * Microsoft Registry Editor Language File.
  11. *
  12. * CHANGES
  13. * -------
  14. * 03/15/2006 (0.5.0)
  15. * - Syntax File Created
  16. * 04/27/2006 (0.9.5)
  17. * - Syntax Coloring Cleaned Up
  18. * - First Release
  19. * 04/29/2006 (1.0.0)
  20. * - Updated a few coloring settings
  21. *
  22. * TODO (updated 4/27/2006)
  23. * -------------------------
  24. * - Add a verification to the multi-line portion of the hex field regex
  25. * for a '\' character on the line preceding the line of the multi-line
  26. * hex field.
  27. *
  28. * KNOWN ISSUES (updated 4/27/2006)
  29. * ---------------------------------
  30. *
  31. * - There are two regexes for the multiline hex value regex. The regex for
  32. * all lines after the first does not verify that the previous line contains
  33. * a line continuation character '\'. This regex also does not check for
  34. * end of line as it should.
  35. *
  36. * - If number_highlighting is enabled during processing of this syntax file
  37. * many of the regexps used will appear slightly incorrect.
  38. *
  39. *************************************************************************************
  40. *
  41. * This file is part of GeSHi.
  42. *
  43. * GeSHi is free software; you can redistribute it and/or modify
  44. * it under the terms of the GNU General Public License as published by
  45. * the Free Software Foundation; either version 2 of the License, or
  46. * (at your option) any later version.
  47. *
  48. * GeSHi is distributed in the hope that it will be useful,
  49. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  50. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  51. * GNU General Public License for more details.
  52. *
  53. * You should have received a copy of the GNU General Public License
  54. * along with GeSHi; if not, write to the Free Software
  55. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  56. *
  57. ************************************************************************************/
  58. $language_data = array (
  59. 'LANG_NAME' => 'Microsoft Registry',
  60. 'COMMENT_SINGLE' => array(1 =>';'),
  61. 'COMMENT_MULTI' => array( ),
  62. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  63. 'QUOTEMARKS' => array(),
  64. 'ESCAPE_CHAR' => '',
  65. 'KEYWORDS' => array(
  66. 1 => array(),
  67. 2 => array()
  68. /* Registry Key Constants Not Used
  69. 3 => array(
  70. 'HKEY_LOCAL_MACHINE',
  71. 'HKEY_CLASSES_ROOT',
  72. 'HKEY_CURRENT_USER',
  73. 'HKEY_USERS',
  74. 'HKEY_CURRENT_CONFIG',
  75. 'HKEY_DYN_DATA',
  76. 'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD'
  77. )/***/
  78. ),
  79. 'SYMBOLS' => array( ),
  80. 'CASE_SENSITIVE' => array(
  81. GESHI_COMMENTS => false,
  82. 1 => false,
  83. 2 => false
  84. ),
  85. 'STYLES' => array(
  86. 'KEYWORDS' => array( 1 => 'color: #00CCFF;',
  87. 2 => 'color: #0000FF;' ),
  88. 'COMMENTS' => array( 1 => 'color: #009900;' ),
  89. 'ESCAPE_CHAR' => array(),
  90. 'BRACKETS' => array(0 => 'color: #000000;'),
  91. 'STRINGS' => array( 0 => 'color: #009900;' ),
  92. 'NUMBERS' => array(),
  93. 'METHODS' => array(),
  94. 'SYMBOLS' => array(0 => 'color: #000000;'),
  95. 'SCRIPT' => array(),
  96. 'REGEXPS' => array(
  97. 0 => '',
  98. 1 => 'color: #0000FF;',
  99. 2 => '',
  100. 3 => '',
  101. 4 => 'color: #0000FF;',
  102. 5 => '',
  103. 6 => '',
  104. 7 => '',
  105. 8 => '',
  106. 9 => 'color: #FF6600;',
  107. )
  108. ),
  109. 'OOLANG' => false,
  110. 'OBJECT_SPLITTERS' => array(
  111. ),
  112. 'REGEXPS' => array(
  113. // Highlight Key Delimiters
  114. 0 => array(
  115. GESHI_SEARCH => '((^|\\n)\\s*)(\\\\\\[(.*)\\\\\\])(\\s*(\\n|$))',
  116. GESHI_REPLACE => '\\3',
  117. GESHI_MODIFIERS => '',
  118. GESHI_BEFORE => '\\1',
  119. GESHI_AFTER => '\\5',
  120. GESHI_CLASS => 'kw1'
  121. ),
  122. // Highlight File Format Header Version 5
  123. 1 => array(
  124. GESHI_SEARCH => '((\\n|^)\\s*)(Windows Registry Editor Version [0-9]+(.)+([0-9]+))((\\n|$)\\s*)',
  125. GESHI_REPLACE => '\\3',
  126. GESHI_MODIFIERS => '',
  127. GESHI_BEFORE => '\\1',
  128. GESHI_AFTER => '\\6',
  129. GESHI_CLASS => 'geshi_registry_header'
  130. ),
  131. // Highlight File Format Header Version 4
  132. 2 => array(
  133. GESHI_SEARCH => '((\\n|^)\\s*)(REGEDIT [0-9]+)(\\s*(\\n|$))',
  134. GESHI_REPLACE => '\\3',
  135. GESHI_MODIFIERS => '',
  136. GESHI_BEFORE => '\\1',
  137. GESHI_AFTER => '\\4',
  138. GESHI_CLASS => 'geshi_registry_header'
  139. ),
  140. // Highlight dword: 32 bit integer values
  141. 3 => array(
  142. GESHI_SEARCH => '(=\\s*)(dword:[0-9]{8})(\\s*(\\n|$))',
  143. GESHI_REPLACE => '\\2',
  144. GESHI_MODIFIERS => '',
  145. GESHI_BEFORE => '\\1',
  146. GESHI_AFTER => '\\3',
  147. GESHI_CLASS => 'kw2'
  148. ),
  149. // Highlight variable names
  150. 4 => array(
  151. GESHI_SEARCH => '((\\n|^)\\s*\\&quot\\;)(.*)(\\&quot\\;\\s*=)',
  152. GESHI_REPLACE => '\\3',
  153. GESHI_MODIFIERS => '',
  154. GESHI_BEFORE => '\\1',
  155. GESHI_AFTER => '\\4',
  156. GESHI_CLASS => 'geshi_variable'
  157. ),
  158. // Highlight String Values
  159. 5 => array(
  160. GESHI_SEARCH => '(=\\s*)(\\&quot\\;.*\\&quot\\;)(\\s*(\\n|$))',
  161. GESHI_REPLACE => '\\2',
  162. GESHI_MODIFIERS => '',
  163. GESHI_BEFORE => '\\1',
  164. GESHI_AFTER => '\\3',
  165. GESHI_CLASS => 'st0'
  166. ),
  167. // Highlight Hexadecimal Values
  168. 6 => array(
  169. GESHI_SEARCH => '(=\\s*)(hex((\\\\\\([0-9]{1,2}\\\\\\))|()):(([0-9a-fA-F]{2},)|(\\s))*(([0-9a-fA-F]{2})|(\\\\\\\\)))(\\s*(\\n|$))',
  170. GESHI_REPLACE => '\\2',
  171. GESHI_MODIFIERS => '',
  172. GESHI_BEFORE => '\\1',
  173. GESHI_AFTER => '\\12',
  174. GESHI_CLASS => 'kw2'
  175. ),
  176. // Highlight Hexadecimal Values (Multi-Line)
  177. 7 => array(
  178. GESHI_SEARCH => '((\\n|^)\\s*)((([0-9a-fA-F]{2},)|(\\s))*(([0-9a-fA-F]{2})|(\\\\\\\\)))',
  179. GESHI_REPLACE => '\\3',
  180. GESHI_MODIFIERS => '',
  181. GESHI_BEFORE => '\\1',
  182. GESHI_AFTER => '\\10',
  183. GESHI_CLASS => 'kw2'
  184. ),
  185. // Highlight Default Variable
  186. 8 => array(
  187. GESHI_SEARCH => '((\\n|^)\\s*)(@)(\\s*=)',
  188. GESHI_REPLACE => '\\3',
  189. GESHI_MODIFIERS => '',
  190. GESHI_BEFORE => '\\1',
  191. GESHI_AFTER => '\\4',
  192. GESHI_CLASS => 'geshi_variable'
  193. ),
  194. // Highlight GUID's found anywhere.
  195. 9 => array(
  196. GESHI_SEARCH => '(\\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\})',
  197. GESHI_REPLACE => '\\1',
  198. GESHI_MODIFIERS => '',
  199. GESHI_BEFORE => '',
  200. GESHI_AFTER => '',
  201. GESHI_CLASS => 'geshi_guid'
  202. )
  203. ),
  204. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  205. 'SCRIPT_DELIMITERS' => array(
  206. ),
  207. 'HIGHLIGHT_STRICT_BLOCK' => array(
  208. )
  209. );
  210. if (isset($this) && is_a($this, 'GeSHi')) {
  211. $this->set_numbers_highlighting(false);
  212. }
  213. ?>