File geshi/geshi/reg.php
Last commit: Fri Nov 23 00:12:00 2007 +0100 dankert Farbige Darstellung von Code-Bl?cken mit Hilfe der Bibliothek GESHI.
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.20 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 ************************************************************************************/ 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(), 65 'ESCAPE_CHAR' => '', 66 'KEYWORDS' => array( 67 1 => array(), 68 2 => array() 69 /* Registry Key Constants Not Used 70 3 => array( 71 'HKEY_LOCAL_MACHINE', 72 'HKEY_CLASSES_ROOT', 73 'HKEY_CURRENT_USER', 74 'HKEY_USERS', 75 'HKEY_CURRENT_CONFIG', 76 'HKEY_DYN_DATA', 77 'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD' 78 )/***/ 79 ), 80 'SYMBOLS' => array( ), 81 'CASE_SENSITIVE' => array( 82 GESHI_COMMENTS => false, 83 1 => false, 84 2 => false 85 ), 86 'STYLES' => array( 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;' ), 93 'NUMBERS' => array(), 94 'METHODS' => array(), 95 'SYMBOLS' => array(0 => 'color: #000000;'), 96 'SCRIPT' => array(), 97 'REGEXPS' => array( 98 0 => '', 99 1 => 'color: #0000FF;', 100 2 => '', 101 3 => '', 102 4 => 'color: #0000FF;', 103 5 => '', 104 6 => '', 105 7 => '', 106 8 => '', 107 9 => 'color: #FF6600;', 108 ) 109 ), 110 'OOLANG' => false, 111 'OBJECT_SPLITTERS' => array( 112 ), 113 'REGEXPS' => array( 114 // Highlight Key Delimiters 115 0 => array( 116 GESHI_SEARCH => '((^|\\n)\\s*)(\\\\\\[(.*)\\\\\\])(\\s*(\\n|$))', 117 GESHI_REPLACE => '\\3', 118 GESHI_MODIFIERS => '', 119 GESHI_BEFORE => '\\1', 120 GESHI_AFTER => '\\5', 121 GESHI_CLASS => 'kw1' 122 ), 123 // Highlight File Format Header Version 5 124 1 => array( 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' 131 ), 132 // Highlight File Format Header Version 4 133 2 => array( 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' 140 ), 141 // Highlight dword: 32 bit integer values 142 3 => array( 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', 148 GESHI_CLASS => 'kw2' 149 ), 150 // Highlight variable names 151 4 => array( 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' 158 ), 159 // Highlight String Values 160 5 => array( 161 GESHI_SEARCH => '(=\\s*)(\\"\\;.*\\"\\;)(\\s*(\\n|$))', 162 GESHI_REPLACE => '\\2', 163 GESHI_MODIFIERS => '', 164 GESHI_BEFORE => '\\1', 165 GESHI_AFTER => '\\3', 166 GESHI_CLASS => 'st0' 167 ), 168 // Highlight Hexadecimal Values 169 6 => array( 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', 175 GESHI_CLASS => 'kw2' 176 ), 177 // Highlight Hexadecimal Values (Multi-Line) 178 7 => array( 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', 184 GESHI_CLASS => 'kw2' 185 ), 186 // Highlight Default Variable 187 8 => array( 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' 194 ), 195 // Highlight GUID's found anywhere. 196 9 => array( 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 => '', 200 GESHI_BEFORE => '', 201 GESHI_AFTER => '', 202 GESHI_CLASS => 'geshi_guid' 203 ) 204 ), 205 'STRICT_MODE_APPLIES' => GESHI_NEVER, 206 'SCRIPT_DELIMITERS' => array( 207 ), 208 'HIGHLIGHT_STRICT_BLOCK' => array( 209 ) 210 ); 211 if (isset($this) && is_a($this, 'GeSHi')) { 212 $this->set_numbers_highlighting(false); 213 } 214 ?>
Downloadgeshi/geshi/reg.php
History Fri, 23 Nov 2007 00:12:00 +0100 dankert Farbige Darstellung von Code-Bl?cken mit Hilfe der Bibliothek GESHI.