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.

290 lines
11KB

  1. <?php
  2. /*************************************************************************************
  3. * sas.php
  4. * -------
  5. * Author: Galen Johnson (solitaryr@gmail.com)
  6. * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2005/12/27
  9. *
  10. * SAS language file for GeSHi. Based on the sas vim file.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/05/23 (1.0.7.22)
  15. * - Added description of extra language features (SF#1970248)
  16. * - Cleaned up code style
  17. * 2005/12/27 (1.0.0)
  18. * - First Release
  19. *
  20. * TODO (updated 2005/12/27)
  21. * -------------------------
  22. * * Check highlighting stuff works
  23. *
  24. *************************************************************************************
  25. *
  26. * This file is part of GeSHi.
  27. *
  28. * GeSHi is free software; you can redistribute it and/or modify
  29. * it under the terms of the GNU General Public License as published by
  30. * the Free Software Foundation; either version 2 of the License, or
  31. * (at your option) any later version.
  32. *
  33. * GeSHi is distributed in the hope that it will be useful,
  34. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  35. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  36. * GNU General Public License for more details.
  37. *
  38. * You should have received a copy of the GNU General Public License
  39. * along with GeSHi; if not, write to the Free Software
  40. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  41. *
  42. ************************************************************************************/
  43. $language_data = array (
  44. 'LANG_NAME' => 'SAS',
  45. 'COMMENT_SINGLE' => array(),
  46. 'COMMENT_MULTI' => array('/*' => '*/', '*' => ';'),
  47. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  48. 'QUOTEMARKS' => array("'", '"'),
  49. 'ESCAPE_CHAR' => '\\',
  50. 'KEYWORDS' => array(
  51. 1 => array(
  52. '_ALL_','_CHARACTER_','_INFILE_','_N_','_NULL_','_NUMERIC_',
  53. '_WEBOUT_'
  54. ),
  55. 2 => array(
  56. '%BQUOTE','%CMPRES','%COMPSTOR','%DATATYP','%DISPLAY','%DO','%ELSE',
  57. '%END','%EVAL','%GLOBAL','%GOTO','%IF','%INDEX','%INPUT','%KEYDEF',
  58. '%LABEL','%LEFT','%LENGTH','%LET','%LOCAL','%LOWCASE','%MACRO',
  59. '%MEND','%NRBQUOTE','%NRQUOTE','%NRSTR','%PUT','%QCMPRES','%QLEFT',
  60. '%QLOWCASE','%QSCAN','%QSUBSTR','%QSYSFUNC','%QTRIM','%QUOTE',
  61. '%QUPCASE','%SCAN','%STR','%SUBSTR','%SUPERQ','%SYSCALL',
  62. '%SYSEVALF','%SYSEXEC','%SYSFUNC','%SYSGET','%SYSLPUT','%SYSPROD',
  63. '%SYSRC','%SYSRPUT','%THEN','%TO','%TRIM','%UNQUOTE','%UNTIL',
  64. '%UPCASE','%VERIFY','%WHILE','%WINDOW'
  65. ),
  66. 3 => array(
  67. 'ABS','ADDR','AIRY','ARCOS','ARSIN','ATAN','ATTRC','ATTRN','BAND',
  68. 'BETAINV','BLSHIFT','BNOT','BOR','BRSHIFT','BXOR','BYTE','CDF',
  69. 'CEIL','CEXIST','CINV','CLOSE','CNONCT','COLLATE','COMPBL',
  70. 'COMPOUND','COMPRESS','COSH','COS','CSS','CUROBS','CV','DACCDBSL',
  71. 'DACCDB','DACCSL','DACCSYD','DACCTAB','DAIRY','DATETIME','DATEJUL',
  72. 'DATEPART','DATE','DAY','DCLOSE','DEPDBSL','DEPDB','DEPSL','DEPSYD',
  73. 'DEPTAB','DEQUOTE','DHMS','DIF','DIGAMMA','DIM','DINFO','DNUM',
  74. 'DOPEN','DOPTNAME','DOPTNUM','DREAD','DROPNOTE','DSNAME','ERFC',
  75. 'ERF','EXIST','EXP','FAPPEND','FCLOSE','FCOL','FDELETE','FETCHOBS',
  76. 'FETCH','FEXIST','FGET','FILEEXIST','FILENAME','FILEREF','FINFO',
  77. 'FINV','FIPNAMEL','FIPNAME','FIPSTATE','FLOOR','FNONCT','FNOTE',
  78. 'FOPEN','FOPTNAME','FOPTNUM','FPOINT','FPOS','FPUT','FREAD',
  79. 'FREWIND','FRLEN','FSEP','FUZZ','FWRITE','GAMINV','GAMMA',
  80. 'GETOPTION','GETVARC','GETVARN','HBOUND','HMS','HOSTHELP','HOUR',
  81. 'IBESSEL','INDEXW','INDEXC','INDEX','INPUTN','INPUTC','INPUT',
  82. 'INTRR','INTCK','INTNX','INT','IRR','JBESSEL','JULDATE','KURTOSIS',
  83. 'LAG','LBOUND','LEFT','LENGTH','LGAMMA','LIBNAME','LIBREF','LOG10',
  84. 'LOG2','LOGPDF','LOGPMF','LOGSDF','LOG','LOWCASE','MAX','MDY',
  85. 'MEAN','MINUTE','MIN','MOD','MONTH','MOPEN','MORT','NETPV','NMISS',
  86. 'NORMAL','NPV','N','OPEN','ORDINAL','PATHNAME','PDF','PEEKC','PEEK',
  87. 'PMF','POINT','POISSON','POKE','PROBBETA','PROBBNML','PROBCHI',
  88. 'PROBF','PROBGAM','PROBHYPR','PROBIT','PROBNEGB','PROBNORM','PROBT',
  89. 'PUTN','PUTC','PUT','QTR','QUOTE','RANBIN','RANCAU','RANEXP',
  90. 'RANGAM','RANGE','RANK','RANNOR','RANPOI','RANTBL','RANTRI',
  91. 'RANUNI','REPEAT','RESOLVE','REVERSE','REWIND','RIGHT','ROUND',
  92. 'SAVING','SCAN','SDF','SECOND','SIGN','SINH','SIN','SKEWNESS',
  93. 'SOUNDEX','SPEDIS','SQRT','STDERR','STD','STFIPS','STNAME',
  94. 'STNAMEL','SUBSTR','SUM','SYMGET','SYSGET','SYSMSG','SYSPROD',
  95. 'SYSRC','SYSTEM','TANH','TAN','TIMEPART','TIME','TINV','TNONCT',
  96. 'TODAY','TRANSLATE','TRANWRD','TRIGAMMA','TRIMN','TRIM','TRUNC',
  97. 'UNIFORM','UPCASE','USS','VARFMT','VARINFMT','VARLABEL','VARLEN',
  98. 'VARNAME','VARNUM','VARRAYX','VARRAY','VARTYPE','VAR','VERIFY',
  99. 'VFORMATX','VFORMATDX','VFORMATD','VFORMATNX','VFORMATN',
  100. 'VFORMATWX','VFORMATW','VFORMAT','VINARRAYX','VINARRAY',
  101. 'VINFORMATX','VINFORMATDX','VINFORMATD','VINFORMATNX','VINFORMATN',
  102. 'VINFORMATWX','VINFORMATW','VINFORMAT','VLABELX','VLABEL',
  103. 'VLENGTHX','VLENGTH','VNAMEX','VNAME','VTYPEX','VTYPE','WEEKDAY',
  104. 'YEAR','YYQ','ZIPFIPS','ZIPNAME','ZIPNAMEL','ZIPSTATE'
  105. ),
  106. 4 => array(
  107. 'ABORT','ADD','ALTER','AND','ARRAY','AS','ATTRIB','BY','CALL',
  108. 'CARDS4','CASCADE','CATNAME','CHECK','CONTINUE','CREATE',
  109. 'DATALINES4','DELETE','DESCRIBE','DISPLAY','DISTINCT','DM','DROP',
  110. 'ENDSAS','FILE','FOOTNOTE','FOREIGN','FORMAT','FROM',
  111. 'GOTO','GROUP','HAVING','IN','INFILE','INFORMAT',
  112. 'INSERT','INTO','KEEP','KEY','LABEL','LEAVE',
  113. 'LIKE','LINK','LIST','LOSTCARD','MERGE','MESSAGE','MISSING',
  114. 'MODIFY','MSGTYPE','NOT','NULL','ON','OPTIONS','OR','ORDER',
  115. 'OUTPUT','PAGE','PRIMARY','REDIRECT','REFERENCES','REMOVE',
  116. 'RENAME','REPLACE','RESET','RESTRICT','RETAIN','RETURN','SELECT',
  117. 'SET','SKIP','STARTSAS','STOP','SYSTASK','TABLE','TITLE','UNIQUE',
  118. 'UPDATE','VALIDATE','VIEW','WAITSAS','WHERE','WINDOW','X'
  119. ),
  120. 5 => array(
  121. 'DO','ELSE','END','IF','THEN','UNTIL','WHILE'
  122. ),
  123. 6 => array(
  124. 'RUN','QUIT','DATA'
  125. ),
  126. 7 => array(
  127. 'ERROR'
  128. ),
  129. 8 => array(
  130. 'WARNING'
  131. ),
  132. 9 => array(
  133. 'NOTE'
  134. )
  135. ),
  136. 'SYMBOLS' => array(
  137. ),
  138. 'CASE_SENSITIVE' => array(
  139. GESHI_COMMENTS => false,
  140. 1 => false,
  141. 2 => false,
  142. 3 => false,
  143. 4 => false,
  144. 5 => false,
  145. 6 => false,
  146. 7 => false,
  147. 8 => false,
  148. 9 => false
  149. ),
  150. 'STYLES' => array(
  151. 'KEYWORDS' => array(
  152. 1 => 'color: #0000ff;',
  153. 2 => 'color: #0000ff;',
  154. 3 => 'color: #0000ff;',
  155. 4 => 'color: #0000ff;',
  156. 5 => 'color: #0000ff;',
  157. 6 => 'color: #000080; font-weight: bold;',
  158. 7 => 'color: #ff0000;',
  159. 8 => 'color: #00ff00;',
  160. 9 => 'color: #0000ff;'
  161. ),
  162. 'COMMENTS' => array(
  163. // 1 => 'color: #006400; font-style: italic;',
  164. 'MULTI' => 'color: #006400; font-style: italic;'
  165. ),
  166. 'ESCAPE_CHAR' => array(
  167. 0 => 'color: #000099; font-weight: bold;'
  168. ),
  169. 'BRACKETS' => array(
  170. 0 => 'color: #66cc66;'
  171. ),
  172. 'STRINGS' => array(
  173. 0 => 'color: #a020f0;'
  174. ),
  175. 'NUMBERS' => array(
  176. 0 => 'color: #2e8b57; font-weight: bold;'
  177. ),
  178. 'METHODS' => array(
  179. ),
  180. 'SYMBOLS' => array(
  181. 0 => 'color: #66cc66;'
  182. ),
  183. 'SCRIPT' => array(
  184. 0 => '',
  185. 1 => '',
  186. 2 => '',
  187. 3 => ''
  188. ),
  189. 'REGEXPS' => array(
  190. 0 => 'color: #0000ff; font-weight: bold;',
  191. 1 => 'color: #000080; font-weight: bold;',
  192. 2 => 'color: #006400; font-style: italic;',
  193. 3 => 'color: #006400; font-style: italic;',
  194. 4 => 'color: #006400; font-style: italic;',
  195. 5 => 'color: #ff0000; font-weight: bold;',
  196. 6 => 'color: #00ff00; font-style: italic;',
  197. 7 => 'color: #0000ff; font-style: normal;',
  198. 8 => 'color: #b218b2; font-weight: bold;',
  199. 9 => 'color: #b218b2; font-weight: bold;'
  200. )
  201. ),
  202. 'URLS' => array(
  203. 1 => '',
  204. 2 => '',
  205. 3 => '',
  206. 4 => '',
  207. 5 => '',
  208. 6 => '',
  209. 7 => '',
  210. 8 => '',
  211. 9 => ''
  212. ),
  213. 'OOLANG' => false,
  214. 'OBJECT_SPLITTERS' => array(
  215. ),
  216. 'REGEXPS' => array(
  217. 0 => "&amp;[a-zA-Z_][a-zA-Z0-9_]*",
  218. 1 => array(//Procedures
  219. GESHI_SEARCH => '(^\\s*)(PROC \\w+)',
  220. GESHI_REPLACE => '\\2',
  221. GESHI_MODIFIERS => 'im',
  222. GESHI_BEFORE => '\\1',
  223. GESHI_AFTER => ''
  224. ),
  225. 2 => array(
  226. GESHI_SEARCH => '(^\\s*)(\\*.*;)',
  227. GESHI_REPLACE => '\\2',
  228. GESHI_MODIFIERS => 'im',
  229. GESHI_BEFORE => '\\1',
  230. GESHI_AFTER => ''
  231. ),
  232. 3 => array(
  233. GESHI_SEARCH => '(.*;\\s*)(\\*.*;)',
  234. GESHI_REPLACE => '\\2',
  235. GESHI_MODIFIERS => 'im',
  236. GESHI_BEFORE => '\\1',
  237. GESHI_AFTER => ''
  238. ),
  239. 4 => array(
  240. GESHI_SEARCH => '(^\\s*)(%\\*.*;)',
  241. GESHI_REPLACE => '\\2',
  242. GESHI_MODIFIERS => 'im',
  243. GESHI_BEFORE => '\\1',
  244. GESHI_AFTER => ''
  245. ),
  246. 5 => array(//Error messages
  247. GESHI_SEARCH => '(^ERROR.*)',
  248. GESHI_REPLACE => '\\1',
  249. GESHI_MODIFIERS => 'im',
  250. GESHI_BEFORE => '',
  251. GESHI_AFTER => ''
  252. ),
  253. 6 => array(//Warning messages
  254. GESHI_SEARCH => '(^WARNING.*)',
  255. GESHI_REPLACE => '\\1',
  256. GESHI_MODIFIERS => 'im',
  257. GESHI_BEFORE => '',
  258. GESHI_AFTER => ''
  259. ),
  260. 7 => array(//Notice messages
  261. GESHI_SEARCH => '(^NOTE.*)',
  262. GESHI_REPLACE => '\\1',
  263. GESHI_MODIFIERS => 'im',
  264. GESHI_BEFORE => '',
  265. GESHI_AFTER => ''
  266. ),
  267. 8 => array(
  268. GESHI_SEARCH => '(^\\s*)(CARDS.*)(^\\s*;\\s*$)',
  269. GESHI_REPLACE => '\\2',
  270. GESHI_MODIFIERS => 'sim',
  271. GESHI_BEFORE => '\\1',
  272. GESHI_AFTER => '\\3'
  273. ),
  274. 9 => array(
  275. GESHI_SEARCH => '(^\\s*)(DATALINES.*)(^\\s*;\\s*$)',
  276. GESHI_REPLACE => '\\2',
  277. GESHI_MODIFIERS => 'sim',
  278. GESHI_BEFORE => '\\1',
  279. GESHI_AFTER => '\\3'
  280. )
  281. ),
  282. 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
  283. 'SCRIPT_DELIMITERS' => array(
  284. ),
  285. 'HIGHLIGHT_STRICT_BLOCK' => array(
  286. )
  287. );
  288. ?>