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.

155 lines
4.8KB

  1. <?php
  2. /*************************************************************************************
  3. * sparql.php
  4. * -------
  5. * Author: Karima Rafes (karima.rafes@bordercloud.com)
  6. * Copyright: (c) 2011 Bourdercloud.com
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2011/11/05
  9. *
  10. * SPARQL language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2011/11/05 (1.0.0)
  15. * - First Release
  16. *
  17. * TODO
  18. * ----
  19. *
  20. *************************************************************************************
  21. *
  22. * This file is part of GeSHi.
  23. *
  24. * GeSHi is free software; you can redistribute it and/or modify
  25. * it under the terms of the GNU General Public License as published by
  26. * the Free Software Foundation; either version 2 of the License, or
  27. * (at your option) any later version.
  28. *
  29. * GeSHi is distributed in the hope that it will be useful,
  30. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. * GNU General Public License for more details.
  33. *
  34. * You should have received a copy of the GNU General Public License
  35. * along with GeSHi; if not, write to the Free Software
  36. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  37. *
  38. ************************************************************************************/
  39. $language_data = array (
  40. 'LANG_NAME' => 'SPARQL',
  41. 'COMMENT_SINGLE' => array('#'),
  42. 'COMMENT_MULTI' => array('/*' => '*/' ),
  43. 'COMMENT_REGEXP' => array(
  44. //IRI (it's not a comment ;)
  45. 1 => "/<[^> ]*>/i"
  46. ),
  47. 'CASE_KEYWORDS' => 1,
  48. 'QUOTEMARKS' => array("'", '"', '`'),
  49. 'ESCAPE_CHAR' => '\\',
  50. 'KEYWORDS' => array(
  51. 1 => array(
  52. 'BASE','PREFIX','SELECT','DISTINCT','REDUCED','CONSTRUCT','DESCRIBE','ASK','FROM',
  53. 'NAMED','WHERE','ORDER','BY','ASC','DESC','LIMIT','OFFSET','OPTIONAL','GRAPH',
  54. 'UNION','FILTER','STR','LANG','LANGMATCHES','DATATYPE','BOUND','SAMETERM',
  55. 'ISIRI','ISURI','ISBLANK',
  56. 'ISLITERAL','REGEX','SUBSTR','TRUE',
  57. 'FALSE','LOAD','CLEAR',
  58. 'DROP','ADD','MOVE','COPY',
  59. 'CREATE','DELETE','INSERT',
  60. 'USING','SILENT','DEFAULT','ALL',
  61. 'DATA','WITH','INTO','TO',
  62. 'AS','GROUP','HAVING','UNDEF',
  63. 'BINDINGS','SERVICE','BIND','MINUS_KEYWORD',
  64. 'IRI','URI', 'BNODE',
  65. 'RAND','ABS','CEIL','FLOOR','ROUND',
  66. 'CONCAT','STRLEN',
  67. 'UCASE','LCASE','ENCODE_FOR_URI',
  68. 'CONTAINS','STRSTARTS',
  69. 'STRENDS','STRBEFORE',
  70. 'STRAFTER','REPLACE',
  71. 'YEAR','MONTH',
  72. 'DAY','HOURS',
  73. 'MINUTES','SECONDS',
  74. 'TIMEZONE','TZ',
  75. 'NOW','MD5',
  76. 'SHA1','SHA224',
  77. 'SHA256','SHA384',
  78. 'SHA512','COALESCE',
  79. 'IF','STRLANG','STRDT',
  80. 'ISNUMERIC','COUNT',
  81. 'SUM','MIN',
  82. 'MAX','AVG','SAMPLE',
  83. 'GROUP_CONCAT ','NOT',
  84. 'IN','EXISTS','SEPARATOR'
  85. )
  86. ),
  87. 'REGEXPS' => array(
  88. //Variables without braces
  89. 1 => "\\?[a-zA-Z_][a-zA-Z0-9_]*",
  90. //prefix
  91. 2 => "[a-zA-Z_.\\-0-9]*:",
  92. //tag lang
  93. 3 => "@[^ .)}]*",
  94. ),
  95. 'SYMBOLS' => array(
  96. 0 => array(
  97. '{', '}' , '.', ';'
  98. ),
  99. 1 => array(
  100. '^^',
  101. '<=','>=','!=','=','<','>','|',
  102. '&&','||',
  103. '(',')','[', ']',
  104. '+','-','*','!','/'
  105. ),
  106. ),
  107. 'CASE_SENSITIVE' => array(
  108. GESHI_COMMENTS => false,
  109. 1 => false
  110. ),
  111. 'STYLES' => array(
  112. 'KEYWORDS' => array(
  113. 1 => 'color: #993333; font-weight: bold;'
  114. ),
  115. 'COMMENTS' => array(
  116. 0 => 'color: #808080; font-style: italic;',
  117. 1 => 'color: #000078;',
  118. //2 => 'color: #808080; font-style: italic;',
  119. 'MULTI' => 'color: #808080; font-style: italic;',
  120. ),
  121. 'ESCAPE_CHAR' => array(
  122. 0 => 'color: #000099; font-weight: bold;'
  123. ),
  124. 'BRACKETS' => array(),
  125. 'STRINGS' => array(
  126. 0 => 'color: #ff0000;'
  127. ),
  128. 'NUMBERS' => array(
  129. 0 => 'color: #FF63C3;'
  130. ),
  131. 'METHODS' => array(
  132. ),
  133. 'SYMBOLS' => array(
  134. 0 => 'color: #0000FF;',
  135. 1 => 'color: #FF8000; font-weight: bold;'
  136. ),
  137. 'SCRIPT' => array(),
  138. 'REGEXPS' => array(
  139. 1 => 'color: #007800;',
  140. 2 => 'color: #780078;',
  141. 3 => 'color: #005078;'
  142. )
  143. ),
  144. 'URLS' => array(
  145. 1 => ''
  146. ),
  147. 'OOLANG' => false,
  148. 'OBJECT_SPLITTERS' => array(),
  149. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  150. 'SCRIPT_DELIMITERS' => array(),
  151. 'HIGHLIGHT_STRICT_BLOCK' => array()
  152. );
  153. ?>