Class: Rouge::Lexers::SAS

Inherits:
RegexLexer show all
Defined in:
lib/rouge/lexers/sas.rb

Constant Summary

Constants inherited from RegexLexer

RegexLexer::MAX_NULL_SCANS

Constants included from Token::Tokens

Token::Tokens::Num, Token::Tokens::Str

Instance Attribute Summary

Attributes inherited from Rouge::Lexer

#options

Class Method Summary collapse

Methods inherited from RegexLexer

append, #delegate, #goto, #group, #groups, #in_state?, #pop!, prepend, #push, #recurse, replace_state, #reset!, #reset_stack, #stack, start, start_procs, state, #state, #state?, state_definitions, states, #step, #stream_tokens, #token

Methods inherited from Rouge::Lexer

aliases, all, #as_bool, #as_lexer, #as_list, #as_string, #as_token, #bool_option, continue_lex, #continue_lex, debug_enabled?, demo, demo_file, desc, detect?, detectable?, disable_debug!, enable_debug!, filenames, find, find_fancy, guess, guess_by_filename, guess_by_mimetype, guess_by_source, guesses, #hash_option, #initialize, lex, #lex, #lexer_option, #list_option, lookup_fancy, mimetypes, option, option_docs, #reset!, #stream_tokens, #string_option, tag, #tag, title, #token_option, #with

Methods included from Token::Tokens

token

Constructor Details

This class inherits a constructor from Rouge::Lexer

Class Method Details

.data_step_statementsObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/rouge/lexers/sas.rb', line 12

def self.data_step_statements
  # from Data step statements - SAS 9.4 Statements reference
  # http://support.sas.com/documentation/cdl/en/lestmtsref/68024/PDF/default/lestmtsref.pdf
  @data_step_statements ||= Set.new %w(
    ABORT ARRAY ATTRIB BY CALL CARDS CARDS4 CATNAME CHECKPOINT 
    EXECUTE_ALWAYS CONTINUE DATA DATALINES DATALINES4 DELETE DESCRIBE
    DISPLAY DM DO UNTIL WHILE DROP END ENDSAS ERROR EXECUTE FILE FILENAME
    FOOTNOTE FORMAT GO TO IF THEN ELSE INFILE INFORMAT INPUT
    KEEP LABEL LEAVE LENGTH LIBNAME LINK LIST LOCK LOSTCARD MERGE
    MISSING MODIFY OPTIONS OUTPUT PAGE PUT PUTLOG REDIRECT REMOVE RENAME
    REPLACE RESETLINE RETAIN RETURN RUN SASFILE SELECT SET SKIP STOP         
    SYSECHO TITLE UPDATE WHERE WINDOW X
   )
# label:
# Sum
end

.proc_keywordsObject



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
# File 'lib/rouge/lexers/sas.rb', line 140

def self.proc_keywords 
  # Create a hash with keywords for common PROCs, keyed by PROC name
  @proc_keywords ||= {}

	@proc_keywords["SQL"] ||= Set.new %w(
      ALTER TABLE CONNECT CREATE INDEX VIEW DELETE DESCRIBE DISCONNECT DROP EXECUTE
      INSERT RESET SELECT UPDATE VALIDATE ADD CONSTRAINT DROP FOREIGN KEY PRIMARY
      MODIFY LIKE AS ORDER BY USING FROM INTO SET VALUES RESET DISTINCT UNIQUE
      WHERE GROUP HAVING LEFT RIGHT INNER JOIN ON
    )
  # from SAS 9.4 SQL Procedure User's Guide

	@proc_keywords["MEANS"] ||= Set.new %w(
      BY CLASS FREQ ID OUTPUT OUT TYPES VAR WAYS WEIGHT
      ATTRIB FORMAT LABEL WHERE
      DESCENDING NOTSORTED 
      NOTHREADS NOTRAP PCTLDEF SUMSIZE THREADS CLASSDATA COMPLETETYPES
      EXCLUSIVE MISSING FW MAXDEC NONOBS NOPRINT ORDER FORMATTED FREQ
      UNFORMATTED PRINT PRINTALLTYPES PRINTIDVARS STACKODSOUTPUT
      CHARTYPE DESCENDTYPES IDMIN
      ALPHA EXCLNPWGT QMARKERS QMETHOD QNTLDEF VARDEF
      CLM CSS CV KURTOSIS KURT LCLM MAX MEAN MIN MODE N
      NMISS RANGE SKEWNESS SKEW STDDEV STD STDERR SUM SUMWGT UCLM USS VAR
      MEDIAN P50 Q1 P25 Q3 P75 P1 P90 P5 P95 P10 P99 P20 P30 P40 P60 P70
      P80 QRANGE
      PROBT PRT T
      ASCENDING GROUPINTERNAL MLF PRELOADFMT
      MAXID AUTOLABEL AUTONAME KEEPLEN LEVELS NOINHERIT
    )
  # from BASE SAS 9.4 Procedures Guide, Fifth Edition

	@proc_keywords["DATASETS"] ||= Set.new %w(
      AGE APPEND ATTRIB AUDIT CHANGE CONTENTS COPY DELETE EXCHANGE
      EXCLUDE FORMAT IC CREATE DELETE REACTIVATE INDEX CENTILES INFORMAT
      INITIATE LABEL LOG MODIFY REBUILD RENAME REPAIR RESUME SAVE SELECT
      SUSPEND TERMINATE USER_VAR XATTR ADD OPTIONS REMOVE SET
    )
  # from BASE SAS 9.4 Procedures Guide, Fifth Edition

	@proc_keywords["SORT"] ||= Set.new %w(
      BY DESCENDING KEY ASCENDING ASC DESC DATECOPY FORCE OVERWRITE 
      PRESORTED SORTSIZE TAGSORT DUPOUT OUT UNIQUEOUT NODUPKEY NOUNIQUEKEY 
      NOTHREADS THREADS EQUALS NOEQUALS
      ATTRIB FORMAT LABEL WHERE
    )
  # from BASE SAS 9.4 Procedures Guide, Fifth Edition

	@proc_keywords["PRINT"] ||= Set.new %w(
      BY DESCENDING NOTSORTED PAGEBY SUMBY ID STYLE SUM VAR CONTENTS DATA
      GRANDTOTAL_LABEL HEADING LABEL SPLIT SUMLABEL NOSUMLABEL
      BLANKLINE COUNT DOUBLE N NOOBS OBS ROUND
      ROWS UNIFORM WIDTH
      ATTRIB FORMAT LABEL WHERE
    )
  # from BASE SAS 9.4 Procedures Guide, Fifth Edition

	@proc_keywords["APPEND"] ||= Set.new %w(
      BASE APPENDVER DATA ENCRYPTKEY FORCE GETSORT NOWARN
      ATTRIB FORMAT LABEL WHERE
    )
  # from BASE SAS 9.4 Procedures Guide, Fifth Edition

	@proc_keywords["TRANSPOSE"] ||= Set.new %w(
      DELIMITER LABEL LET NAME OUT PREFIX SUFFIX BY DESCENDING NOTSORTED
      COPY ID IDLABEL VAR INDB
      ATTRIB FORMAT LABEL WHERE
    )
  # from BASE SAS 9.4 Procedures Guide, Fifth Edition

	@proc_keywords["FREQ"] ||= Set.new %w(
      BY EXACT OUTPUT TABLES TEST WEIGHT
      COMPRESS DATA FORMCHAR NLEVELS NOPRINT ORDER PAGE FORMATTED FREQ 
      INTERNAL
      AGREE BARNARD BINOMIAL BIN CHISQ COMOR EQOR ZELEN FISHER JT KAPPA
      KENTB TAUB LRCHI MCNEM MEASURES MHCHI OR ODDSRATIO PCHI PCORR RELRISK
      RISKDIFF SCORR SMDCR SMDRC STUTC TAUC TREND WTKAP WTKAPPA
      OUT AJCHI ALL BDCHI CMH CMH1 CMH2 CMHCOR CMHGA CMHRMS COCHQ CONTGY
      CRAMV EQKAP EQWKP GAMMA GS GAILSIMON LAMCR LAMDAS LAMRC LGOR LGRRC1
      LGRRC2 MHOR MHRRC1 MHRRC2 N NMISS PHI PLCORR RDIF1 RDIF2 RISKDIFF1
      RISKDIFF2 RRC1 RELRISK1 RRC2 RELRISK2 RSK1 RISK1 RSK11 RISK11 RSK12
      RISK12 RSK21 RISK21 RSK22 RISK22 TSYMM BOWKER U UCR URC
      CELLCHI2 CUMCOL DEVIATION EXPECTED MISSPRINT PEARSONREF PRINTWKTS
      SCOROUT SPARSE STDRES TOTPCT
      CONTENTS CROSSLIST FORMAT LIST MAXLEVELS NOCOL NOCUM NOFREQ NOPERCENT
      NOPRINT NOROW NOSPARSE NOWARN PLOTS OUT OUTCUM OUTEXPECT OUTPCT
      ZEROS
    )
  # from Base SAS 9.4 Procedures Guide: Statistical Procedures, Fourth Edition

	@proc_keywords["CORR"] ||= Set.new %w(
      BY FREQ ID PARTIAL VAR WEIGHT WITH
      DATA OUTH OUTK OUTP OUTPLC OUTPLS OUTS
      EXCLNPWGHT FISHER HOEFFDING KENDALL NOMISS PEARSON POLYCHORIC
      POLYSERIAL ALPHA COV CSSCP SINGULAR SSCP VARDEF PLOTS MATRIX SCATTER
      BEST NOCORR NOPRINT NOPROB NOSIMPLE RANK
    )
  # from Base SAS 9.4 Procedures Guide: Statistical Procedures, Fourth Edition

	@proc_keywords["REPORT"] ||= Set.new %w(
      BREAK BY DESCENDING NOTSORTED COLUMN COMPUTE STYLE LINE ENDCOMP
      CALL DEFINE _ROW_ FREQ RBREAK WEIGHT
      ATTRIB FORMAT LABEL WHERE
      DATA NOALIAS NOCENTER NOCOMPLETECOLS NOCOMPLETEROWS NOTHREADS 
      NOWINDOWS OUT PCTLDEF THREADS WINDOWS COMPLETECOLS NOCOMPLETECOLS
      COMPLETEROWS NOCOMPLETEROWS CONTENTS SPANROWS COMMAND HELP PROMPT
      BOX BYPAGENO CENTER NOCENTER COLWIDTH FORMCHAR LS MISSING PANELS PS
      PSPACE SHOWALL SPACING WRAP EXCLNPWGT QMARKERS QMETHOD QNTLDEF VARDEF
      NAMED NOHEADER SPLIT HEADLINE HEADSKIP LIST NOEXEC OUTREPT PROFILE
      REPORT
      COLOR DOL DUL OL PAGE SKIP SUMMARIZE SUPPRESS UL
      BLINK COMMAND HIGHLIGHT RVSVIDEO MERGE REPLACE URL URLBP URLP
      AFTER BEFORE _PAGE_ LEFT RIGHT CHARACTER LENGTH
      EXCLUSIVE MISSING MLF ORDER DATA FORMATTED FREQ INTERNAL PRELOADFMT
      WIDTH
      ACROSS ANALYSIS COMPUTED DISPLAY GROUP ORDER
      CONTENTS FLOW ID NOPRINT NOZERO PAGE
      CSS CV MAX MEAN MIN MODE N NMISS PCTN PCTSUM RANGE STD STDERR SUM
      SUMWGT USS VAR
      MEDIAN P50 Q1 P25 Q3 P75 P1 P90 P5 P95 P10 P99 P20 P30 P40 P60 P70
      P80 QRANGE
      PROBT PRT T
    )
  # from BASE SAS 9.4 Procedures Guide, Fifth Edition

	@proc_keywords["METALIB"] ||= Set.new %w(
      OMR DBAUTH DBUSER DBPASSWORD EXCLUDE SELECT READ FOLDER FOLDERID
      IMPACT_LIMIT NOEXEC PREFIX REPORT UPDATE_RULE DELETE NOADD NODELDUP
      NOUPDATE
      LIBID LIBRARY LIBURI
      TYPE DETAIL SUMMARY
    )
  # from SAS 9.4 Language Interfaces to Metadata, Third Edition

	@proc_keywords["GCHART"] ||= Set.new %w(
      DATA ANNOTATE GOUT IMAGEMAP BLOCK HBAR HBAR3D VBAR VBAR3D PIE PIE3D
      DONUT STAR ANNO
      BY NOTE FORMAT LABEL WHERE
      BLOCKMAX CAXIS COUTLINE CTEXT LEGEND NOHEADING NOLEGEND PATTERNID
      GROUP MIDPOINT SUBGROUP WOUTLINE DESCRIPTION NAME DISCRETE LEVELS
      OLD MISSING HTML_LEGEND HTML URL FREQ G100 SUMVAR TYPE
      CAUTOREF CERROR CFRAME CLM CREF FRAME NOFRAME GSPACE IFRAME
      IMAGESTYLE TILE FIT LAUTOREF NOSYMBOL PATTERNID SHAPE SPACE
      SUBOUTSIDE WAUTOREF WIDTH WOUTLINE WREF
      ASCENDING AUTOREF CLIPREF DESCENDING FRONTREF GAXIS MAXIS MINOR
      NOAXIS NOBASEREF NOZERO RANGE AXIS REF CFREQ CFREQLABEL NONE CPERCENT
      CPERCENTLABEL ERRORBAR BARS BOTH TOP FREQLABEL INSIDE MEAN MEANLABEL
      NOSTATS OUTSIDE PERCENT PERCENTLABEL PERCENTSUM SUM
      CFILL COUTLINE DETAIL_RADIUS EXPLODE FILL SOLID X INVISIBLE NOHEADING
      RADIUS WOUTLINE DETAIL_THRESHOLD DETAIL_PERCENT DETAIL_SLICE
      DETAIL_VALUE DONUTPCT LABEL ACROSS DOWN GROUP NOGROUPHEADING SUBGROUP
      MATCHCOLOR OTHERCOLOR OTHERLABEL PERCENT ARROW PLABEL PPERCENT SLICE
      VALUE
      ANGLE ASCENDING CLOCKWISE DESCENDING JSTYLE
      NOCONNECT STARMAX STARMIN 
    )
  # from SAS GRAPH 9.4 Reference, Fourth Edition

	@proc_keywords["GPLOT"] ||= Set.new %w(
      DATA ANNOTATE GOUT IMAGEMAP UNIFORM BUBBLE BUBBLE2 PLOT PLOT2
      BCOLOR BFILL BFONT BLABEL BSCALE AREA RADIUS BSIZE DESCRIPTION NAME
      AUTOHREF CAUTOHREF CHREF HAXIS HMINOR HREF HREVERSE HZERO LAUTOHREF
      LHREF WAUTOHREF WHREF HTML URL
      CAXIS CFRAME CTEXT DATAORDER FRAME NOFRAME FRONTREF GRID IFRAME
      IMAGESTYLE TILE FIT NOAXIS
      AUTOVREF CAUTOVREF CVREF LAUTOVREF LVREF VAXIS VMINOR VREF VREVERSE
      VZERO WAUTOVREF WVREF
      CBASELINE COUTLINE
      AREAS GRID LEGEND NOLASTAREA NOLEGEND OVERLAY REGEQN SKIPMISS
    )
  # from SAS GRAPH 9.4 Reference, Fourth Edition

	@proc_keywords["REG"] ||= Set.new %w(
      MODEL BY FREQ ID VAR WEIGHT ADD CODE DELETE MTEST OUTPUT PAINT
      PLOT PRINT REFIT RESTRICT REWEIGHT STORE TEST
    )
   # from SAS/STAT 15.1 User's Guide

	@proc_keywords["SGPLOT"] ||= Set.new %w(
      STYLEATTRS BAND X Y UPPER LOWER BLOCK BUBBLE DENSITY DOT DROPLINE
      ELLIPSE ELLIPSEPARM FRINGE GRADLEGEND HBAR HBARBASIC HBARPARM
      HBOX HEATMAP HEATMAPPARM HIGHLOW HISTOGRAM HLINE INSET KEYLEGEND
      LINEPARM LOESS NEEDLE PBSPLINE POLYGON REFLINE REG SCATTER SERIES
      SPLINE STEP SYMBOLCHAR SYMBOLIMAGE TEXT VBAR VBARBASIC VBARPARM
      VBOX VECTOR VLINE WATERFALL XAXIS X2AXIS XAXISTABLE YAXIS Y2AXIS
      YAXISTABLE
    )
   # from ODS Graphics: Procedures Guide, Sixth Edition
  return @proc_keywords
end

.sas_auto_macro_varsObject



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/rouge/lexers/sas.rb', line 122

def self.sas_auto_macro_vars
  # from SAS 9.4 Macro Language Reference
  # Chapter 12

  @sas_auto_macro_vars ||= Set.new %w(
    &SYSADDRBITS &SYSBUFFR &SYSCC &SYSCHARWIDTH &SYSCMD &SYSDATASTEPPHASE &SYSDATE
    &SYSDATE9 &SYSDAY &SYSDEVIC &SYSDMG &SYSDSN &SYSENCODING &SYSENDIAN &SYSENV
    &SYSERR &SYSERRORTEXT &SYSFILRC &SYSHOSTINFOLONG &SYSHOSTNAME &SYSINDEX
    &SYSINFO &SYSJOBID &SYSLAST &SYSLCKRC &SYSLIBRC &SYSLOGAPPLNAME &SYSMACRONAME
    &SYSMENV &SYSMSG &SYSNCPU &SYSNOBS &SYSODSESCAPECHAR &SYSODSPATH &SYSPARM
    &SYSPBUFF &SYSPRINTTOLIST &SYSPRINTTOLOG &SYSPROCESSID &SYSPROCESSMODE
    &SYSPROCESSNAME &SYSPROCNAME &SYSRC &SYSSCP &SYSSCPL &SYSSITE &SYSSIZEOFLONG
    &SYSSIZEOFPTR &SYSSIZEOFUNICODE &SYSSTARTID &SYSSTARTNAME &SYSTCPIPHOSTNAME
    &SYSTIME &SYSTIMEZONE &SYSTIMEZONEIDENT &SYSTIMEZONEOFFSET &SYSUSERID &SYSVER
    &SYSVLONG &SYSVLONG4 &SYSWARNINGTEXT
  )
end

.sas_functionsObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/rouge/lexers/sas.rb', line 29

def self.sas_functions
  # from SAS 9.4 Functions and CALL Routines reference
  # http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/PDF/default/lefunctionsref.pdf
  @sas_functions ||= Set.new %w(
    ABS ADDR ADDRLONG AIRY ALLCOMB ALLPERM ANYALNUM ANYALPHA ANYCNTRL
    ANYDIGIT ANYFIRST ANYGRAPH ANYLOWER ANYNAME ANYPRINT ANYPUNCT
    ANYSPACE ANYUPPER ANYXDIGIT ARCOS ARCOSH ARSIN ARSINH ARTANH ATAN
    ATAN2 ATTRC ATTRN BAND BETA BETAINV BLACKCLPRC BLACKPTPRC
    BLKSHCLPRC BLKSHPTPRC BLSHIFT BNOT BOR BRSHIFT BXOR BYTE CAT CATQ
    CATS CATT CATX CDF CEIL CEILZ CEXIST CHAR CHOOSEC CHOOSEN CINV
    CLOSE CMISS CNONCT COALESCE COALESCEC COLLATE COMB COMPARE COMPBL
    COMPFUZZ COMPGED COMPLEV COMPOUND COMPRESS CONSTANT CONVX CONVXP
    COS COSH COT COUNT COUNTC COUNTW CSC CSS CUMIPMT CUMPRINC CUROBS
    CV DACCDB DACCDBSL DACCSL DACCSYD DACCTAB DAIRY DATDIF DATE
    DATEJUL DATEPART DATETIME DAY DCLOSE DCREATE DEPDB DEPDBSL DEPSL
    DEPSYD DEPTAB DEQUOTE DEVIANCE DHMS DIF DIGAMMA DIM DINFO DIVIDE
    DNUM DOPEN DOPTNAME DOPTNUM DOSUBL DREAD DROPNOTE DSNAME
    DSNCATLGD DUR DURP EFFRATE ENVLEN ERF ERFC EUCLID EXIST EXP FACT
    FAPPEND FCLOSE FCOL FCOPY FDELETE FETCH FETCHOBS FEXIST FGET
    FILEEXIST FILENAME FILEREF FINANCE FIND FINDC FINDW FINFO FINV
    FIPNAME FIPNAMEL FIPSTATE FIRST FLOOR FLOORZ FMTINFO FNONCT FNOTE
    FOPEN FOPTNAME FOPTNUM FPOINT FPOS FPUT FREAD FREWIND FRLEN FSEP
    FUZZ FWRITE GAMINV GAMMA GARKHCLPRC GARKHPTPRC GCD GEODIST
    GEOMEAN GEOMEANZ GETOPTION GETVARC GETVARN GRAYCODE HARMEAN
    HARMEANZ HBOUND HMS HOLIDAY HOLIDAYCK HOLIDAYCOUNT HOLIDAYNAME
    HOLIDAYNX HOLIDAYNY HOLIDAYTEST HOUR HTMLDECODE HTMLENCODE
    IBESSEL IFC IFN INDEX INDEXC INDEXW INPUT INPUTC INPUTN INT
    INTCINDEX INTCK INTCYCLE INTFIT INTFMT INTGET INTINDEX INTNX
    INTRR INTSEAS INTSHIFT INTTEST INTZ IORCMSG IPMT IQR IRR JBESSEL
    JULDATE JULDATE7 KURTOSIS LAG LARGEST LBOUND LCM LCOMB LEFT
    LENGTH LENGTHC LENGTHM LENGTHN LEXCOMB LEXCOMBI LEXPERK LEXPERM
    LFACT LGAMMA LIBNAME LIBREF LOG LOG1PX LOG10 LOG2 LOGBETA LOGCDF
    LOGISTIC LOGPDF LOGSDF LOWCASE LPERM LPNORM MAD MARGRCLPRC
    MARGRPTPRC MAX MD5 MDY MEAN MEDIAN MIN MINUTE MISSING MOD
    MODEXIST MODULE MODULEC MODULEN MODZ MONTH MOPEN MORT MSPLINT
    MVALID N NETPV NLITERAL NMISS NOMRATE NORMAL NOTALNUM NOTALPHA
    NOTCNTRL NOTDIGIT NOTE NOTFIRST NOTGRAPH NOTLOWER NOTNAME
    NOTPRINT NOTPUNCT NOTSPACE NOTUPPER NOTXDIGIT NPV NVALID NWKDOM
    OPEN ORDINAL PATHNAME PCTL PDF PEEK PEEKC PEEKCLONG PEEKLONG PERM
    PMT POINT POISSON PPMT PROBBETA PROBBNML PROBBNRM PROBCHI PROBF
    PROBGAM PROBHYPR PROBIT PROBMC PROBNEGB PROBNORM PROBT PROPCASE
    PRXCHANGE PRXMATCH PRXPAREN PRXPARSE PRXPOSN PTRLONGADD PUT PUTC
    PUTN PVP QTR QUANTILE QUOTE RANBIN RANCAU RAND RANEXP RANGAM
    RANGE RANK RANNOR RANPOI RANTBL RANTRI RANUNI RENAME REPEAT
    RESOLVE REVERSE REWIND RIGHT RMS ROUND ROUNDE ROUNDZ SAVING
    SAVINGS SCAN SDF SEC SECOND SHA256 SHA256HEX SHA256HMACHEX SIGN
    SIN SINH SKEWNESS SLEEP SMALLEST SOAPWEB SOAPWEBMETA
    SOAPWIPSERVICE SOAPWIPSRS SOAPWS SOAPWSMETA SOUNDEX SPEDIS SQRT
    SQUANTILE STD STDERR STFIPS STNAME STNAMEL STRIP SUBPAD SUBSTR
    SUBSTRN SUM SUMABS SYMEXIST SYMGET SYMGLOBL SYMLOCAL SYSEXIST
    SYSGET SYSMSG SYSPARM SYSPROCESSID SYSPROCESSNAME SYSPROD SYSRC
    SYSTEM TAN TANH TIME TIMEPART TIMEVALUE TINV TNONCT TODAY
    TRANSLATE TRANSTRN TRANWRD TRIGAMMA TRIM TRIMN TRUNC TSO TYPEOF
    TZONEID TZONENAME TZONEOFF TZONES2U TZONEU2S UNIFORM UPCASE
    URLDECODE URLENCODE USS UUIDGEN VAR VARFMT VARINFMT VARLABEL
    VARLEN VARNAME VARNUM VARRAY VARRAYX VARTYPE VERIFY VFORMAT
    VFORMATD VFORMATDX VFORMATN VFORMATNX VFORMATW VFORMATWX VFORMATX
    VINARRAY VINARRAYX VINFORMAT VINFORMATD VINFORMATDX VINFORMATN
    VINFORMATNX VINFORMATW VINFORMATWX VINFORMATX VLABEL VLABELX
    VLENGTH VLENGTHX VNAME VNAMEX VTYPE VTYPEX VVALUE VVALUEX WEEK
    WEEKDAY WHICHC WHICHN WTO YEAR YIELDP YRDIF YYQ ZIPCITY
    ZIPCITYDISTANCE ZIPFIPS ZIPNAME ZIPNAMEL ZIPSTATE
   )
end

.sas_macro_functionsObject



109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/rouge/lexers/sas.rb', line 109

def self.sas_macro_functions
  # from SAS 9.4 Macro Language Reference
  # Chapter 12

  @sas_macro_functions ||= Set.new %w(
    %BQUOTE %NRBQUOTE %EVAL %INDEX %LENGTH %QUOTE %NRQUOTE %SCAN
    %QSCAN %STR %NRSTR %SUBSTR %QSUBSTR %SUPERQ %SYMEXIST %SYMGLOBL
    %SYMLOCAL %SYSEVALF %SYSFUNC %QSYSFUNC %SYSGET %SYSMACEXEC
    %SYSMACEXIST %SYSMEXECDEPTH %SYSMEXECNAME %SYSPROD %UNQUOTE
    %UPCASE %QUPCASE
  )
end

.sas_macro_statementsObject



94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/rouge/lexers/sas.rb', line 94

def self.sas_macro_statements
  # from SAS 9.4 Macro Language Reference
  # Chapter 12
  @sas_macro_statements ||= Set.new %w(
    %COPY %DISPLAY %GLOBAL %INPUT %LET %MACRO %PUT %SYMDEL %SYSCALL
    %SYSEXEC %SYSLPUT %SYSMACDELETE %SYSMSTORECLEAR %SYSRPUT %WINDOW
    %ABORT %DO %TO %UNTIL %WHILE %END %GOTO %IF %THEN %ELSE %LOCAL
    %RETURN
    %INCLUDE %LIST %RUN
  )
  # Omitted:
  # %label: Identifies the destination of a %GOTO statement.
  # %MEND
end

.sas_proc_namesObject



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# File 'lib/rouge/lexers/sas.rb', line 330

def self.sas_proc_names
  # from SAS Procedures by Name
  # http://support.sas.com/documentation/cdl/en/allprodsproc/68038/HTML/default/viewer.htm#procedures.htm

  @sas_proc_names ||= Set.new %w(
    ACCESS ACECLUS ADAPTIVEREG ALLELE ANOM ANOVA APPEND APPSRV ARIMA
    AUTHLIB AUTOREG BCHOICE BOM BOXPLOT BTL BUILD CALENDAR CALIS CALLRFC
    CANCORR CANDISC CAPABILITY CASECONTROL CATALOG CATMOD CDISC CDISC
    CHART CIMPORT CLP CLUSTER COMPARE COMPILE COMPUTAB CONTENTS CONVERT
    COPULA COPY CORR CORRESP COUNTREG CPM CPORT CUSUM CV2VIEW DATEKEYS
    DATASETS DATASOURCE DB2EXT DB2UTIL DBCSTAB DBF DBLOAD DELETE DIF
    DISCRIM DISPLAY DISTANCE DMSRVADM DMSRVDATASVC DMSRVPROCESSSVC
    DOCUMENT DOWNLOAD DQLOCLST DQMATCH DQSCHEME DS2 DTREE ENTROPY ESM
    EXPAND EXPLODE EXPORT FACTEX FACTOR FAMILY FASTCLUS FCMP FEDSQL FMM
    FONTREG FORECAST FORMAT FORMS FREQ FSBROWSE FSEDIT FSLETTER FSLIST
    FSVIEW G3D G3GRID GA GAM GAMPL GANNO GANTT GAREABAR GBARLINE GCHART
    GCONTOUR GDEVICE GEE GENESELECT GENMOD GEOCODE GFONT GINSIDE GIS GKPI
    GLIMMIX GLM GLMMOD GLMPOWER GLMSELECT GMAP GOPTIONS GPLOT GPROJECT
    GRADAR GREDUCE GREMOVE GREPLAY GROOVY GSLIDE GTILE HADOOP HAPLOTYPE
    HDMD HPBIN HPCANDISC HPCDM HPCOPULA HPCORR HPCOUNTREG HPDMDB HPDS2
    HPFMM HPGENSELECT HPIMPUTE HPLMIXED HPLOGISTIC HPMIXED HPNLMOD
    HPPANEL HPPLS HPPRINCOMP HPQUANTSELECT HPQLIM HPREG HPSAMPLE
    HPSEVERITY HPSPLIT HPSUMMARY HTSNP HTTP ICLIFETEST ICPHREG IML IMPORT
    IMSTAT IMXFER INBREED INFOMAPS INTPOINT IOMOPERATE IRT ISHIKAWA ITEMS
    JAVAINFO JSON KDE KRIGE2D LASR LATTICE LIFEREG LIFETEST LOAN
    LOCALEDATA LOESS LOGISTIC LP LUA MACONTROL MAPIMPORT MCMC MDC MDDB
    MDS MEANS METADATA METALIB METAOPERATE MI MIANALYZE MIGRATE MIXED
    MODECLUS MODEL MSCHART MULTTEST MVPDIAGNOSE MVPMODEL MVPMONITOR
    NESTED NETDRAW NETFLOW NLIN NLMIXED NLP NPAR1WAY ODSLIST ODSTABLE
    ODSTEXT OLAP OLAPCONTENTS OLAPOPERATE OPERATE OPTEX OPTGRAPH OPTIONS
    OPTLOAD OPTLP OPTLSO OPTMILP OPTMODEL OPTNET OPTQP OPTSAVE ORTHOREG
    PANEL PARETO PDLREG PDS PDSCOPY PHREG PLAN PLM PLOT PLS PM PMENU
    POWER PRESENV PRINCOMP PRINQUAL PRINT PRINTTO PROBIT PROTO PRTDEF
    PRTEXP PSMOOTH PWENCODE QDEVICE QLIM QUANTLIFE QUANTREG QUANTSELECT
    QUEST RANK RAREEVENTS RDC RDPOOL RDSEC RECOMMEND REG REGISTRY RELEASE
    RELIABILITY REPORT RISK ROBUSTREG RSREG SCAPROC SCORE SEQDESIGN
    SEQTEST SERVER SEVERITY SGDESIGN SGPANEL SGPLOT SGRENDER SGSCATTER
    SHEWHART SIM2D SIMILARITY SIMLIN SIMNORMAL SOAP SORT SOURCE SPECTRA
    SPP SQL SQOOP SSM STANDARD STATESPACE STDIZE STDRATE STEPDISC STP
    STREAM SUMMARY SURVEYFREQ SURVEYIMPUTE SURVEYLOGISTIC SURVEYMEANS
    SURVEYPHREG SURVEYREG SURVEYSELECT SYSLIN TABULATE TAPECOPY TAPELABEL
    TEMPLATE TIMEDATA TIMEID TIMEPLOT TIMESERIES TPSPLINE TRANSPOSE
    TRANSREG TRANTAB TREE TSCSREG TTEST UCM UNIVARIATE UPLOAD VARCLUS
    VARCOMP VARIOGRAM VARMAX VASMP X11 X12 X13 XSL
  )
end