A tumblelog CMS built on AJAX, PHP and MySQL.

sas.php 12KB

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