forked from rpardee/sas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SAS.tmLanguage
216 lines (216 loc) · 9.9 KB
/
SAS.tmLanguage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>A work in progress--improves over the existing in that it populates symbols, and handles comments more gracefully.</string>
<key>fileTypes</key>
<array>
<string>sas</string>
</array>
<key>foldingStartMarker</key>
<string>(?i:(proc|data|%macro).*;$)</string>
<key>foldingStopMarker</key>
<string>(?i:(run|quit|%mend)\s?);</string>
<key>name</key>
<string>SAS Program</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?i:\b(if|while|until|for|do|end|then|else|run|quit|cancel)\b)</string>
<key>name</key>
<string>keyword.control.sas</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>2</key>
<dict>
<key>name</key>
<string>support.function.sas</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.name.function.sas</string>
</dict>
</dict>
<key>match</key>
<string>(?i:\b((data|set|merge)\s+(\w+))\b)</string>
<key>name</key>
<string>keyword.other.sas</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.class.sas</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.name.function.sas</string>
</dict>
</dict>
<key>match</key>
<string>(?i:(%(macro|mend|do|if|then|end|while|until|goto|include)\b))\s*(\w*)</string>
<key>name</key>
<string>keyword.other.sas</string>
</dict>
<dict>
<key>begin</key>
<string>(?i:\bproc\s*sql\b.*)</string>
<key>comment</key>
<string>Looks like for this to work there must be a *name* as well as the patterns/include bit.</string>
<key>end</key>
<string>(?i:\bquit\s*;)</string>
<key>name</key>
<string>meta.sql.sas</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#star_comment</string>
</dict>
<dict>
<key>include</key>
<string>#hanging_comment</string>
</dict>
<dict>
<key>include</key>
<string>source.sql</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>(?i:\b(by|label|format)\b)</string>
<key>name</key>
<string>keyword.datastep.sas</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.function.sas</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>support.class.sas</string>
</dict>
</dict>
<key>match</key>
<string>(?i:\b(proc (\w+))\b)</string>
<key>name</key>
<string>meta.function-call.sas</string>
</dict>
<dict>
<key>match</key>
<string>(?i:\b(_n_|_error_)\b)</string>
<key>name</key>
<string>variable.language.sas</string>
</dict>
<dict>
<key>include</key>
<string>#star_comment</string>
</dict>
<dict>
<key>include</key>
<string>#hanging_comment</string>
</dict>
<dict>
<key>begin</key>
<string>/\*</string>
<key>end</key>
<string>\*/</string>
<key>name</key>
<string>comment.block.sas</string>
</dict>
<dict>
<key>match</key>
<string>[\+/*^]</string>
<key>name</key>
<string>keyword.operator.arithmetic.sas</string>
</dict>
<dict>
<key>match</key>
<string>\b\s?(?i:(eq|ne|gt|ge|lt|le|=|!=|^=))\s?\b</string>
<key>name</key>
<string>keyword.operator.assignment.sas</string>
</dict>
<dict>
<key>match</key>
<string>\b\d+\b</string>
<key>name</key>
<string>constant.numeric.sas</string>
</dict>
<dict>
<key>match</key>
<string>(?i:['"]\d{1,2}-?(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)-?\d{2,4}['"]d)</string>
<key>name</key>
<string>constant.numeric.sas</string>
</dict>
<dict>
<key>match</key>
<string>'[^']*'</string>
<key>name</key>
<string>string.quoted.single.sas</string>
</dict>
<dict>
<key>match</key>
<string>"[^"]*"</string>
<key>name</key>
<string>string.quoted.double.sas</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.class.sas</string>
</dict>
</dict>
<key>match</key>
<string>\b(?i:(_all_|_character_|_cmd_|_freq_|_i_|_infile_|_last_|_msg_|_null_|_numeric_|_temporary_|_type_|abort|abs|addr|adjrsq|airy|alpha|alter|altlog|altprint|and|arcos|array|arsin|as|atan|attrc|attrib|attrn|authserver|autoexec|awscontrol|awsdef|awsmenu|awsmenumerge|awstitle|backward|band|base|betainv|between|blocksize|blshift|bnot|bor|brshift|bufno|bufsize|bxor|by|byerr|byline|byte|calculated|call|cards|cards4|catcache|cbufno|cdf|ceil|center|cexist|change|chisq|cinv|class|cleanup|close|cnonct|cntllev|coalesce|codegen|col|collate|collin|column|comamid|comaux1|comaux2|comdef|compbl|compound|compress|config|continue|convert|cos|cosh|cpuid|create|cross|crosstab|css|curobs|cv|daccdb|daccdbsl|daccsl|daccsyd|dacctab|dairy|datalines|datalines4|datejul|datepart|datetime|day|dbcslang|dbcstype|dclose|ddm|delete|delimiter|depdb|depdbsl|depsl|depsyd|deptab|dequote|descending|descript|design=|device|dflang|dhms|dif|digamma|dim|dinfo|display|distinct|dkricond|dkrocond|dlm|dnum|do|dopen|doptname|doptnum|dread|drop|dropnote|dsname|dsnferr|echo|else|emaildlg|emailid|emailpw|emailserver|emailsys|encrypt|end|endsas|engine|eof|eov|erf|erfc|error|errorcheck|errors|exist|exp|fappend|fclose|fcol|fdelete|feedback|fetch|fetchobs|fexist|fget|file|fileclose|fileexist|filefmt|filename|fileref|filevar|finfo|finv|fipname|fipnamel|fipstate|first|firstobs|floor|fmterr|fmtsearch|fnonct|fnote|font|fontalias|footnote|footnote1|footnote2|footnote3|footnote4|footnote5|footnote6|footnote7|footnote8|footnote9|fopen|foptname|foptnum|force|formatted|formchar|formdelim|formdlim|forward|fpoint|fpos|fput|fread|frewind|frlen|from|fsep|fuzz|fwrite|gaminv|gamma|getoption|getvarc|getvarn|go|goto|group|gwindow|hbar|hbound|helpenv|helploc|hms|honorappearance|hosthelp|hostprint|hour|hpct|html|hvar|ibessel|ibr|id|if|index|indexc|indexw|initcmd|initstmt|inner|input|inputc|inputn|inr|insert|int|intck|intnx|into|intrr|invaliddata|irr|is|jbessel|join|juldate|keep|kentb|kurtosis|label|lag|last|lbound|leave|left|length|levels|lgamma|lib|libname|library|libref|line|linesize|link|list|log|log10|log2|logpdf|logpmf|logsdf|lostcard|lowcase|lrecl|ls|macro|macrogen|maps|mautosource|max|maxdec|maxr|mdy|mean|measures|median|memtype|merge|merror|min|minute|missing|missover|mlogic|mod|mode|model|modify|month|mopen|mort|mprint|mrecall|msglevel|msymtabmax|mvarsize|myy|n|nest|netpv|new|news|nmiss|no|nobatch|nobs|nocaps|nocardimage|nocenter|nocharcode|nocmdmac|nocol|nocum|nodate|nodbcs|nodetails|nodmr|nodms|nodmsbatch|nodup|nodupkey|noduplicates|noechoauto|noequals|noerrorabend|noexitwindows|nofullstimer|noicon|noimplmac|noint|nolist|noloadlist|nomiss|nomlogic|nomprint|nomrecall|nomsgcase|nomstored|nomultenvappl|nonotes|nonumber|noobs|noovp|nopad|nopercent|noprint|noprintinit|normal|norow|norsasuser|nosetinit|nosource2|nosplash|nosymbolgen|note|notes|notitle|notitles|notsorted|noverbose|noxsync|noxwait|npv|null|number|numkeys|nummousekeys|nway|obs|ods|on|open|option|order|ordinal|otherwise|out|outer|outp=|output|over|ovp|p(1|5|10|25|50|75|90|95|99)|pad|pad2|page|pageno|pagesize|paired|parm|parmcards|path|pathdll|pathname|pdf|peek|peekc|pfkey|pmf|point|poisson|poke|position|printer|probbeta|probbnml|probchi|probf|probgam|probhypr|probit|probnegb|probnorm|probsig|probt|procleave|prt|ps|put|putc|putn|pw|pwreq|qtr|quote|r|ranbin|rancau|ranexp|rangam|range|ranks|rannor|ranpoi|rantbl|rantri|ranuni|read|recfm|register|regr|remote|remove|rename|repeat|replace|resolve|retain|return|reuse|reverse|rewind|right|round|rsquare|rtf|rtrace|rtraceloc|s|s2|samploc|sasautos|sascontrol|sasfrscr|sashelp|sasmsg|sasmstore|sasscript|sasuser|saving|scan|sdf|second|select|selection|separated|seq|serror|set|setcomm|setot|sign|simple|sin|sinh|siteinfo|skewness|skip|sle|sls|sortedby|sortpgm|sortseq|sortsize|soundex|source2|spedis|splashlocation|split|spool|sqrt|start|std|stderr|stdin|stfips|stimer|stname|stnamel|stop|stopover|subgroup|subpopn|substr|sum|sumwgt|symbol|symbolgen|symget|symput|sysget|sysin|sysleave|sysmsg|sysparm|sysprint|sysprintfont|sysprod|sysrc|system|t|table|tables|tan|tanh|tapeclose|tbufsize|terminal|test|then|timepart|tinv|title|title1|title2|title3|title4|title5|title6|title7|title8|title9|tnonct|to|today|tol|tooldef|totper|transformout|translate|trantab|tranwrd|trigamma|trim|trimn|trunc|truncover|type|unformatted|uniform|union|until|upcase|update|user|usericon|uss|validate|value|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|vnferr|vtype|vtypex|weekday|weight|when|where|while|wincharset|window|work|workinit|workterm|write|wsum|x|xsync|xwait|yearcutoff|yes|yyq|zipfips|zipname|zipnamel|zipstate))\b</string>
<key>name</key>
<string>support.function.sas</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>hanging_comment</key>
<dict>
<key>begin</key>
<string>(?<=;)\s*\*</string>
<key>comment</key>
<string>This should handle 'hanging' comments where there is executable code to the left of the comment.</string>
<key>end</key>
<string>;</string>
<key>name</key>
<string>comment.block.sas</string>
</dict>
<key>star_comment</key>
<dict>
<key>begin</key>
<string>^\s*%+*\*</string>
<key>comment</key>
<string>This should handle simple comments where star is the first non-whitespace char on the line.</string>
<key>end</key>
<string>;</string>
<key>name</key>
<string>comment.block.sas</string>
</dict>
</dict>
<key>scopeName</key>
<string>source.sas</string>
<key>uuid</key>
<string>7e721b1e-6265-4865-bc4b-308d49affba1</string>
</dict>
</plist>