1<?php 2/************************************************************************************* 3 * pcre.php 4 * -------- 5 * Author: Benny Baumann (BenBE@geshi.org) 6 * Copyright: (c) 2010 Benny Baumann (http://qbnz.com/highlighter/) 7 * Release Version: 1.0.9.1 8 * Date Started: 2010/05/22 9 * 10 * PCRE language file for GeSHi. 11 * 12 * NOTE: This language file handles plain PCRE expressions without delimiters. 13 * If you want to highlight PCRE with delimiters you should use the 14 * Perl language file instead. 15 * 16 * CHANGES 17 * ------- 18 * 2010/05/22 (1.0.8.8) 19 * - First Release 20 * 21 * TODO (updated 2010/05/22) 22 * ------------------------- 23 * 24 ************************************************************************************* 25 * 26 * This file is part of GeSHi. 27 * 28 * GeSHi is free software; you can redistribute it and/or modify 29 * it under the terms of the GNU General Public License as published by 30 * the Free Software Foundation; either version 2 of the License, or 31 * (at your option) any later version. 32 * 33 * GeSHi is distributed in the hope that it will be useful, 34 * but WITHOUT ANY WARRANTY; without even the implied warranty of 35 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 * GNU General Public License for more details. 37 * 38 * You should have received a copy of the GNU General Public License 39 * along with GeSHi; if not, write to the Free Software 40 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 * 42 ************************************************************************************/ 43 44$language_data = array ( 45 'LANG_NAME' => 'PCRE', 46 'COMMENT_SINGLE' => array(), 47 'COMMENT_MULTI' => array( 48 ), 49 'COMMENT_REGEXP' => array( 50 // Non-matching groups 51 1 => "/(?<=\()\?(?::|(?=\())/", 52 53 // Modifier groups 54 2 => "/(?<=\()\?[cdegimopsuxUX\-]+(?::|(?=\)))/", 55 56 // Look-Aheads 57 3 => "/(?<=\()\?[!=]/", 58 59 // Look-Behinds 60 4 => "/(?<=\()\?<[!=]/", 61 62 // Forward Matching 63 5 => "/(?<=\()\?>/", 64 65 // Recursive Matching 66 6 => "/(?<=\()\?R(?=\))/", 67 68 // Named Subpattern 69 7 => "/(?<=\()\?(?:P?<\w+>|\d+(?=\))|P[=>]\w+(?=\)))/", 70 71 // Back Reference 72 8 => "/\\\\(?:[1-9]\d?|g\d+|g\{(?:-?\d+|\w+)\}|k<\w+>|k'\w+'|k\{\w+\})/", 73 74 // Byte sequence: Octal 75 9 => "/\\\\[0-7]{2,3}/", 76 77 // Byte sequence: Hex 78 10 => "/\\\\x[0-9a-fA-F]{2}/", 79 80 // Byte sequence: Hex 81 11 => "/\\\\u[0-9a-fA-F]{4}/", 82 83 // Byte sequence: Hex 84 12 => "/\\\\U[0-9a-fA-F]{8}/", 85 86 // Byte sequence: Unicode 87 13 => "/\\\\[pP]\{[^}\n]+\}/", 88 89 // One-Char Escapes 90 14 => "/\\\\[abdefnrstvwzABCDGSWXZ\\\\\\.\[\]\(\)\{\}\^\\\$\?\+\*]/", 91 92 // Byte sequence: Control-X sequence 93 15 => "/\\\\c./", 94 95 // Quantifier 96 16 => "/\{(?:\d+,?|\d*,\d+)\}/", 97 98 // Comment Subpattern 99 17 => "/(?<=\()\?#[^\)]*/", 100 ), 101 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 102 'QUOTEMARKS' => array(), 103 'ESCAPE_CHAR' => '\\', 104 'KEYWORDS' => array( 105 ), 106 'SYMBOLS' => array( 107 0 => array('.'), 108 1 => array('(', ')'), 109 2 => array('[', ']', '|'), 110 3 => array('^', '$'), 111 4 => array('?', '+', '*'), 112 ), 113 'CASE_SENSITIVE' => array( 114 GESHI_COMMENTS => false, 115 ), 116 'STYLES' => array( 117 'KEYWORDS' => array( 118 ), 119 'COMMENTS' => array( 120 1 => 'color: #993333; font-weight: bold;', 121 2 => 'color: #cc3300; font-weight: bold;', 122 3 => 'color: #cc0066; font-weight: bold;', 123 4 => 'color: #cc0066; font-weight: bold;', 124 5 => 'color: #cc6600; font-weight: bold;', 125 6 => 'color: #cc00cc; font-weight: bold;', 126 7 => 'color: #cc9900; font-weight: bold; font-style: italic;', 127 8 => 'color: #cc9900; font-style: italic;', 128 9 => 'color: #669933; font-style: italic;', 129 10 => 'color: #339933; font-style: italic;', 130 11 => 'color: #339966; font-style: italic;', 131 12 => 'color: #339999; font-style: italic;', 132 13 => 'color: #663399; font-style: italic;', 133 14 => 'color: #999933; font-style: italic;', 134 15 => 'color: #993399; font-style: italic;', 135 16 => 'color: #333399; font-style: italic;', 136 17 => 'color: #666666; font-style: italic;', 137 'MULTI' => 'color: #666666; font-style: italic;' 138 ), 139 'ESCAPE_CHAR' => array( 140 0 => 'color: #000099; font-weight: bold;', 141 'HARD' => 'color: #000099; font-weight: bold;' 142 ), 143 'BRACKETS' => array( 144 0 => 'color: #009900;' 145 ), 146 'STRINGS' => array( 147 0 => 'color: #ff0000;', 148 ), 149 'NUMBERS' => array( 150 0 => 'color: #cc66cc;' 151 ), 152 'METHODS' => array( 153 1 => 'color: #006600;', 154 2 => 'color: #006600;' 155 ), 156 'SYMBOLS' => array( 157 0 => 'color: #333399; font-weight: bold;', 158 1 => 'color: #993333; font-weight: bold;', 159 2 => 'color: #339933; font-weight: bold;', 160 3 => 'color: #333399; font-weight: bold;', 161 4 => 'color: #333399; font-style: italic;' 162 ), 163 'REGEXPS' => array( 164 ), 165 'SCRIPT' => array( 166 ) 167 ), 168 'URLS' => array( 169 ), 170 'OOLANG' => false, 171 'OBJECT_SPLITTERS' => array( 172 ), 173 'REGEXPS' => array( 174 ), 175 'STRICT_MODE_APPLIES' => GESHI_NEVER, 176 'SCRIPT_DELIMITERS' => array( 177 ), 178 'HIGHLIGHT_STRICT_BLOCK' => array( 179 ), 180 'PARSER_CONTROL' => array( 181 'ENABLE_FLAGS' => array( 182 'BRACKETS' => GESHI_NEVER, 183 'NUMBERS' => GESHI_NEVER 184 ) 185 ) 186); 187