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.

149 lines
6.0KB

  1. <?php
  2. /*************************************************************************************
  3. * q.php
  4. * -----
  5. * Author: Ian Roddis (ian.roddis@proteanmind.net)
  6. * Copyright: (c) 2008 Ian Roddis (http://proteanmind.net)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2009/01/21
  9. *
  10. * q/kdb+ language file for GeSHi.
  11. *
  12. * Based on information available from code.kx.com
  13. *
  14. * CHANGES
  15. * -------
  16. * 2010/01/21 (1.0.0)
  17. * - First Release
  18. *
  19. * TODO (updated <1.0.0>)
  20. * -------------------------
  21. * - Fix the handling of single line comments
  22. *
  23. *************************************************************************************
  24. *
  25. * This file is part of GeSHi.
  26. *
  27. * GeSHi is free software; you can redistribute it and/or modify
  28. * it under the terms of the GNU General Public License as published by
  29. * the Free Software Foundation; either version 2 of the License, or
  30. * (at your option) any later version.
  31. *
  32. * GeSHi is distributed in the hope that it will be useful,
  33. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  34. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  35. * GNU General Public License for more details.
  36. *
  37. * You should have received a copy of the GNU General Public License
  38. * along with GeSHi; if not, write to the Free Software
  39. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  40. *
  41. ************************************************************************************/
  42. $language_data = array (
  43. 'LANG_NAME' => 'q/kdb+',
  44. 'COMMENT_SINGLE' => array(1 => '//'),
  45. 'COMMENT_MULTI' => array(),
  46. 'COMMENT_REGEXP' => array(
  47. 2 => '/ \s\/.*/', # This needs to get fixed up, since it won't catch some instances
  48. # Multi line comments (Moved from REGEXPS)
  49. 3 => '/^\/\s*?\n.*?\n\\\s*?\n/smi'
  50. ),
  51. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  52. 'QUOTEMARKS' => array('"'),
  53. 'ESCAPE_CHAR' => '\\',
  54. 'OOLANG' => false,
  55. 'OBJECT_SPLITTERS' => array(),
  56. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  57. 'SCRIPT_DELIMITERS' => array(),
  58. 'HIGHLIGHT_STRICT_BLOCK' => array(),
  59. 'TAB_WIDTH' => 4,
  60. 'KEYWORDS' => array(
  61. 1 => array(
  62. 'abs', 'acos', 'all', 'and', 'any', 'asc', 'asin', 'asof', 'atan', 'attr', 'avg', 'avgs', 'bin', 'ceiling',
  63. 'cols', 'cor', 'cos', 'count', 'cov', 'cross', 'cut', 'deltas', 'desc', 'dev', 'differ', 'distinct',
  64. 'div', 'each', 'enlist', 'eval', 'except', 'exec', 'exit', 'exp', 'fills', 'first', 'flip', 'floor',
  65. 'fkeys', 'get', 'getenv', 'group', 'gtime', 'hclose', 'hcount', 'hdel', 'hopen', 'hsym', 'iasc', 'idesc',
  66. 'in', 'insert', 'inter', 'inv', 'joins', 'key', 'keys', 'last', 'like', 'load', 'log', 'lower',
  67. 'lsq', 'ltime', 'ltrim', 'mavg', 'max', 'maxs', 'mcount', 'md5', 'mdev', 'med', 'meta', 'min', 'mins',
  68. 'mmax', 'mmin', 'mmu', 'mod', 'msum', 'neg', 'next', 'not', 'null', 'or', 'over', 'parse', 'peach',
  69. 'plist', 'prd', 'prds', 'prev', 'rand', 'rank', 'ratios', 'raze', 'read0', 'read1', 'reciprocal',
  70. 'reverse', 'rload', 'rotate', 'rsave', 'rtrim', 'save', 'scan', 'set', 'setenv', 'show', 'signum',
  71. 'sin', 'sqrt', 'ss', 'ssr', 'string', 'sublist', 'sum', 'sums', 'sv', 'system', 'tables', 'tan', 'til', 'trim',
  72. 'txf', 'type', 'ungroup', 'union', 'upper', 'upsert', 'value', 'var', 'view', 'views', 'vs',
  73. 'wavg', 'within', 'wsum', 'xasc', 'xbar', 'xcol', 'xcols', 'xdesc', 'xexp', 'xgroup', 'xkey',
  74. 'xlog', 'xprev', 'xrank'
  75. ),
  76. # kdb database template keywords
  77. 2 => array(
  78. 'aj', 'by', 'delete', 'fby', 'from', 'ij', 'lj', 'pj', 'select', 'uj', 'update', 'where', 'wj',
  79. ),
  80. ),
  81. 'SYMBOLS' => array(
  82. '?', '#', ',', '_', '@', '.', '^', '~', '$', '!', '\\', '\\', '/:', '\:', "'", "':", '::', '+', '-', '%', '*'
  83. ),
  84. 'CASE_SENSITIVE' => array(
  85. GESHI_COMMENTS => false,
  86. 1 => true,
  87. 2 => true,
  88. ),
  89. 'STYLES' => array(
  90. 'KEYWORDS' => array(
  91. 1 => 'color: #000099; font-weight: bold;',
  92. 2 => 'color: #009900; font-weight: bold;',
  93. ),
  94. 'COMMENTS' => array(
  95. 1 => 'color: #666666; font-style: italic;',
  96. 2 => 'color: #666666; font-style: italic;',
  97. 3 => 'color: #808080; font-style: italic;',
  98. 'MULTI' => 'color: #808080; font-style: italic;'
  99. ),
  100. 'ESCAPE_CHAR' => array(
  101. 0 => 'color: #000099; font-weight: bold;',
  102. 1 => 'color: #000099; font-weight: bold;',
  103. 2 => 'color: #660099; font-weight: bold;',
  104. 3 => 'color: #660099; font-weight: bold;',
  105. 4 => 'color: #660099; font-weight: bold;',
  106. 5 => 'color: #006699; font-weight: bold;',
  107. 'HARD' => '',
  108. ),
  109. 'BRACKETS' => array(
  110. 0 => 'color: #009900;'
  111. ),
  112. 'STRINGS' => array(
  113. 0 => 'color: #990000;'
  114. ),
  115. 'NUMBERS' => array(
  116. 0 => 'color: #0000dd;',
  117. GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
  118. GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
  119. GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
  120. GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
  121. GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
  122. GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
  123. GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
  124. ),
  125. 'METHODS' => array(
  126. 1 => 'color: #202020;',
  127. 2 => 'color: #202020;'
  128. ),
  129. 'SYMBOLS' => array(
  130. 0 => 'color: #339933;'
  131. ),
  132. 'REGEXPS' => array(
  133. 2 => 'color: #999900;',
  134. ),
  135. 'SCRIPT' => array(
  136. )
  137. ),
  138. 'REGEXPS' => array(
  139. # Symbols
  140. 2 => '`[^\s"]*',
  141. ),
  142. 'URLS' => array(
  143. 1 => '',
  144. 2 => '',
  145. ),
  146. );
  147. ?>