1 | 1 | simandl | <?php |
2 | | | /************************************************************************************* |
3 | | | * reg.php |
4 | | | * ------- |
5 | | | * Author: Sean Hanna (smokingrope@gmail.com) |
6 | | | * Copyright: (c) 2006 Sean Hanna |
7 | 3 | simandl | * Release Version: 1.0.8.3 |
8 | 1 | simandl | * 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 | | | ************************************************************************************/ |
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(), |
68 | | | 'ESCAPE_CHAR' => '', |
69 | | | 'KEYWORDS' => array( |
70 | | | // 1 => array(), |
71 | | | // 2 => array(), |
72 | | | /* Registry Key Constants Not Used */ |
73 | | | 3 => array( |
74 | | | 'HKEY_LOCAL_MACHINE', |
75 | | | 'HKEY_CLASSES_ROOT', |
76 | | | 'HKEY_CURRENT_USER', |
77 | | | 'HKEY_USERS', |
78 | | | 'HKEY_CURRENT_CONFIG', |
79 | | | 'HKEY_DYN_DATA', |
80 | | | 'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD' |
81 | | | ) |
82 | | | ), |
83 | | | 'SYMBOLS' => array( |
84 | | | '=' |
85 | | | ), |
86 | | | 'CASE_SENSITIVE' => array( |
87 | | | GESHI_COMMENTS => false, |
88 | | | // 1 => false, |
89 | | | // 2 => false, |
90 | | | 3 => false |
91 | | | ), |
92 | | | 'STYLES' => array( |
93 | | | 'KEYWORDS' => array( |
94 | | | // 1 => 'color: #00CCFF;', |
95 | | | // 2 => 'color: #0000FF;', |
96 | | | 3 => 'color: #800000;' |
97 | | | ), |
98 | | | 'COMMENTS' => array( |
99 | | | 1 => 'color: #009900;' |
100 | | | ), |
101 | | | 'ESCAPE_CHAR' => array( |
102 | | | ), |
103 | | | 'BRACKETS' => array( |
104 | | | |
105 | | | ), |
106 | | | 'STRINGS' => array( |
107 | | | |
108 | | | ), |
109 | | | 'NUMBERS' => array( |
110 | | | ), |
111 | | | 'METHODS' => array( |
112 | | | ), |
113 | | | 'SYMBOLS' => array( |
114 | | | |
115 | | | ), |
116 | | | 'SCRIPT' => array( |
117 | | | ), |
118 | | | 'REGEXPS' => array( |
119 | | | |
120 | | | 1 => 'color: #0000FF;', |
121 | | | 2 => '', |
122 | | | 3 => 'color: #0000FF;', |
123 | | | 4 => 'color: #0000FF;', |
124 | | | 5 => '', |
125 | | | 6 => '', |
126 | | | 7 => '', |
127 | | | 8 => 'color: #FF6600;', |
128 | | | ) |
129 | | | ), |
130 | | | 'URLS' => array( |
131 | | | // 1 => '', |
132 | | | // 2 => '', |
133 | | | 3 => '' |
134 | | | ), |
135 | | | 'OOLANG' => false, |
136 | | | 'OBJECT_SPLITTERS' => array( |
137 | | | ), |
138 | | | 'REGEXPS' => array( |
139 | | | // Highlight Key Delimiters |
140 | | | |
141 | | | GESHI_SEARCH => '((^|\\n)\\s*)(\\\\\\[(.*)\\\\\\])(\\s*(\\n|$))', |
142 | | | GESHI_REPLACE => '\\3', |
143 | | | GESHI_MODIFIERS => '', |
144 | | | GESHI_BEFORE => '\\1', |
145 | | | GESHI_AFTER => '\\5' |
146 | | | // GESHI_CLASS => 'kw1' |
147 | | | ), |
148 | | | // Highlight File Format Header Version 5 |
149 | | | 1 => array( |
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' |
156 | | | ), |
157 | | | // Highlight File Format Header Version 4 |
158 | | | 2 => array( |
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' |
165 | | | ), |
166 | | | // Highlight dword: 32 bit integer values |
167 | | | 3 => array( |
168 | | | GESHI_SEARCH => '(=\s*)(dword:[0-9a-fA-F]{8})(\s*$)', |
169 | | | GESHI_REPLACE => '\\2', |
170 | | | GESHI_MODIFIERS => 'm', |
171 | | | GESHI_BEFORE => '\\1', |
172 | | | GESHI_AFTER => '\\3' |
173 | | | // GESHI_CLASS => 'kw2' |
174 | | | ), |
175 | | | // Highlight variable names |
176 | | | 4 => array( |
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' |
183 | | | ), |
184 | | | // Highlight String Values |
185 | | | 5 => array( |
186 | | | GESHI_SEARCH => '(=\s*)(\".*?\")(\s*$)', |
187 | | | GESHI_REPLACE => '\\2', |
188 | | | GESHI_MODIFIERS => 'm', |
189 | | | GESHI_BEFORE => '\\1', |
190 | | | GESHI_AFTER => '\\3', |
191 | | | GESHI_CLASS => 'st0' |
192 | | | ), |
193 | | | // Highlight Hexadecimal Values (Single-Line and Multi-Line) |
194 | | | 6 => array( |
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', |
199 | | | GESHI_AFTER => '', |
200 | | | GESHI_CLASS => 'kw2' |
201 | | | ), |
202 | | | // Highlight Default Variable |
203 | | | 7 => array( |
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' |
210 | | | ), |
211 | | | // Highlight GUID's found anywhere. |
212 | | | 8 => array( |
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', |
216 | | | GESHI_BEFORE => '', |
217 | | | GESHI_AFTER => '', |
218 | | | GESHI_CLASS => 'geshi_guid' |
219 | | | ) |
220 | | | ), |
221 | | | 'STRICT_MODE_APPLIES' => GESHI_NEVER, |
222 | | | 'SCRIPT_DELIMITERS' => array( |
223 | | | ), |
224 | | | 'HIGHLIGHT_STRICT_BLOCK' => array( |
225 | | | ), |
226 | | | 'PARSER_CONTROL' => array( |
227 | | | 'ENABLE_FLAGS' => array( |
228 | | | 'NUMBERS' => GESHI_NEVER, |
229 | | | ) |
230 | | | ) |
231 | | | ); |
232 | | | |
233 | | | ?> |