KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

188 lines
5.8KB

  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.8.11
  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. $language_data = array (
  44. 'LANG_NAME' => 'PCRE',
  45. 'COMMENT_SINGLE' => array(),
  46. 'COMMENT_MULTI' => array(
  47. ),
  48. 'COMMENT_REGEXP' => array(
  49. // Non-matching groups
  50. 1 => "/(?<=\()\?(?::|(?=\())/",
  51. // Modifier groups
  52. 2 => "/(?<=\()\?[cdegimopsuxUX\-]+(?::|(?=\)))/",
  53. // Look-Aheads
  54. 3 => "/(?<=\()\?[!=]/",
  55. // Look-Behinds
  56. 4 => "/(?<=\()\?<[!=]/",
  57. // Forward Matching
  58. 5 => "/(?<=\()\?>/",
  59. // Recursive Matching
  60. 6 => "/(?<=\()\?R(?=\))/",
  61. // Named Subpattern
  62. 7 => "/(?<=\()\?(?:P?<\w+>|\d+(?=\))|P[=>]\w+(?=\)))/",
  63. // Back Reference
  64. 8 => "/\\\\(?:[1-9]\d?|g\d+|g\{(?:-?\d+|\w+)\}|k<\w+>|k'\w+'|k\{\w+\})/",
  65. // Byte sequence: Octal
  66. 9 => "/\\\\[0-7]{2,3}/",
  67. // Byte sequence: Hex
  68. 10 => "/\\\\x[0-9a-fA-F]{2}/",
  69. // Byte sequence: Hex
  70. 11 => "/\\\\u[0-9a-fA-F]{4}/",
  71. // Byte sequence: Hex
  72. 12 => "/\\\\U[0-9a-fA-F]{8}/",
  73. // Byte sequence: Unicode
  74. 13 => "/\\\\[pP]\{[^}\n]+\}/",
  75. // One-Char Escapes
  76. 14 => "/\\\\[abdefnrstvwzABCDGSWXZ\\\\\\.\[\]\(\)\{\}\^\\\$\?\+\*]/",
  77. // Byte sequence: Control-X sequence
  78. 15 => "/\\\\c./",
  79. // Quantifier
  80. 16 => "/\{(?:\d+,?|\d*,\d+)\}/",
  81. // Comment Subpattern
  82. 17 => "/(?<=\()\?#[^\)]*/",
  83. ),
  84. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  85. 'QUOTEMARKS' => array(),
  86. 'ESCAPE_CHAR' => '\\',
  87. 'KEYWORDS' => array(
  88. ),
  89. 'SYMBOLS' => array(
  90. 0 => array('.'),
  91. 1 => array('(', ')'),
  92. 2 => array('[', ']', '|'),
  93. 3 => array('^', '$'),
  94. 4 => array('?', '+', '*'),
  95. ),
  96. 'CASE_SENSITIVE' => array(
  97. GESHI_COMMENTS => false,
  98. ),
  99. 'STYLES' => array(
  100. 'KEYWORDS' => array(
  101. ),
  102. 'COMMENTS' => array(
  103. 1 => 'color: #993333; font-weight: bold;',
  104. 2 => 'color: #cc3300; font-weight: bold;',
  105. 3 => 'color: #cc0066; font-weight: bold;',
  106. 4 => 'color: #cc0066; font-weight: bold;',
  107. 5 => 'color: #cc6600; font-weight: bold;',
  108. 6 => 'color: #cc00cc; font-weight: bold;',
  109. 7 => 'color: #cc9900; font-weight: bold; font-style: italic;',
  110. 8 => 'color: #cc9900; font-style: italic;',
  111. 9 => 'color: #669933; font-style: italic;',
  112. 10 => 'color: #339933; font-style: italic;',
  113. 11 => 'color: #339966; font-style: italic;',
  114. 12 => 'color: #339999; font-style: italic;',
  115. 13 => 'color: #663399; font-style: italic;',
  116. 14 => 'color: #999933; font-style: italic;',
  117. 15 => 'color: #993399; font-style: italic;',
  118. 16 => 'color: #333399; font-style: italic;',
  119. 17 => 'color: #666666; font-style: italic;',
  120. 'MULTI' => 'color: #666666; font-style: italic;'
  121. ),
  122. 'ESCAPE_CHAR' => array(
  123. 0 => 'color: #000099; font-weight: bold;',
  124. 'HARD' => 'color: #000099; font-weight: bold;'
  125. ),
  126. 'BRACKETS' => array(
  127. 0 => 'color: #009900;'
  128. ),
  129. 'STRINGS' => array(
  130. 0 => 'color: #ff0000;',
  131. ),
  132. 'NUMBERS' => array(
  133. 0 => 'color: #cc66cc;'
  134. ),
  135. 'METHODS' => array(
  136. 1 => 'color: #006600;',
  137. 2 => 'color: #006600;'
  138. ),
  139. 'SYMBOLS' => array(
  140. 0 => 'color: #333399; font-weight: bold;',
  141. 1 => 'color: #993333; font-weight: bold;',
  142. 2 => 'color: #339933; font-weight: bold;',
  143. 3 => 'color: #333399; font-weight: bold;',
  144. 4 => 'color: #333399; font-style: italic;'
  145. ),
  146. 'REGEXPS' => array(
  147. ),
  148. 'SCRIPT' => array(
  149. )
  150. ),
  151. 'URLS' => array(
  152. ),
  153. 'OOLANG' => false,
  154. 'OBJECT_SPLITTERS' => array(
  155. ),
  156. 'REGEXPS' => array(
  157. ),
  158. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  159. 'SCRIPT_DELIMITERS' => array(
  160. ),
  161. 'HIGHLIGHT_STRICT_BLOCK' => array(
  162. ),
  163. 'PARSER_CONTROL' => array(
  164. 'ENABLE_FLAGS' => array(
  165. 'BRACKETS' => GESHI_NEVER,
  166. 'NUMBERS' => GESHI_NEVER
  167. )
  168. )
  169. );
  170. ?>