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.

sql.php 6.6KB

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <?php
  2. /*************************************************************************************
  3. * sql.php
  4. * -------
  5. * Author: Nigel McNie (nigel@geshi.org)
  6. * Contributors:
  7. * - Jürgen Thomas (Juergen.Thomas@vs-polis.de)
  8. * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter)
  9. * Release Version: 1.0.8.11
  10. * Date Started: 2004/06/04
  11. *
  12. * SQL language file for GeSHi.
  13. *
  14. * CHANGES
  15. * -------
  16. * 2010/07/19 (1.0.8.9)
  17. * - Added many more keywords
  18. * 2008/05/23 (1.0.7.22)
  19. * - Added additional symbols for highlighting
  20. * 2004/11/27 (1.0.3)
  21. * - Added support for multiple object splitters
  22. * 2004/10/27 (1.0.2)
  23. * - Added "`" string delimiter
  24. * - Added "#" single comment starter
  25. * 2004/08/05 (1.0.1)
  26. * - Added support for symbols
  27. * - Added many more keywords (mostly MYSQL keywords)
  28. * 2004/07/14 (1.0.0)
  29. * - First Release
  30. *
  31. * TODO (updated 2004/11/27)
  32. * -------------------------
  33. * * Add all keywords
  34. * * Split this to several sql files - mysql-sql, ansi-sql etc
  35. *
  36. *************************************************************************************
  37. *
  38. * This file is part of GeSHi.
  39. *
  40. * GeSHi is free software; you can redistribute it and/or modify
  41. * it under the terms of the GNU General Public License as published by
  42. * the Free Software Foundation; either version 2 of the License, or
  43. * (at your option) any later version.
  44. *
  45. * GeSHi is distributed in the hope that it will be useful,
  46. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  47. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  48. * GNU General Public License for more details.
  49. *
  50. * You should have received a copy of the GNU General Public License
  51. * along with GeSHi; if not, write to the Free Software
  52. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53. *
  54. ************************************************************************************/
  55. $language_data = array (
  56. 'LANG_NAME' => 'SQL',
  57. 'COMMENT_SINGLE' => array(1 =>'--'),
  58. 'COMMENT_MULTI' => array('/*' => '*/'),
  59. 'CASE_KEYWORDS' => 1,
  60. 'QUOTEMARKS' => array("'", '"', '`'),
  61. 'ESCAPE_CHAR' => '\\',
  62. 'KEYWORDS' => array(
  63. 1 => array(
  64. 'ADD', 'ALL', 'ALTER', 'AND', 'AS', 'ASC', 'AUTO_INCREMENT',
  65. 'BEFORE', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOOLEAN', 'BOTH', 'BY',
  66. 'CALL', 'CASE', 'CAST', 'CEIL', 'CEILING', 'CHANGE', 'CHAR', 'CHAR_LENGTH', 'CHARACTER',
  67. 'CHARACTER_LENGTH', 'CHECK', 'CLOB', 'COALESCE', 'COLLATE', 'COLUMN', 'COLUMNS',
  68. 'CONNECT', 'CONSTRAINT', 'CONVERT', 'COUNT', 'CREATE', 'CROSS', 'CURRENT',
  69. 'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER',
  70. 'DATA', 'DATABASE', 'DATABASES', 'DATE', 'DAY', 'DEC', 'DECIMAL', 'DECLARE',
  71. 'DEFAULT', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', 'DISTINCT', 'DOUBLE',
  72. 'DOMAIN', 'DROP',
  73. 'ELSE', 'ENCLOSED', 'END', 'ESCAPED', 'EXCEPT', 'EXEC', 'EXECUTE', 'EXISTS', 'EXP',
  74. 'EXPLAIN', 'EXTRACT',
  75. 'FALSE', 'FIELD', 'FIELDS', 'FILTER', 'FIRST', 'FLOAT', 'FLOOR', 'FLUSH', 'FOR',
  76. 'FOREIGN', 'FROM', 'FULL', 'FUNCTION',
  77. 'GET', 'GROUP', 'GROUPING', 'GO', 'GOTO', 'GRANT', 'GRANTED',
  78. 'HAVING', 'HOUR',
  79. 'IDENTIFIED', 'IDENTITY', 'IF', 'IGNORE', 'IN', 'INCREMENT', 'INDEX', 'INFILE', 'INNER',
  80. 'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERSECTION', 'INTERVAL',
  81. 'INTO', 'IS',
  82. 'JOIN',
  83. 'KEY', 'KEYS', 'KILL',
  84. 'LANGUAGE', 'LARGE', 'LAST', 'LEADING', 'LEFT', 'LENGTH', 'LIKE', 'LIMIT', 'LINES', 'LOAD',
  85. 'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LOWER',
  86. 'MATCH', 'MAX', 'MERGE', 'MIN', 'MINUTE', 'MOD', 'MODIFIES', 'MODIFY', 'MONTH',
  87. 'NATIONAL', 'NATURAL', 'NCHAR', 'NEW', 'NEXT', 'NEXTVAL', 'NONE', 'NOT',
  88. 'NULL', 'NULLABLE', 'NULLIF', 'NULLS', 'NUMBER', 'NUMERIC',
  89. 'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPTIMIZE', 'OPTION',
  90. 'OPTIONALLY', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTFILE', 'OVER',
  91. 'POSITION', 'POWER', 'PRECISION', 'PREPARE', 'PRIMARY', 'PROCEDURAL', 'PROCEDURE',
  92. 'READ', 'REAL', 'REF', 'REFERENCES', 'REFERENCING', 'REGEXP', 'RENAME', 'REPLACE',
  93. 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'RLIKE', 'ROLLBACK', 'ROW',
  94. 'ROW_NUMBER', 'ROWS', 'RESTRICT', 'ROLE', 'ROUTINE', 'ROW_COUNT',
  95. 'SAVEPOINT', 'SEARCH', 'SECOND', 'SECTION', 'SELECT', 'SELF', 'SEQUENCE',
  96. 'SESSION', 'SET', 'SETVAL', 'SHOW', 'SIMILAR', 'SIZE', 'SMALLINT', 'SOME',
  97. 'SONAME', 'SOURCE', 'SPACE', 'SQL', 'SQRT', 'START', 'STATUS',
  98. 'STRAIGHT_JOIN', 'STRUCTURE', 'STYLE', 'SUBSTRING', 'SUM',
  99. 'TABLE', 'TABLE_NAME', 'TABLES', 'TERMINATED', 'TEMPORARY', 'THEN', 'TIME',
  100. 'TIMESTAMP', 'TO', 'TRAILING', 'TRANSACTION', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNCATE',
  101. 'TRUSTED', 'TYPE',
  102. 'UNDER', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLOCK', 'UNSIGNED',
  103. 'UPDATE', 'UPPER', 'USE', 'USER', 'USING',
  104. 'VALUE', 'VALUES', 'VARCHAR', 'VARIABLES', 'VARYING', 'VIEW',
  105. 'WHEN', 'WHERE', 'WITH', 'WITHIN', 'WITHOUT', 'WORK', 'WRITE',
  106. 'XOR',
  107. 'YEAR',
  108. 'ZEROFILL'
  109. )
  110. ),
  111. 'SYMBOLS' => array(
  112. '(', ')', '=', '<', '>', '|', ',', '.', '+', '-', '*', '/'
  113. ),
  114. 'CASE_SENSITIVE' => array(
  115. GESHI_COMMENTS => false,
  116. 1 => false
  117. ),
  118. 'STYLES' => array(
  119. 'KEYWORDS' => array(
  120. 1 => 'color: #993333; font-weight: bold;'
  121. ),
  122. 'COMMENTS' => array(
  123. 1 => 'color: #808080; font-style: italic;',
  124. //2 => 'color: #808080; font-style: italic;',
  125. 'MULTI' => 'color: #808080; font-style: italic;'
  126. ),
  127. 'ESCAPE_CHAR' => array(
  128. 0 => 'color: #000099; font-weight: bold;'
  129. ),
  130. 'BRACKETS' => array(
  131. 0 => 'color: #66cc66;'
  132. ),
  133. 'STRINGS' => array(
  134. 0 => 'color: #ff0000;'
  135. ),
  136. 'NUMBERS' => array(
  137. 0 => 'color: #cc66cc;'
  138. ),
  139. 'METHODS' => array(
  140. ),
  141. 'SYMBOLS' => array(
  142. 0 => 'color: #66cc66;'
  143. ),
  144. 'SCRIPT' => array(
  145. ),
  146. 'REGEXPS' => array(
  147. )
  148. ),
  149. 'URLS' => array(
  150. 1 => ''
  151. ),
  152. 'OOLANG' => false,
  153. 'OBJECT_SPLITTERS' => array(
  154. ),
  155. 'REGEXPS' => array(
  156. ),
  157. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  158. 'SCRIPT_DELIMITERS' => array(
  159. ),
  160. 'HIGHLIGHT_STRICT_BLOCK' => array(
  161. )
  162. );
  163. ?>