[ Index ]
 

Code source de DokuWiki 2006-11-06

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/inc/geshi/ -> reg.php (source)

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


Généré le : Tue Apr 3 20:47:31 2007 par Balluche grâce à PHPXref 0.7