2 /*************************************************************************************
5 * Author: Galen Johnson (solitaryr@gmail.com)
6 * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
7 * Release Version: 1.0.8.4
8 * Date Started: 2005/12/27
10 * SAS language file for GeSHi. Based on the sas vim file.
14 * 2008/05/23 (1.0.7.22)
15 * - Added description of extra language features (SF#1970248)
16 * - Cleaned up code style
20 * TODO (updated 2005/12/27)
21 * -------------------------
22 * * Check highlighting stuff works
24 *************************************************************************************
26 * This file is part of GeSHi.
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.
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.
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
42 ************************************************************************************/
44 $language_data = array (
46 'COMMENT_SINGLE' => array(),
47 'COMMENT_MULTI' => array('/*' => '*/'),
48 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
49 'QUOTEMARKS' => array("'", '"'),
50 'ESCAPE_CHAR' => '\\',
53 '_ALL_','_CHARACTER_','_INFILE_','_N_','_NULL_','_NUMERIC_',
57 '%BQUOTE','%CMPRES','%COMPSTOR','%DATATYP','%DISPLAY','%DO','%ELSE',
58 '%END','%EVAL','%GLOBAL','%GOTO','%IF','%INDEX','%INPUT','%KEYDEF',
59 '%LABEL','%LEFT','%LENGTH','%LET','%LOCAL','%LOWCASE','%MACRO',
60 '%MEND','%NRBQUOTE','%NRQUOTE','%NRSTR','%PUT','%QCMPRES','%QLEFT',
61 '%QLOWCASE','%QSCAN','%QSUBSTR','%QSYSFUNC','%QTRIM','%QUOTE',
62 '%QUPCASE','%SCAN','%STR','%SUBSTR','%SUPERQ','%SYSCALL',
63 '%SYSEVALF','%SYSEXEC','%SYSFUNC','%SYSGET','%SYSLPUT','%SYSPROD',
64 '%SYSRC','%SYSRPUT','%THEN','%TO','%TRIM','%UNQUOTE','%UNTIL',
65 '%UPCASE','%VERIFY','%WHILE','%WINDOW'
68 'ABS','ADDR','AIRY','ARCOS','ARSIN','ATAN','ATTRC','ATTRN','BAND',
69 'BETAINV','BLSHIFT','BNOT','BOR','BRSHIFT','BXOR','BYTE','CDF',
70 'CEIL','CEXIST','CINV','CLOSE','CNONCT','COLLATE','COMPBL',
71 'COMPOUND','COMPRESS','COSH','COS','CSS','CUROBS','CV','DACCDBSL',
72 'DACCDB','DACCSL','DACCSYD','DACCTAB','DAIRY','DATETIME','DATEJUL',
73 'DATEPART','DATE','DAY','DCLOSE','DEPDBSL','DEPDB','DEPSL','DEPSYD',
74 'DEPTAB','DEQUOTE','DHMS','DIF','DIGAMMA','DIM','DINFO','DNUM',
75 'DOPEN','DOPTNAME','DOPTNUM','DREAD','DROPNOTE','DSNAME','ERFC',
76 'ERF','EXIST','EXP','FAPPEND','FCLOSE','FCOL','FDELETE','FETCHOBS',
77 'FETCH','FEXIST','FGET','FILEEXIST','FILENAME','FILEREF','FINFO',
78 'FINV','FIPNAMEL','FIPNAME','FIPSTATE','FLOOR','FNONCT','FNOTE',
79 'FOPEN','FOPTNAME','FOPTNUM','FPOINT','FPOS','FPUT','FREAD',
80 'FREWIND','FRLEN','FSEP','FUZZ','FWRITE','GAMINV','GAMMA',
81 'GETOPTION','GETVARC','GETVARN','HBOUND','HMS','HOSTHELP','HOUR',
82 'IBESSEL','INDEXW','INDEXC','INDEX','INPUTN','INPUTC','INPUT',
83 'INTRR','INTCK','INTNX','INT','IRR','JBESSEL','JULDATE','KURTOSIS',
84 'LAG','LBOUND','LEFT','LENGTH','LGAMMA','LIBNAME','LIBREF','LOG10',
85 'LOG2','LOGPDF','LOGPMF','LOGSDF','LOG','LOWCASE','MAX','MDY',
86 'MEAN','MINUTE','MIN','MOD','MONTH','MOPEN','MORT','NETPV','NMISS',
87 'NORMAL','NPV','N','OPEN','ORDINAL','PATHNAME','PDF','PEEKC','PEEK',
88 'PMF','POINT','POISSON','POKE','PROBBETA','PROBBNML','PROBCHI',
89 'PROBF','PROBGAM','PROBHYPR','PROBIT','PROBNEGB','PROBNORM','PROBT',
90 'PUTN','PUTC','PUT','QTR','QUOTE','RANBIN','RANCAU','RANEXP',
91 'RANGAM','RANGE','RANK','RANNOR','RANPOI','RANTBL','RANTRI',
92 'RANUNI','REPEAT','RESOLVE','REVERSE','REWIND','RIGHT','ROUND',
93 'SAVING','SCAN','SDF','SECOND','SIGN','SINH','SIN','SKEWNESS',
94 'SOUNDEX','SPEDIS','SQRT','STDERR','STD','STFIPS','STNAME',
95 'STNAMEL','SUBSTR','SUM','SYMGET','SYSGET','SYSMSG','SYSPROD',
96 'SYSRC','SYSTEM','TANH','TAN','TIMEPART','TIME','TINV','TNONCT',
97 'TODAY','TRANSLATE','TRANWRD','TRIGAMMA','TRIMN','TRIM','TRUNC',
98 'UNIFORM','UPCASE','USS','VARFMT','VARINFMT','VARLABEL','VARLEN',
99 'VARNAME','VARNUM','VARRAYX','VARRAY','VARTYPE','VAR','VERIFY',
100 'VFORMATX','VFORMATDX','VFORMATD','VFORMATNX','VFORMATN',
101 'VFORMATWX','VFORMATW','VFORMAT','VINARRAYX','VINARRAY',
102 'VINFORMATX','VINFORMATDX','VINFORMATD','VINFORMATNX','VINFORMATN',
103 'VINFORMATWX','VINFORMATW','VINFORMAT','VLABELX','VLABEL',
104 'VLENGTHX','VLENGTH','VNAMEX','VNAME','VTYPEX','VTYPE','WEEKDAY',
105 'YEAR','YYQ','ZIPFIPS','ZIPNAME','ZIPNAMEL','ZIPSTATE'
108 'ABORT','ADD','ALTER','AND','ARRAY','AS','ATTRIB','BY','CALL',
109 'CARDS4','CASCADE','CATNAME','CHECK','CONTINUE','CREATE',
110 'DATALINES4','DELETE','DESCRIBE','DISPLAY','DISTINCT','DM','DROP',
111 'ENDSAS','FILE','FOOTNOTE','FOREIGN','FORMAT','FROM',
112 'GOTO','GROUP','HAVING','IN','INFILE','INFORMAT',
113 'INSERT','INTO','KEEP','KEY','LABEL','LEAVE',
114 'LIKE','LINK','LIST','LOSTCARD','MERGE','MESSAGE','MISSING',
115 'MODIFY','MSGTYPE','NOT','NULL','ON','OPTIONS','OR','ORDER',
116 'OUTPUT','PAGE','PRIMARY','REDIRECT','REFERENCES','REMOVE',
117 'RENAME','REPLACE','RESET','RESTRICT','RETAIN','RETURN','SELECT',
118 'SET','SKIP','STARTSAS','STOP','SYSTASK','TABLE','TITLE','UNIQUE',
119 'UPDATE','VALIDATE','VIEW','WAITSAS','WHERE','WINDOW','X'
122 'DO','ELSE','END','IF','THEN','UNTIL','WHILE'
139 'CASE_SENSITIVE' => array(
140 GESHI_COMMENTS
=> false,
153 1 => 'color: #0000ff;',
154 2 => 'color: #0000ff;',
155 3 => 'color: #0000ff;',
156 4 => 'color: #0000ff;',
157 5 => 'color: #0000ff;',
158 6 => 'color: #000080; font-weight: bold;',
159 7 => 'color: #ff0000;',
160 8 => 'color: #00ff00;',
161 9 => 'color: #0000ff;'
164 // 1 => 'color: #006400; font-style: italic;',
165 'MULTI' => 'color: #006400; font-style: italic;'
167 'ESCAPE_CHAR' => array(
168 0 => 'color: #000099; font-weight: bold;'
171 0 => 'color: #66cc66;'
174 0 => 'color: #a020f0;'
177 0 => 'color: #2e8b57; font-weight: bold;'
182 0 => 'color: #66cc66;'
191 0 => 'color: #0000ff; font-weight: bold;',
192 1 => 'color: #000080; font-weight: bold;',
193 2 => 'color: #006400; font-style: italic;',
194 3 => 'color: #006400; font-style: italic;',
195 4 => 'color: #006400; font-style: italic;',
196 5 => 'color: #ff0000; font-weight: bold;',
197 6 => 'color: #00ff00; font-style: italic;',
198 7 => 'color: #0000ff; font-style: normal;',
199 8 => 'color: #b218b2; font-weight: bold;',
200 9 => 'color: #b218b2; font-weight: bold;'
215 'OBJECT_SPLITTERS' => array(
218 0 => "&[a-zA-Z_][a-zA-Z0-9_]*",
219 1 => array(//Procedures
220 GESHI_SEARCH
=> '(^\\s*)(PROC \\w+)',
221 GESHI_REPLACE
=> '\\2',
222 GESHI_MODIFIERS
=> 'im',
223 GESHI_BEFORE
=> '\\1',
227 GESHI_SEARCH
=> '(^\\s*)(\\*.*;)',
228 GESHI_REPLACE
=> '\\2',
229 GESHI_MODIFIERS
=> 'im',
230 GESHI_BEFORE
=> '\\1',
234 GESHI_SEARCH
=> '(.*;\\s*)(\\*.*;)',
235 GESHI_REPLACE
=> '\\2',
236 GESHI_MODIFIERS
=> 'im',
237 GESHI_BEFORE
=> '\\1',
241 GESHI_SEARCH
=> '(^\\s*)(%\\*.*;)',
242 GESHI_REPLACE
=> '\\2',
243 GESHI_MODIFIERS
=> 'im',
244 GESHI_BEFORE
=> '\\1',
247 5 => array(//Error messages
248 GESHI_SEARCH
=> '(^ERROR.*)',
249 GESHI_REPLACE
=> '\\1',
250 GESHI_MODIFIERS
=> 'im',
254 6 => array(//Warning messages
255 GESHI_SEARCH
=> '(^WARNING.*)',
256 GESHI_REPLACE
=> '\\1',
257 GESHI_MODIFIERS
=> 'im',
261 7 => array(//Notice messages
262 GESHI_SEARCH
=> '(^NOTE.*)',
263 GESHI_REPLACE
=> '\\1',
264 GESHI_MODIFIERS
=> 'im',
269 GESHI_SEARCH
=> '(^\\s*)(CARDS.*)(^\\s*;\\s*$)',
270 GESHI_REPLACE
=> '\\2',
271 GESHI_MODIFIERS
=> 'sim',
272 GESHI_BEFORE
=> '\\1',
276 GESHI_SEARCH
=> '(^\\s*)(DATALINES.*)(^\\s*;\\s*$)',
277 GESHI_REPLACE
=> '\\2',
278 GESHI_MODIFIERS
=> 'sim',
279 GESHI_BEFORE
=> '\\1',
283 'STRICT_MODE_APPLIES' => GESHI_MAYBE
,
284 'SCRIPT_DELIMITERS' => array(
286 'HIGHLIGHT_STRICT_BLOCK' => array(