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.

urbi.php 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <?php
  2. /*************************************************************************************
  3. * urbi.php
  4. * -------
  5. * Author: Alexandre Morgand (morgand.alexandre@gmail.com)
  6. * Copyright: (c) 2011 Morgand (http://gostai.com)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2011/09/10
  9. *
  10. * Urbi language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * -------------------------
  15. *
  16. *************************************************************************************
  17. *
  18. * This file is part of GeSHi.
  19. *
  20. * GeSHi is free software; you can redistribute it and/or modify
  21. * it under the terms of the GNU General Public License as published by
  22. * the Free Software Foundation; either version 2 of the License, or
  23. * (at your option) any later version.
  24. *
  25. * GeSHi is distributed in the hope that it will be useful,
  26. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  27. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  28. * GNU General Public License for more details.
  29. *
  30. * You should have received a copy of the GNU General Public License
  31. * along with GeSHi; if not, write to the Free Software
  32. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  33. *
  34. ************************************************************************************/
  35. $language_data = array (
  36. 'LANG_NAME' => 'Urbi',
  37. 'COMMENT_SINGLE' => array(1 => '//'),
  38. 'COMMENT_MULTI' => array('/*' => '*/'),
  39. 'COMMENT_REGEXP' => array(
  40. //Multiline-continued single-line comments
  41. 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
  42. //Multiline-continued preprocessor define
  43. 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m',
  44. // Urbi warning.
  45. 3 => "#\[[0-9a-f]{8}:warning\].*#",
  46. // Urbi message from echo.
  47. 4 => '#\[[0-9a-f]{8}\] \*\*\*.*#',
  48. // Urbi error message.
  49. 6 => '#\[[0-9a-f]{8}:error\].*#',
  50. // Urbi system message.
  51. 5 => '#\[00.*\].*#',
  52. // Nested comment. Max depth 4.
  53. 7 => '#\/\*(.|\n)*\/\*(.|\n)*\*\/(.|\n)*\*\/#',
  54. ),
  55. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  56. 'QUOTEMARKS' => array(
  57. 0 => '"',
  58. 1 => '\'',
  59. ),
  60. // For Urbi, disable escape char is better.
  61. 'ESCAPE_CHAR' => '\\',
  62. 'ESCAPE_REGEXP' => array(
  63. //Simple Single Char Escapes
  64. 1 => "#\\\\[abfnrtv\\\'\"?\n]#",
  65. //Hexadecimal Char Specs
  66. 2 => "#\\\\x[\da-fA-F]{2}#",
  67. //Hexadecimal Char Specs
  68. 3 => "#\\\\u[\da-fA-F]{4}#",
  69. //Hexadecimal Char Specs
  70. 4 => "#\\\\U[\da-fA-F]{8}#",
  71. //Octal Char Specs
  72. 5 => "#\\\\[0-7]{1,3}#",
  73. ),
  74. 'NUMBERS' =>
  75. GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
  76. GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
  77. GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
  78. 'KEYWORDS' => array(
  79. // Condition keywords.
  80. 1 => array(
  81. 'at', 'at;', 'at|', 'at&', 'at,', 'break', 'call', 'case', 'catch', 'continue',
  82. 'do', 'else', 'every', 'every&', 'every,', 'every;', 'every|', 'for', 'for&',
  83. 'for,', 'for;', 'foreach', 'for|', 'freezeif', 'goto', 'if', 'in', 'loop',
  84. 'loop&', 'loop,', 'loop;', 'loop|', 'or_eq', 'stopif', 'switch', 'try',
  85. 'waituntil', 'when', 'whenever', 'while', 'while&', 'while,', 'while;',
  86. 'while|', 'throw', 'onleave', 'watch', 'return', 'and_eq', 'default', 'finally',
  87. 'timeout', 'xor_eq'
  88. ),
  89. // Type.
  90. 2 => array(
  91. 'virtual', 'using', 'namespace', 'inline', 'protected', 'private', 'public',
  92. 'typename', 'typeid', 'class', 'const_cast', 'dynamic_cast', 'friend',
  93. 'template', 'enum', 'static_cast', 'reinterpret_cast', 'mutable', 'explicit'
  94. ),
  95. // Standard function.
  96. 3 => array(
  97. 'this', 'sizeof', 'delete', 'assert', 'isdef', 'compl', 'detach',
  98. 'disown', '__HERE__', 'asm'
  99. ),
  100. // Type.
  101. 4 => array(
  102. 'char', 'const', 'double', 'int', 'long', 'typedef', 'union',
  103. 'unsigned', 'var', 'short', 'wchar_t', 'volatile', 'signed', 'bool',
  104. 'float', 'struct', 'auto', 'register', 'static', 'extern', 'function',
  105. 'export', 'external', 'internal', 'closure', 'BIN'
  106. ),
  107. ),
  108. 'SYMBOLS' => array(
  109. 0 => array('(', ')', '{', '}', '[', ']'),
  110. 1 => array('<', '>','=', '!=', '==', '==='),
  111. 2 => array('+', '-', '*', '/', '%', 'bitand', 'bitor', 'xor'),
  112. 3 => array('!', '^', '&', '|'),
  113. 4 => array('?', ':', ';')
  114. ),
  115. 'CASE_SENSITIVE' => array(
  116. GESHI_COMMENTS => false,
  117. 1 => true,
  118. 2 => true,
  119. 3 => true,
  120. 4 => true,
  121. ),
  122. 'STYLES' => array(
  123. 'KEYWORDS' => array(
  124. 1 => 'color: #0000ff;',
  125. 2 => 'color: #0000ff;',
  126. 3 => 'color: #0000dd;',
  127. 4 => 'color: #0000ff;'
  128. ),
  129. 'COMMENTS' => array(
  130. 1 => 'color: #666666;',
  131. 2 => 'color: #339900;',
  132. 3 => 'color: #d46b0f;',
  133. 4 => 'color: #20b537;',
  134. 5 => 'color: #73776f;',
  135. 6 => 'color: #a71616;',
  136. 7 => 'color: #666666;',
  137. 'MULTI' => 'color: #666666; font-style: italic;'
  138. ),
  139. 'ESCAPE_CHAR' => array(
  140. 0 => 'color: #ff0000;',
  141. 1 => 'color: #ff0000;',
  142. ),
  143. 'BRACKETS' => array(
  144. 0 => 'color: #7a0874; font-weight: bold;'
  145. ),
  146. 'STRINGS' => array(
  147. 0 => 'color: #ff0000;',
  148. 1 => 'color: #007788;'
  149. ),
  150. 'NUMBERS' => array(
  151. 0 => 'color: #0000dd;'
  152. ),
  153. 'METHODS' => array(
  154. 1 => 'color: #007788;',
  155. 2 => 'color: #007788;'
  156. ),
  157. 'SYMBOLS' => array(
  158. 0 => 'color: #008000;',
  159. 1 => 'color: #0000f8;',
  160. 2 => 'color: #000040;',
  161. 3 => 'color: #000040; font-weight: bold;',
  162. 4 => 'color: #008080;'
  163. ),
  164. 'REGEXPS' => array(
  165. 0 => 'color: #0000dd',
  166. 1 => 'color: #0000dd;',
  167. 2 => 'color: #0000dd;',
  168. 3 => 'color: #0000dd;',
  169. ),
  170. 'SCRIPT' => array(
  171. )
  172. ),
  173. 'URLS' => array(
  174. 1 => '',
  175. 2 => '',
  176. 3 => '',
  177. 4 => ''
  178. ),
  179. 'OOLANG' => true,
  180. 'OBJECT_SPLITTERS' => array(
  181. 1 => '.',
  182. 2 => '::',
  183. // FIXME: add -> splitter.
  184. ),
  185. 'REGEXPS' => array(
  186. 0 => '0x[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])*',
  187. 1 => '[0-9]([0-9_]*[0-9])*(e|E)(-|\+)?[0-9]([0-9_]*[0-9])*',
  188. 2 => '[0-9]([0-9_]*[0-9])*(min|s|ms|h|d)',
  189. 3 => '[0-9]+_([0-9_])*[0-9]',
  190. ),
  191. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  192. 'SCRIPT_DELIMITERS' => array(
  193. ),
  194. 'HIGHLIGHT_STRICT_BLOCK' => array(
  195. ),
  196. 'TAB_WIDTH' => 4,
  197. );
  198. ?>