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.

165 lines
5.5KB

  1. <?php
  2. /*************************************************************************************
  3. * pascal.php
  4. * ----------
  5. * Author: Tux (tux@inamil.cz)
  6. * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2004/07/26
  9. *
  10. * Pascal language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/05/23 (1.0.7.22)
  15. * - Added description of extra language features (SF#1970248)
  16. * 2004/11/27 (1.0.2)
  17. * - Added support for multiple object splitters
  18. * 2004/10/27 (1.0.1)
  19. * - Added support for URLs
  20. * 2004/08/05 (1.0.0)
  21. * - Added support for symbols
  22. * 2004/07/27 (0.9.1)
  23. * - Pascal is OO language. Some new words.
  24. * 2004/07/26 (0.9.0)
  25. * - First Release
  26. *
  27. * TODO (updated 2004/11/27)
  28. * -------------------------
  29. *
  30. *************************************************************************************
  31. *
  32. * This file is part of GeSHi.
  33. *
  34. * GeSHi is free software; you can redistribute it and/or modify
  35. * it under the terms of the GNU General Public License as published by
  36. * the Free Software Foundation; either version 2 of the License, or
  37. * (at your option) any later version.
  38. *
  39. * GeSHi is distributed in the hope that it will be useful,
  40. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  41. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  42. * GNU General Public License for more details.
  43. *
  44. * You should have received a copy of the GNU General Public License
  45. * along with GeSHi; if not, write to the Free Software
  46. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  47. *
  48. ************************************************************************************/
  49. $language_data = array (
  50. 'LANG_NAME' => 'Pascal',
  51. 'COMMENT_SINGLE' => array(1 => '//'),
  52. 'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'),
  53. //Compiler directives
  54. 'COMMENT_REGEXP' => array(2 => '/\\{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'),
  55. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  56. 'QUOTEMARKS' => array("'"),
  57. 'ESCAPE_CHAR' => '',
  58. 'KEYWORDS' => array(
  59. 1 => array(
  60. 'absolute','asm','assembler','begin','break','case','catch','cdecl',
  61. 'const','constructor','default','destructor','div','do','downto',
  62. 'else','end','except','export','exports','external','far',
  63. 'finalization','finally','for','forward','function','goto','if',
  64. 'implementation','in','index','inherited','initialization','inline',
  65. 'interface','interrupt','label','library','mod','name','not','of',
  66. 'or','overload','override','private','procedure','program',
  67. 'property','protected','public','published','raise','repeat',
  68. 'resourcestring','shl','shr','stdcall','stored','switch','then',
  69. 'to','try','type','unit','until','uses','var','while','with','xor'
  70. ),
  71. 2 => array(
  72. 'nil', 'false', 'true',
  73. ),
  74. 3 => array(
  75. 'abs','and','arc','arctan','blockread','blockwrite','chr','dispose',
  76. 'cos','eof','eoln','exp','get','ln','new','odd','ord','ordinal',
  77. 'pred','read','readln','sin','sqrt','succ','write','writeln'
  78. ),
  79. 4 => array(
  80. 'ansistring','array','boolean','byte','bytebool','char','file',
  81. 'integer','longbool','longint','object','packed','pointer','real',
  82. 'record','set','shortint','smallint','string','union','word'
  83. ),
  84. ),
  85. 'CASE_SENSITIVE' => array(
  86. GESHI_COMMENTS => false,
  87. 1 => false,
  88. 2 => false,
  89. 3 => false,
  90. 4 => false,
  91. ),
  92. 'SYMBOLS' => array(
  93. 0 => array('(', ')', '[', ']'),
  94. 1 => array('.', ',', ':', ';'),
  95. 2 => array('@', '^'),
  96. 3 => array('=', '+', '-', '*', '/')
  97. ),
  98. 'STYLES' => array(
  99. 'KEYWORDS' => array(
  100. 1 => 'color: #000000; font-weight: bold;',
  101. 2 => 'color: #000000; font-weight: bold;',
  102. 3 => 'color: #000066;',
  103. 4 => 'color: #000066; font-weight: bold;'
  104. ),
  105. 'COMMENTS' => array(
  106. 1 => 'color: #808080; font-style: italic;',
  107. 2 => 'color: #008000; font-style: italic;',
  108. 'MULTI' => 'color: #808080; font-style: italic;'
  109. ),
  110. 'ESCAPE_CHAR' => array(
  111. 0 => 'color: #ff0000; font-weight: bold;'
  112. ),
  113. 'BRACKETS' => array(
  114. 0 => 'color: #009900;'
  115. ),
  116. 'STRINGS' => array(
  117. 0 => 'color: #ff0000;',
  118. //'HARD' => 'color: #ff0000;'
  119. ),
  120. 'NUMBERS' => array(
  121. 0 => 'color: #cc66cc;'
  122. ),
  123. 'METHODS' => array(
  124. 1 => 'color: #006600;'
  125. ),
  126. 'REGEXPS' => array(
  127. 0 => 'color: #0000cc;',
  128. 1 => 'color: #ff0000;'
  129. ),
  130. 'SYMBOLS' => array(
  131. 0 => 'color: #000066;',
  132. 1 => 'color: #000066;',
  133. 2 => 'color: #000066;',
  134. 3 => 'color: #000066;'
  135. ),
  136. 'SCRIPT' => array(
  137. )
  138. ),
  139. 'URLS' => array(
  140. 1 => '',
  141. 2 => '',
  142. 3 => '',
  143. 4 => ''
  144. ),
  145. 'OOLANG' => true,
  146. 'OBJECT_SPLITTERS' => array(
  147. 1 => '.'
  148. ),
  149. 'REGEXPS' => array(
  150. //Hex numbers
  151. 0 => '\$[0-9a-fA-F]+',
  152. //Characters
  153. 1 => '\#(?:\$[0-9a-fA-F]{1,2}|\d{1,3})'
  154. ),
  155. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  156. 'SCRIPT_DELIMITERS' => array(
  157. ),
  158. 'HIGHLIGHT_STRICT_BLOCK' => array(
  159. ),
  160. 'TAB_WIDTH' => 4
  161. );
  162. ?>