KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

234 lines
7.4KB

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