]>
src.bluestatic.org Git - viewsvn.git/blob - includes/geshi/geshi/reg.php
2 /*************************************************************************************
5 * Author: Sean Hanna (smokingrope@gmail.com)
6 * Copyright: (c) 2006 Sean Hanna
7 * Release Version: 1.0.7.19
8 * Date Started: 03/15/2006
10 * Microsoft Registry Editor Language File.
15 * - Syntax File Created
17 * - Syntax Coloring Cleaned Up
20 * - Updated a few coloring settings
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
28 * KNOWN ISSUES (updated 4/27/2006)
29 * ---------------------------------
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.
36 * - If number_highlighting is enabled during processing of this syntax file
37 * many of the regexps used will appear slightly incorrect.
39 *************************************************************************************
41 * This file is part of GeSHi.
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.
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.
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
58 ************************************************************************************/
59 $language_data = array (
60 'LANG_NAME' => 'Microsoft Registry',
61 'COMMENT_SINGLE' => array(1 =>';'),
62 'COMMENT_MULTI' => array( ),
63 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
64 'QUOTEMARKS' => array(),
69 /* Registry Key Constants Not Used
75 'HKEY_CURRENT_CONFIG',
77 'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD'
80 'SYMBOLS' => array( ),
81 'CASE_SENSITIVE' => array(
82 GESHI_COMMENTS
=> false,
87 'KEYWORDS' => array( 1 => 'color: #00CCFF;',
88 2 => 'color: #0000FF;' ),
89 'COMMENTS' => array( 1 => 'color: #009900;' ),
90 'ESCAPE_CHAR' => array(),
91 'BRACKETS' => array(0 => 'color: #000000;'),
92 'STRINGS' => array( 0 => 'color: #009900;' ),
95 'SYMBOLS' => array(0 => 'color: #000000;'),
99 1 => 'color: #0000FF;',
102 4 => 'color: #0000FF;',
107 9 => 'color: #FF6600;',
111 'OBJECT_SPLITTERS' => array(
114 // Highlight Key Delimiters
116 GESHI_SEARCH
=> '((^|\\n)\\s*)(\\\\\\[(.*)\\\\\\])(\\s*(\\n|$))',
117 GESHI_REPLACE
=> '\\3',
118 GESHI_MODIFIERS
=> '',
119 GESHI_BEFORE
=> '\\1',
120 GESHI_AFTER
=> '\\5',
123 // Highlight File Format Header Version 5
125 GESHI_SEARCH
=> '((\\n|^)\\s*)(Windows Registry Editor Version [0-9]+(.)+([0-9]+))((\\n|$)\\s*)',
126 GESHI_REPLACE
=> '\\3',
127 GESHI_MODIFIERS
=> '',
128 GESHI_BEFORE
=> '\\1',
129 GESHI_AFTER
=> '\\6',
130 GESHI_CLASS
=> 'geshi_registry_header'
132 // Highlight File Format Header Version 4
134 GESHI_SEARCH
=> '((\\n|^)\\s*)(REGEDIT [0-9]+)(\\s*(\\n|$))',
135 GESHI_REPLACE
=> '\\3',
136 GESHI_MODIFIERS
=> '',
137 GESHI_BEFORE
=> '\\1',
138 GESHI_AFTER
=> '\\4',
139 GESHI_CLASS
=> 'geshi_registry_header'
141 // Highlight dword: 32 bit integer values
143 GESHI_SEARCH
=> '(=\\s*)(dword:[0-9]{8})(\\s*(\\n|$))',
144 GESHI_REPLACE
=> '\\2',
145 GESHI_MODIFIERS
=> '',
146 GESHI_BEFORE
=> '\\1',
147 GESHI_AFTER
=> '\\3',
150 // Highlight variable names
152 GESHI_SEARCH
=> '((\\n|^)\\s*\\"\\;)(.*)(\\"\\;\\s*=)',
153 GESHI_REPLACE
=> '\\3',
154 GESHI_MODIFIERS
=> '',
155 GESHI_BEFORE
=> '\\1',
156 GESHI_AFTER
=> '\\4',
157 GESHI_CLASS
=> 'geshi_variable'
159 // Highlight String Values
161 GESHI_SEARCH
=> '(=\\s*)(\\"\\;.*\\"\\;)(\\s*(\\n|$))',
162 GESHI_REPLACE
=> '\\2',
163 GESHI_MODIFIERS
=> '',
164 GESHI_BEFORE
=> '\\1',
165 GESHI_AFTER
=> '\\3',
168 // Highlight Hexadecimal Values
170 GESHI_SEARCH
=> '(=\\s*)(hex((\\\\\\([0-9]{1,2}\\\\\\))|()):(([0-9a-fA-F]{2},)|(\\s))*(([0-9a-fA-F]{2})|(\\\\\\\\)))(\\s*(\\n|$))',
171 GESHI_REPLACE
=> '\\2',
172 GESHI_MODIFIERS
=> '',
173 GESHI_BEFORE
=> '\\1',
174 GESHI_AFTER
=> '\\12',
177 // Highlight Hexadecimal Values (Multi-Line)
179 GESHI_SEARCH
=> '((\\n|^)\\s*)((([0-9a-fA-F]{2},)|(\\s))*(([0-9a-fA-F]{2})|(\\\\\\\\)))',
180 GESHI_REPLACE
=> '\\3',
181 GESHI_MODIFIERS
=> '',
182 GESHI_BEFORE
=> '\\1',
183 GESHI_AFTER
=> '\\10',
186 // Highlight Default Variable
188 GESHI_SEARCH
=> '((\\n|^)\\s*)(@)(\\s*=)',
189 GESHI_REPLACE
=> '\\3',
190 GESHI_MODIFIERS
=> '',
191 GESHI_BEFORE
=> '\\1',
192 GESHI_AFTER
=> '\\4',
193 GESHI_CLASS
=> 'geshi_variable'
195 // Highlight GUID's found anywhere.
197 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}\\})',
198 GESHI_REPLACE
=> '\\1',
199 GESHI_MODIFIERS
=> '',
202 GESHI_CLASS
=> 'geshi_guid'
205 'STRICT_MODE_APPLIES' => GESHI_NEVER
,
206 'SCRIPT_DELIMITERS' => array(
208 'HIGHLIGHT_STRICT_BLOCK' => array(
211 if (isset($this) && is_a($this, 'GeSHi')) {
212 $this->set_numbers_highlighting(false);