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.

oz.php 4.9KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?php
  2. /*************************************************************************************
  3. * oz.php
  4. * --------
  5. * Author: Wolfgang Meyer (Wolfgang.Meyer@gmx.net)
  6. * Copyright: (c) 2010 Wolfgang Meyer
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2010/01/03
  9. *
  10. * Oz language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. *
  15. *************************************************************************************
  16. *
  17. * This file is part of GeSHi.
  18. *
  19. * GeSHi is free software; you can redistribute it and/or modify
  20. * it under the terms of the GNU General Public License as published by
  21. * the Free Software Foundation; either version 2 of the License, or
  22. * (at your option) any later version.
  23. *
  24. * GeSHi is distributed in the hope that it will be useful,
  25. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  27. * GNU General Public License for more details.
  28. *
  29. * You should have received a copy of the GNU General Public License
  30. * along with GeSHi; if not, write to the Free Software
  31. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  32. *
  33. ************************************************************************************/
  34. $language_data = array(
  35. 'LANG_NAME' => 'OZ',
  36. 'COMMENT_SINGLE' => array(1 => '%'),
  37. 'COMMENT_MULTI' => array('/*' => '*/'),
  38. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  39. 'QUOTEMARKS' => array('"','\''),
  40. 'ESCAPE_CHAR' => '\\',
  41. 'NUMBERS' => array(),
  42. 'KEYWORDS' => array(
  43. 1 => array(
  44. 'declare','local','in','end','proc','fun','functor','require','prepare',
  45. 'import','export','define','at','case','then','else','of','elseof',
  46. 'elsecase','if','elseif','class','from','prop','attr','feat','meth',
  47. 'self','true','false','unit','div','mod','andthen','orelse','cond','or',
  48. 'dis','choice','not','thread','try','catch','finally','raise','lock',
  49. 'skip','fail','for','do'
  50. )
  51. ),
  52. 'CASE_SENSITIVE' => array(
  53. GESHI_COMMENTS => false,
  54. 1 => true
  55. ),
  56. 'SYMBOLS' => array(
  57. '@', '!', '|', '<-', ':=', '<', '>', '=<', '>=', '<=', '#', '~', '.',
  58. '*', '-', '+', '/', '<:', '>:', '=:', '=<:', '>=:', '\\=', '\\=:', ',',
  59. '!!', '...', '==', '::', ':::'
  60. ),
  61. 'STYLES' => array(
  62. 'REGEXPS' => array(
  63. 1 => 'color: #0000ff;',
  64. 2 => 'color: #00a030;',
  65. 3 => 'color: #bc8f8f;',
  66. 4 => 'color: #0000ff;',
  67. 5 => 'color: #a020f0;'
  68. ),
  69. 'ESCAPE_CHAR' => array(
  70. 0 => 'color: #bc8f8f;'
  71. ),
  72. 'KEYWORDS' => array(
  73. 1 => 'color: #a020f0;'
  74. ),
  75. 'COMMENTS' => array(
  76. 1 => 'color: #B22222;',
  77. 'MULTI' => 'color: #B22222;'
  78. ),
  79. 'STRINGS' => array(
  80. 0 => 'color: #bc8f8f;'
  81. ),
  82. 'SYMBOLS' => array(
  83. 0 => 'color: #a020f0;'
  84. ),
  85. 'BRACKETS' => array(),
  86. 'NUMBERS' => array(),
  87. 'METHODS' => array(),
  88. 'SCRIPT' => array()
  89. ),
  90. 'OOLANG' => false,
  91. 'OBJECT_SPLITTERS' => array(),
  92. 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
  93. 'SCRIPT_DELIMITERS' => array(),
  94. 'HIGHLIGHT_STRICT_BLOCK' => array(),
  95. 'URLS' => array(
  96. 1 => ''
  97. ),
  98. 'REGEXPS' => array(
  99. // function and procedure definition
  100. 1 => array(
  101. GESHI_SEARCH => "(proc|fun)([^{}\n\)]*)(\\{)([\$A-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9_.]*)",
  102. GESHI_REPLACE => '\4',
  103. GESHI_MODIFIERS => '',
  104. GESHI_BEFORE => '\1\2\3',
  105. GESHI_AFTER => ''
  106. ),
  107. // class definition
  108. 2 => array(
  109. GESHI_SEARCH => "(class)([^A-Z\$]*)([\$A-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9_.]*)",
  110. GESHI_REPLACE => '\3\4',
  111. GESHI_MODIFIERS => '',
  112. GESHI_BEFORE => '\1\2',
  113. GESHI_AFTER => ''
  114. ),
  115. // single character
  116. 3 => array(
  117. GESHI_SEARCH => "&amp;.",
  118. GESHI_REPLACE => '\0',
  119. GESHI_MODIFIERS => '',
  120. GESHI_BEFORE => '',
  121. GESHI_AFTER => ''
  122. ),
  123. // method definition
  124. 4 => array(
  125. GESHI_SEARCH => "(meth)([^a-zA-Z]+)([a-zA-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9]*)",
  126. GESHI_REPLACE => '\3',
  127. GESHI_MODIFIERS => '',
  128. GESHI_BEFORE => '\1\2',
  129. GESHI_AFTER => ''
  130. ),
  131. // highlight "[]"
  132. // ([] is actually a keyword, but that causes problems in validation; putting it into symbols doesn't work.)
  133. 5 => array(
  134. GESHI_SEARCH => "\[\]",
  135. GESHI_REPLACE => '\0',
  136. GESHI_MODIFIERS => '',
  137. GESHI_BEFORE => '',
  138. GESHI_AFTER => ''
  139. )
  140. )
  141. );
  142. ?>