2 /*************************************************************************************
5 * Author: Sean Hanna (smokingrope@gmail.com)
6 * Copyright: (c) 2006 Sean Hanna
7 * Release Version: 1.0.8.4
8 * Date Started: 03/15/2006
10 * Microsoft Registry Editor language file for GeSHi.
14 * 2008/05/23 (1.0.7.22)
15 * - Added description of extra language features (SF#1970248)
16 * - Updated and optimized most regular expressions
18 * - Syntax File Created
20 * - Syntax Coloring Cleaned Up
23 * - Updated a few coloring settings
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
31 * KNOWN ISSUES (updated 4/27/2006)
32 * ---------------------------------
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.
39 * - If number_highlighting is enabled during processing of this syntax file
40 * many of the regexps used will appear slightly incorrect.
42 *************************************************************************************
44 * This file is part of GeSHi.
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.
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.
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
61 ************************************************************************************/
62 $language_data = array (
63 'LANG_NAME' => 'Microsoft Registry',
64 'COMMENT_SINGLE' => array(1 =>';'),
65 'COMMENT_MULTI' => array( ),
66 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
67 'QUOTEMARKS' => array(),
72 /* Registry Key Constants Not Used */
78 'HKEY_CURRENT_CONFIG',
80 'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD'
86 'CASE_SENSITIVE' => array(
87 GESHI_COMMENTS
=> false,
94 // 1 => 'color: #00CCFF;',
95 // 2 => 'color: #0000FF;',
96 3 => 'color: #800000;'
99 1 => 'color: #009900;'
101 'ESCAPE_CHAR' => array(
104 0 => 'color: #000000;'
107 0 => 'color: #009900;'
114 0 => 'color: #000000;'
119 0 => 'color: #00CCFF;',
120 1 => 'color: #0000FF;',
122 3 => 'color: #0000FF;',
123 4 => 'color: #0000FF;',
127 8 => 'color: #FF6600;',
136 'OBJECT_SPLITTERS' => array(
139 // Highlight Key Delimiters
141 GESHI_SEARCH
=> '((^|\\n)\\s*)(\\\\\\[(.*)\\\\\\])(\\s*(\\n|$))',
142 GESHI_REPLACE
=> '\\3',
143 GESHI_MODIFIERS
=> '',
144 GESHI_BEFORE
=> '\\1',
146 // GESHI_CLASS => 'kw1'
148 // Highlight File Format Header Version 5
150 GESHI_SEARCH
=> '(^\s*)(Windows Registry Editor Version \d+\.\d+)(\s*$)',
151 GESHI_REPLACE
=> '\\2',
152 GESHI_MODIFIERS
=> 'm',
153 GESHI_BEFORE
=> '\\1',
154 GESHI_AFTER
=> '\\3',
155 GESHI_CLASS
=> 'geshi_registry_header'
157 // Highlight File Format Header Version 4
159 GESHI_SEARCH
=> '(^\\s*)(REGEDIT\s?\d+)(\s*$)',
160 GESHI_REPLACE
=> '\\2',
161 GESHI_MODIFIERS
=> 'm',
162 GESHI_BEFORE
=> '\\1',
163 GESHI_AFTER
=> '\\3',
164 GESHI_CLASS
=> 'geshi_registry_header'
166 // Highlight dword: 32 bit integer values
168 GESHI_SEARCH
=> '(=\s*)(dword:[0-9a-fA-F]{8})(\s*$)',
169 GESHI_REPLACE
=> '\\2',
170 GESHI_MODIFIERS
=> 'm',
171 GESHI_BEFORE
=> '\\1',
173 // GESHI_CLASS => 'kw2'
175 // Highlight variable names
177 GESHI_SEARCH
=> '(^\s*)(\".*?\")(\s*=)',
178 GESHI_REPLACE
=> '\\2',
179 GESHI_MODIFIERS
=> 'm',
180 GESHI_BEFORE
=> '\\1',
181 GESHI_AFTER
=> '\\3',
182 GESHI_CLASS
=> 'geshi_variable'
184 // Highlight String Values
186 GESHI_SEARCH
=> '(=\s*)(\".*?\")(\s*$)',
187 GESHI_REPLACE
=> '\\2',
188 GESHI_MODIFIERS
=> 'm',
189 GESHI_BEFORE
=> '\\1',
190 GESHI_AFTER
=> '\\3',
193 // Highlight Hexadecimal Values (Single-Line and Multi-Line)
195 GESHI_SEARCH
=> '(=\s*\n?\s*)(hex:[0-9a-fA-F]{2}(,(\\\s*\n\s*)?[0-9a-fA-F]{2})*)',
196 GESHI_REPLACE
=> '\\2',
197 GESHI_MODIFIERS
=> 'm',
198 GESHI_BEFORE
=> '\\1',
202 // Highlight Default Variable
204 GESHI_SEARCH
=> '(^\s*)(@)(\s*=)',
205 GESHI_REPLACE
=> '\\2',
206 GESHI_MODIFIERS
=> 'm',
207 GESHI_BEFORE
=> '\\1',
208 GESHI_AFTER
=> '\\3',
209 GESHI_CLASS
=> 'geshi_variable'
211 // Highlight GUID's found anywhere.
213 GESHI_SEARCH
=> '(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\})',
214 GESHI_REPLACE
=> '\\1',
215 GESHI_MODIFIERS
=> 'i',
218 GESHI_CLASS
=> 'geshi_guid'
221 'STRICT_MODE_APPLIES' => GESHI_NEVER
,
222 'SCRIPT_DELIMITERS' => array(
224 'HIGHLIGHT_STRICT_BLOCK' => array(
226 'PARSER_CONTROL' => array(
227 'ENABLE_FLAGS' => array(
228 'NUMBERS' => GESHI_NEVER
,