7
|
1 " Vim syntax file
|
|
2 " Language: RPL/2
|
|
3 " Version: 0.15.15 against RPL/2 version 4.00pre7i
|
3312
|
4 " Last Change: 2012 Feb 03 by Thilo Six
|
7
|
5 " Maintainer: Joël BERTRAND <rpl2@free.fr>
|
|
6 " URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim
|
|
7 " Credits: Nothing
|
|
8
|
|
9 " For version 5.x: Clear all syntax items
|
|
10 " For version 6.x: Quit when a syntax file was already loaded
|
|
11 if version < 600
|
|
12 syntax clear
|
|
13 elseif exists("b:current_syntax")
|
|
14 finish
|
|
15 endif
|
|
16
|
3312
|
17 let s:cpo_save = &cpo
|
|
18 set cpo&vim
|
|
19
|
7
|
20 " Keyword characters (not used)
|
|
21 " set iskeyword=33-127
|
|
22
|
|
23 " Case sensitive
|
|
24 syntax case match
|
|
25
|
|
26 " Constants
|
|
27 syntax match rplConstant "\(^\|\s\+\)\(e\|i\)\ze\($\|\s\+\)"
|
|
28
|
|
29 " Any binary number
|
|
30 syntax match rplBinaryError "\(^\|\s\+\)#\s*\S\+b\ze"
|
|
31 syntax match rplBinary "\(^\|\s\+\)#\s*[01]\+b\ze\($\|\s\+\)"
|
|
32 syntax match rplOctalError "\(^\|\s\+\)#\s*\S\+o\ze"
|
|
33 syntax match rplOctal "\(^\|\s\+\)#\s*\o\+o\ze\($\|\s\+\)"
|
|
34 syntax match rplDecimalError "\(^\|\s\+\)#\s*\S\+d\ze"
|
|
35 syntax match rplDecimal "\(^\|\s\+\)#\s*\d\+d\ze\($\|\s\+\)"
|
|
36 syntax match rplHexadecimalError "\(^\|\s\+\)#\s*\S\+h\ze"
|
|
37 syntax match rplHexadecimal "\(^\|\s\+\)#\s*\x\+h\ze\($\|\s\+\)"
|
|
38
|
|
39 " Case unsensitive
|
|
40 syntax case ignore
|
|
41
|
|
42 syntax match rplControl "\(^\|\s\+\)abort\ze\($\|\s\+\)"
|
|
43 syntax match rplControl "\(^\|\s\+\)kill\ze\($\|\s\+\)"
|
|
44 syntax match rplControl "\(^\|\s\+\)cont\ze\($\|\s\+\)"
|
|
45 syntax match rplControl "\(^\|\s\+\)halt\ze\($\|\s\+\)"
|
|
46 syntax match rplControl "\(^\|\s\+\)cmlf\ze\($\|\s\+\)"
|
|
47 syntax match rplControl "\(^\|\s\+\)sst\ze\($\|\s\+\)"
|
|
48
|
|
49 syntax match rplConstant "\(^\|\s\+\)pi\ze\($\|\s\+\)"
|
|
50
|
|
51 syntax match rplStatement "\(^\|\s\+\)return\ze\($\|\s\+\)"
|
|
52 syntax match rplStatement "\(^\|\s\+\)last\ze\($\|\s\+\)"
|
|
53 syntax match rplStatement "\(^\|\s\+\)syzeval\ze\($\|\s\+\)"
|
|
54 syntax match rplStatement "\(^\|\s\+\)wait\ze\($\|\s\+\)"
|
|
55 syntax match rplStatement "\(^\|\s\+\)type\ze\($\|\s\+\)"
|
|
56 syntax match rplStatement "\(^\|\s\+\)kind\ze\($\|\s\+\)"
|
|
57 syntax match rplStatement "\(^\|\s\+\)eval\ze\($\|\s\+\)"
|
|
58 syntax match rplStatement "\(^\|\s\+\)use\ze\($\|\s\+\)"
|
|
59 syntax match rplStatement "\(^\|\s\+\)remove\ze\($\|\s\+\)"
|
|
60 syntax match rplStatement "\(^\|\s\+\)external\ze\($\|\s\+\)"
|
|
61 syntax match rplStatement "\(^\|\s\+\)dup\([2n]\|\)\ze\($\|\s\+\)"
|
|
62 syntax match rplStatement "\(^\|\s\+\)drop\([2n]\|\)\ze\($\|\s\+\)"
|
|
63 syntax match rplStatement "\(^\|\s\+\)depth\ze\($\|\s\+\)"
|
|
64 syntax match rplStatement "\(^\|\s\+\)roll\(d\|\)\ze\($\|\s\+\)"
|
|
65 syntax match rplStatement "\(^\|\s\+\)pick\ze\($\|\s\+\)"
|
|
66 syntax match rplStatement "\(^\|\s\+\)rot\ze\($\|\s\+\)"
|
|
67 syntax match rplStatement "\(^\|\s\+\)swap\ze\($\|\s\+\)"
|
|
68 syntax match rplStatement "\(^\|\s\+\)over\ze\($\|\s\+\)"
|
|
69 syntax match rplStatement "\(^\|\s\+\)clear\ze\($\|\s\+\)"
|
|
70 syntax match rplStatement "\(^\|\s\+\)warranty\ze\($\|\s\+\)"
|
|
71 syntax match rplStatement "\(^\|\s\+\)copyright\ze\($\|\s\+\)"
|
|
72 syntax match rplStatement "\(^\|\s\+\)convert\ze\($\|\s\+\)"
|
|
73 syntax match rplStatement "\(^\|\s\+\)date\ze\($\|\s\+\)"
|
|
74 syntax match rplStatement "\(^\|\s\+\)time\ze\($\|\s\+\)"
|
|
75 syntax match rplStatement "\(^\|\s\+\)mem\ze\($\|\s\+\)"
|
|
76 syntax match rplStatement "\(^\|\s\+\)clmf\ze\($\|\s\+\)"
|
|
77 syntax match rplStatement "\(^\|\s\+\)->num\ze\($\|\s\+\)"
|
|
78 syntax match rplStatement "\(^\|\s\+\)help\ze\($\|\s\+\)"
|
|
79
|
|
80 syntax match rplStorage "\(^\|\s\+\)get\(i\|r\|c\|\)\ze\($\|\s\+\)"
|
|
81 syntax match rplStorage "\(^\|\s\+\)put\(i\|r\|c\|\)\ze\($\|\s\+\)"
|
|
82 syntax match rplStorage "\(^\|\s\+\)rcl\ze\($\|\s\+\)"
|
|
83 syntax match rplStorage "\(^\|\s\+\)purge\ze\($\|\s\+\)"
|
|
84 syntax match rplStorage "\(^\|\s\+\)sinv\ze\($\|\s\+\)"
|
|
85 syntax match rplStorage "\(^\|\s\+\)sneg\ze\($\|\s\+\)"
|
|
86 syntax match rplStorage "\(^\|\s\+\)sconj\ze\($\|\s\+\)"
|
|
87 syntax match rplStorage "\(^\|\s\+\)steq\ze\($\|\s\+\)"
|
|
88 syntax match rplStorage "\(^\|\s\+\)rceq\ze\($\|\s\+\)"
|
|
89 syntax match rplStorage "\(^\|\s\+\)vars\ze\($\|\s\+\)"
|
|
90 syntax match rplStorage "\(^\|\s\+\)clusr\ze\($\|\s\+\)"
|
|
91 syntax match rplStorage "\(^\|\s\+\)sto\([+-/\*]\|\)\ze\($\|\s\+\)"
|
|
92
|
|
93 syntax match rplAlgConditional "\(^\|\s\+\)ift\(e\|\)\ze\($\|\s\+\)"
|
|
94
|
|
95 syntax match rplOperator "\(^\|\s\+\)and\ze\($\|\s\+\)"
|
|
96 syntax match rplOperator "\(^\|\s\+\)\(x\|\)or\ze\($\|\s\+\)"
|
|
97 syntax match rplOperator "\(^\|\s\+\)not\ze\($\|\s\+\)"
|
|
98 syntax match rplOperator "\(^\|\s\+\)same\ze\($\|\s\+\)"
|
|
99 syntax match rplOperator "\(^\|\s\+\)==\ze\($\|\s\+\)"
|
|
100 syntax match rplOperator "\(^\|\s\+\)<=\ze\($\|\s\+\)"
|
|
101 syntax match rplOperator "\(^\|\s\+\)=<\ze\($\|\s\+\)"
|
|
102 syntax match rplOperator "\(^\|\s\+\)=>\ze\($\|\s\+\)"
|
|
103 syntax match rplOperator "\(^\|\s\+\)>=\ze\($\|\s\+\)"
|
|
104 syntax match rplOperator "\(^\|\s\+\)<>\ze\($\|\s\+\)"
|
|
105 syntax match rplOperator "\(^\|\s\+\)>\ze\($\|\s\+\)"
|
|
106 syntax match rplOperator "\(^\|\s\+\)<\ze\($\|\s\+\)"
|
|
107 syntax match rplOperator "\(^\|\s\+\)[+-]\ze\($\|\s\+\)"
|
|
108 syntax match rplOperator "\(^\|\s\+\)[/\*]\ze\($\|\s\+\)"
|
|
109 syntax match rplOperator "\(^\|\s\+\)\^\ze\($\|\s\+\)"
|
|
110 syntax match rplOperator "\(^\|\s\+\)\*\*\ze\($\|\s\+\)"
|
|
111
|
|
112 syntax match rplBoolean "\(^\|\s\+\)true\ze\($\|\s\+\)"
|
|
113 syntax match rplBoolean "\(^\|\s\+\)false\ze\($\|\s\+\)"
|
|
114
|
|
115 syntax match rplReadWrite "\(^\|\s\+\)store\ze\($\|\s\+\)"
|
|
116 syntax match rplReadWrite "\(^\|\s\+\)recall\ze\($\|\s\+\)"
|
|
117 syntax match rplReadWrite "\(^\|\s\+\)\(\|wf\|un\)lock\ze\($\|\s\+\)"
|
|
118 syntax match rplReadWrite "\(^\|\s\+\)open\ze\($\|\s\+\)"
|
|
119 syntax match rplReadWrite "\(^\|\s\+\)close\ze\($\|\s\+\)"
|
|
120 syntax match rplReadWrite "\(^\|\s\+\)delete\ze\($\|\s\+\)"
|
|
121 syntax match rplReadWrite "\(^\|\s\+\)create\ze\($\|\s\+\)"
|
|
122 syntax match rplReadWrite "\(^\|\s\+\)format\ze\($\|\s\+\)"
|
|
123 syntax match rplReadWrite "\(^\|\s\+\)rewind\ze\($\|\s\+\)"
|
|
124 syntax match rplReadWrite "\(^\|\s\+\)backspace\ze\($\|\s\+\)"
|
|
125 syntax match rplReadWrite "\(^\|\s\+\)\(\|re\)write\ze\($\|\s\+\)"
|
|
126 syntax match rplReadWrite "\(^\|\s\+\)read\ze\($\|\s\+\)"
|
|
127 syntax match rplReadWrite "\(^\|\s\+\)inquire\ze\($\|\s\+\)"
|
|
128 syntax match rplReadWrite "\(^\|\s\+\)sync\ze\($\|\s\+\)"
|
|
129 syntax match rplReadWrite "\(^\|\s\+\)append\ze\($\|\s\+\)"
|
|
130 syntax match rplReadWrite "\(^\|\s\+\)suppress\ze\($\|\s\+\)"
|
|
131 syntax match rplReadWrite "\(^\|\s\+\)seek\ze\($\|\s\+\)"
|
|
132 syntax match rplReadWrite "\(^\|\s\+\)pr\(1\|int\|st\|stc\|lcd\|var\|usr\|md\)\ze\($\|\s\+\)"
|
|
133 syntax match rplReadWrite "\(^\|\s\+\)paper\ze\($\|\s\+\)"
|
|
134 syntax match rplReadWrite "\(^\|\s\+\)cr\($\|\s\+\)"
|
|
135 syntax match rplReadWrite "\(^\|\s\+\)erase\ze\($\|\s\+\)"
|
|
136 syntax match rplReadWrite "\(^\|\s\+\)disp\ze\($\|\s\+\)"
|
|
137 syntax match rplReadWrite "\(^\|\s\+\)input\ze\($\|\s\+\)"
|
|
138 syntax match rplReadWrite "\(^\|\s\+\)prompt\ze\($\|\s\+\)"
|
|
139 syntax match rplReadWrite "\(^\|\s\+\)key\ze\($\|\s\+\)"
|
|
140 syntax match rplReadWrite "\(^\|\s\+\)cllcd\ze\($\|\s\+\)"
|
|
141 syntax match rplReadWrite "\(^\|\s\+\)\(\|re\)draw\ze\($\|\s\+\)"
|
|
142 syntax match rplReadWrite "\(^\|\s\+\)drax\ze\($\|\s\+\)"
|
|
143 syntax match rplReadWrite "\(^\|\s\+\)indep\ze\($\|\s\+\)"
|
|
144 syntax match rplReadWrite "\(^\|\s\+\)depnd\ze\($\|\s\+\)"
|
|
145 syntax match rplReadWrite "\(^\|\s\+\)res\ze\($\|\s\+\)"
|
|
146 syntax match rplReadWrite "\(^\|\s\+\)axes\ze\($\|\s\+\)"
|
|
147 syntax match rplReadWrite "\(^\|\s\+\)label\ze\($\|\s\+\)"
|
|
148 syntax match rplReadWrite "\(^\|\s\+\)pmin\ze\($\|\s\+\)"
|
|
149 syntax match rplReadWrite "\(^\|\s\+\)pmax\ze\($\|\s\+\)"
|
|
150 syntax match rplReadWrite "\(^\|\s\+\)centr\ze\($\|\s\+\)"
|
|
151 syntax match rplReadWrite "\(^\|\s\+\)persist\ze\($\|\s\+\)"
|
|
152 syntax match rplReadWrite "\(^\|\s\+\)title\ze\($\|\s\+\)"
|
|
153 syntax match rplReadWrite "\(^\|\s\+\)\(slice\|auto\|log\|\)scale\ze\($\|\s\+\)"
|
|
154 syntax match rplReadWrite "\(^\|\s\+\)eyept\ze\($\|\s\+\)"
|
|
155 syntax match rplReadWrite "\(^\|\s\+\)\(p\|s\)par\ze\($\|\s\+\)"
|
|
156 syntax match rplReadWrite "\(^\|\s\+\)function\ze\($\|\s\+\)"
|
|
157 syntax match rplReadWrite "\(^\|\s\+\)polar\ze\($\|\s\+\)"
|
|
158 syntax match rplReadWrite "\(^\|\s\+\)scatter\ze\($\|\s\+\)"
|
|
159 syntax match rplReadWrite "\(^\|\s\+\)plotter\ze\($\|\s\+\)"
|
|
160 syntax match rplReadWrite "\(^\|\s\+\)wireframe\ze\($\|\s\+\)"
|
|
161 syntax match rplReadWrite "\(^\|\s\+\)parametric\ze\($\|\s\+\)"
|
|
162 syntax match rplReadWrite "\(^\|\s\+\)slice\ze\($\|\s\+\)"
|
|
163 syntax match rplReadWrite "\(^\|\s\+\)\*w\ze\($\|\s\+\)"
|
|
164 syntax match rplReadWrite "\(^\|\s\+\)\*h\ze\($\|\s\+\)"
|
|
165 syntax match rplReadWrite "\(^\|\s\+\)\*d\ze\($\|\s\+\)"
|
|
166 syntax match rplReadWrite "\(^\|\s\+\)\*s\ze\($\|\s\+\)"
|
|
167 syntax match rplReadWrite "\(^\|\s\+\)->lcd\ze\($\|\s\+\)"
|
|
168 syntax match rplReadWrite "\(^\|\s\+\)lcd->\ze\($\|\s\+\)"
|
|
169 syntax match rplReadWrite "\(^\|\s\+\)edit\ze\($\|\s\+\)"
|
|
170 syntax match rplReadWrite "\(^\|\s\+\)visit\ze\($\|\s\+\)"
|
|
171
|
|
172 syntax match rplIntrinsic "\(^\|\s\+\)abs\ze\($\|\s\+\)"
|
|
173 syntax match rplIntrinsic "\(^\|\s\+\)arg\ze\($\|\s\+\)"
|
|
174 syntax match rplIntrinsic "\(^\|\s\+\)conj\ze\($\|\s\+\)"
|
|
175 syntax match rplIntrinsic "\(^\|\s\+\)re\ze\($\|\s\+\)"
|
|
176 syntax match rplIntrinsic "\(^\|\s\+\)im\ze\($\|\s\+\)"
|
|
177 syntax match rplIntrinsic "\(^\|\s\+\)mant\ze\($\|\s\+\)"
|
|
178 syntax match rplIntrinsic "\(^\|\s\+\)xpon\ze\($\|\s\+\)"
|
|
179 syntax match rplIntrinsic "\(^\|\s\+\)ceil\ze\($\|\s\+\)"
|
|
180 syntax match rplIntrinsic "\(^\|\s\+\)fact\ze\($\|\s\+\)"
|
|
181 syntax match rplIntrinsic "\(^\|\s\+\)fp\ze\($\|\s\+\)"
|
|
182 syntax match rplIntrinsic "\(^\|\s\+\)floor\ze\($\|\s\+\)"
|
|
183 syntax match rplIntrinsic "\(^\|\s\+\)inv\ze\($\|\s\+\)"
|
|
184 syntax match rplIntrinsic "\(^\|\s\+\)ip\ze\($\|\s\+\)"
|
|
185 syntax match rplIntrinsic "\(^\|\s\+\)max\ze\($\|\s\+\)"
|
|
186 syntax match rplIntrinsic "\(^\|\s\+\)min\ze\($\|\s\+\)"
|
|
187 syntax match rplIntrinsic "\(^\|\s\+\)mod\ze\($\|\s\+\)"
|
|
188 syntax match rplIntrinsic "\(^\|\s\+\)neg\ze\($\|\s\+\)"
|
|
189 syntax match rplIntrinsic "\(^\|\s\+\)relax\ze\($\|\s\+\)"
|
|
190 syntax match rplIntrinsic "\(^\|\s\+\)sign\ze\($\|\s\+\)"
|
|
191 syntax match rplIntrinsic "\(^\|\s\+\)sq\(\|rt\)\ze\($\|\s\+\)"
|
|
192 syntax match rplIntrinsic "\(^\|\s\+\)xroot\ze\($\|\s\+\)"
|
|
193 syntax match rplIntrinsic "\(^\|\s\+\)cos\ze\($\|\s\+\)"
|
|
194 syntax match rplIntrinsic "\(^\|\s\+\)sin\ze\($\|\s\+\)"
|
|
195 syntax match rplIntrinsic "\(^\|\s\+\)tan\ze\($\|\s\+\)"
|
|
196 syntax match rplIntrinsic "\(^\|\s\+\)tg\ze\($\|\s\+\)"
|
|
197 syntax match rplIntrinsic "\(^\|\s\+\)a\(\|rc\)cos\ze\($\|\s\+\)"
|
|
198 syntax match rplIntrinsic "\(^\|\s\+\)a\(\|rc\)sin\ze\($\|\s\+\)"
|
|
199 syntax match rplIntrinsic "\(^\|\s\+\)atan\ze\($\|\s\+\)"
|
|
200 syntax match rplIntrinsic "\(^\|\s\+\)arctg\ze\($\|\s\+\)"
|
|
201 syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)cosh\ze\($\|\s\+\)"
|
|
202 syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)sinh\ze\($\|\s\+\)"
|
|
203 syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)tanh\ze\($\|\s\+\)"
|
|
204 syntax match rplIntrinsic "\(^\|\s\+\)\(\|arg\)th\ze\($\|\s\+\)"
|
|
205 syntax match rplIntrinsic "\(^\|\s\+\)arg[cst]h\ze\($\|\s\+\)"
|
|
206 syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)log\ze\($\|\s\+\)"
|
|
207 syntax match rplIntrinsic "\(^\|\s\+\)ln\(\|1\)\ze\($\|\s\+\)"
|
|
208 syntax match rplIntrinsic "\(^\|\s\+\)exp\(\|m\)\ze\($\|\s\+\)"
|
|
209 syntax match rplIntrinsic "\(^\|\s\+\)trn\ze\($\|\s\+\)"
|
|
210 syntax match rplIntrinsic "\(^\|\s\+\)con\ze\($\|\s\+\)"
|
|
211 syntax match rplIntrinsic "\(^\|\s\+\)idn\ze\($\|\s\+\)"
|
|
212 syntax match rplIntrinsic "\(^\|\s\+\)rdm\ze\($\|\s\+\)"
|
|
213 syntax match rplIntrinsic "\(^\|\s\+\)rsd\ze\($\|\s\+\)"
|
|
214 syntax match rplIntrinsic "\(^\|\s\+\)cnrm\ze\($\|\s\+\)"
|
|
215 syntax match rplIntrinsic "\(^\|\s\+\)cross\ze\($\|\s\+\)"
|
|
216 syntax match rplIntrinsic "\(^\|\s\+\)d[eo]t\ze\($\|\s\+\)"
|
|
217 syntax match rplIntrinsic "\(^\|\s\+\)[cr]swp\ze\($\|\s\+\)"
|
|
218 syntax match rplIntrinsic "\(^\|\s\+\)rci\(j\|\)\ze\($\|\s\+\)"
|
|
219 syntax match rplIntrinsic "\(^\|\s\+\)\(in\|de\)cr\ze\($\|\s\+\)"
|
|
220 syntax match rplIntrinsic "\(^\|\s\+\)bessel\ze\($\|\s\+\)"
|
|
221
|
|
222 syntax match rplIntrinsic "\(^\|\s\+\)\(\|g\)egvl\ze\($\|\s\+\)"
|
|
223 syntax match rplIntrinsic "\(^\|\s\+\)\(\|g\)\(\|l\|r\)egv\ze\($\|\s\+\)"
|
|
224 syntax match rplIntrinsic "\(^\|\s\+\)rnrm\ze\($\|\s\+\)"
|
|
225 syntax match rplIntrinsic "\(^\|\s\+\)\(std\|fix\|sci\|eng\)\ze\($\|\s\+\)"
|
|
226 syntax match rplIntrinsic "\(^\|\s\+\)\(rad\|deg\)\ze\($\|\s\+\)"
|
|
227 syntax match rplIntrinsic "\(^\|\s\+\)\(\|n\)rand\ze\($\|\s\+\)"
|
|
228 syntax match rplIntrinsic "\(^\|\s\+\)rdz\ze\($\|\s\+\)"
|
|
229 syntax match rplIntrinsic "\(^\|\s\+\)\(\|i\)fft\ze\($\|\s\+\)"
|
|
230 syntax match rplIntrinsic "\(^\|\s\+\)\(dec\|bin\|oct\|hex\)\ze\($\|\s\+\)"
|
|
231 syntax match rplIntrinsic "\(^\|\s\+\)rclf\ze\($\|\s\+\)"
|
|
232 syntax match rplIntrinsic "\(^\|\s\+\)stof\ze\($\|\s\+\)"
|
|
233 syntax match rplIntrinsic "\(^\|\s\+\)[cs]f\ze\($\|\s\+\)"
|
|
234 syntax match rplIntrinsic "\(^\|\s\+\)chr\ze\($\|\s\+\)"
|
|
235 syntax match rplIntrinsic "\(^\|\s\+\)num\ze\($\|\s\+\)"
|
|
236 syntax match rplIntrinsic "\(^\|\s\+\)pos\ze\($\|\s\+\)"
|
|
237 syntax match rplIntrinsic "\(^\|\s\+\)sub\ze\($\|\s\+\)"
|
|
238 syntax match rplIntrinsic "\(^\|\s\+\)size\ze\($\|\s\+\)"
|
|
239 syntax match rplIntrinsic "\(^\|\s\+\)\(st\|rc\)ws\ze\($\|\s\+\)"
|
|
240 syntax match rplIntrinsic "\(^\|\s\+\)\(r\|s\)\(r\|l\)\(\|b\)\ze\($\|\s\+\)"
|
|
241 syntax match rplIntrinsic "\(^\|\s\+\)as\(r\|l\)\ze\($\|\s\+\)"
|
|
242 syntax match rplIntrinsic "\(^\|\s\+\)\(int\|der\)\ze\($\|\s\+\)"
|
|
243 syntax match rplIntrinsic "\(^\|\s\+\)stos\ze\($\|\s\+\)"
|
|
244 syntax match rplIntrinsic "\(^\|\s\+\)\(\|r\)cls\ze\($\|\s\+\)"
|
|
245 syntax match rplIntrinsic "\(^\|\s\+\)drws\ze\($\|\s\+\)"
|
|
246 syntax match rplIntrinsic "\(^\|\s\+\)scls\ze\($\|\s\+\)"
|
|
247 syntax match rplIntrinsic "\(^\|\s\+\)ns\ze\($\|\s\+\)"
|
|
248 syntax match rplIntrinsic "\(^\|\s\+\)tot\ze\($\|\s\+\)"
|
|
249 syntax match rplIntrinsic "\(^\|\s\+\)mean\ze\($\|\s\+\)"
|
|
250 syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)sdev\ze\($\|\s\+\)"
|
|
251 syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)var\ze\($\|\s\+\)"
|
|
252 syntax match rplIntrinsic "\(^\|\s\+\)maxs\ze\($\|\s\+\)"
|
|
253 syntax match rplIntrinsic "\(^\|\s\+\)mins\ze\($\|\s\+\)"
|
|
254 syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)cov\ze\($\|\s\+\)"
|
|
255 syntax match rplIntrinsic "\(^\|\s\+\)cols\ze\($\|\s\+\)"
|
|
256 syntax match rplIntrinsic "\(^\|\s\+\)s\(x\(\|y\|2\)\|y\(\|2\)\)\ze\($\|\s\+\)"
|
|
257 syntax match rplIntrinsic "\(^\|\s\+\)\(x\|y\)col\ze\($\|\s\+\)"
|
|
258 syntax match rplIntrinsic "\(^\|\s\+\)corr\ze\($\|\s\+\)"
|
|
259 syntax match rplIntrinsic "\(^\|\s\+\)utp[cfnt]\ze\($\|\s\+\)"
|
|
260 syntax match rplIntrinsic "\(^\|\s\+\)comb\ze\($\|\s\+\)"
|
|
261 syntax match rplIntrinsic "\(^\|\s\+\)perm\ze\($\|\s\+\)"
|
|
262 syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)lu\ze\($\|\s\+\)"
|
|
263 syntax match rplIntrinsic "\(^\|\s\+\)[lu]chol\ze\($\|\s\+\)"
|
|
264 syntax match rplIntrinsic "\(^\|\s\+\)schur\ze\($\|\s\+\)"
|
|
265 syntax match rplIntrinsic "\(^\|\s\+\)%\ze\($\|\s\+\)"
|
|
266 syntax match rplIntrinsic "\(^\|\s\+\)%ch\ze\($\|\s\+\)"
|
|
267 syntax match rplIntrinsic "\(^\|\s\+\)%t\ze\($\|\s\+\)"
|
|
268 syntax match rplIntrinsic "\(^\|\s\+\)hms->\ze\($\|\s\+\)"
|
|
269 syntax match rplIntrinsic "\(^\|\s\+\)->hms\ze\($\|\s\+\)"
|
|
270 syntax match rplIntrinsic "\(^\|\s\+\)hms+\ze\($\|\s\+\)"
|
|
271 syntax match rplIntrinsic "\(^\|\s\+\)hms-\ze\($\|\s\+\)"
|
|
272 syntax match rplIntrinsic "\(^\|\s\+\)d->r\ze\($\|\s\+\)"
|
|
273 syntax match rplIntrinsic "\(^\|\s\+\)r->d\ze\($\|\s\+\)"
|
|
274 syntax match rplIntrinsic "\(^\|\s\+\)b->r\ze\($\|\s\+\)"
|
|
275 syntax match rplIntrinsic "\(^\|\s\+\)r->b\ze\($\|\s\+\)"
|
|
276 syntax match rplIntrinsic "\(^\|\s\+\)c->r\ze\($\|\s\+\)"
|
|
277 syntax match rplIntrinsic "\(^\|\s\+\)r->c\ze\($\|\s\+\)"
|
|
278 syntax match rplIntrinsic "\(^\|\s\+\)r->p\ze\($\|\s\+\)"
|
|
279 syntax match rplIntrinsic "\(^\|\s\+\)p->r\ze\($\|\s\+\)"
|
|
280 syntax match rplIntrinsic "\(^\|\s\+\)str->\ze\($\|\s\+\)"
|
|
281 syntax match rplIntrinsic "\(^\|\s\+\)->str\ze\($\|\s\+\)"
|
|
282 syntax match rplIntrinsic "\(^\|\s\+\)array->\ze\($\|\s\+\)"
|
|
283 syntax match rplIntrinsic "\(^\|\s\+\)->array\ze\($\|\s\+\)"
|
|
284 syntax match rplIntrinsic "\(^\|\s\+\)list->\ze\($\|\s\+\)"
|
|
285 syntax match rplIntrinsic "\(^\|\s\+\)->list\ze\($\|\s\+\)"
|
|
286 syntax match rplIntrinsic "\(^\|\s\+\)s+\ze\($\|\s\+\)"
|
|
287 syntax match rplIntrinsic "\(^\|\s\+\)s-\ze\($\|\s\+\)"
|
|
288 syntax match rplIntrinsic "\(^\|\s\+\)col-\ze\($\|\s\+\)"
|
|
289 syntax match rplIntrinsic "\(^\|\s\+\)col+\ze\($\|\s\+\)"
|
|
290 syntax match rplIntrinsic "\(^\|\s\+\)row-\ze\($\|\s\+\)"
|
|
291 syntax match rplIntrinsic "\(^\|\s\+\)row+\ze\($\|\s\+\)"
|
|
292 syntax match rplIntrinsic "\(^\|\s\+\)->q\ze\($\|\s\+\)"
|
|
293
|
|
294 syntax match rplObsolete "\(^\|\s\+\)arry->\ze\($\|\s\+\)"hs=e-5
|
|
295 syntax match rplObsolete "\(^\|\s\+\)->arry\ze\($\|\s\+\)"hs=e-5
|
|
296
|
|
297 " Conditional structures
|
|
298 syntax match rplConditionalError "\(^\|\s\+\)case\ze\($\|\s\+\)"hs=e-3
|
|
299 syntax match rplConditionalError "\(^\|\s\+\)then\ze\($\|\s\+\)"hs=e-3
|
|
300 syntax match rplConditionalError "\(^\|\s\+\)else\ze\($\|\s\+\)"hs=e-3
|
|
301 syntax match rplConditionalError "\(^\|\s\+\)elseif\ze\($\|\s\+\)"hs=e-5
|
|
302 syntax match rplConditionalError "\(^\|\s\+\)end\ze\($\|\s\+\)"hs=e-2
|
|
303 syntax match rplConditionalError "\(^\|\s\+\)\(step\|next\)\ze\($\|\s\+\)"hs=e-3
|
|
304 syntax match rplConditionalError "\(^\|\s\+\)until\ze\($\|\s\+\)"hs=e-4
|
|
305 syntax match rplConditionalError "\(^\|\s\+\)repeat\ze\($\|\s\+\)"hs=e-5
|
|
306 syntax match rplConditionalError "\(^\|\s\+\)default\ze\($\|\s\+\)"hs=e-6
|
|
307
|
|
308 " FOR/(CYCLE)/(EXIT)/NEXT
|
|
309 " FOR/(CYCLE)/(EXIT)/STEP
|
|
310 " START/(CYCLE)/(EXIT)/NEXT
|
|
311 " START/(CYCLE)/(EXIT)/STEP
|
|
312 syntax match rplCycle "\(^\|\s\+\)\(cycle\|exit\)\ze\($\|\s\+\)"
|
|
313 syntax region rplForNext matchgroup=rplRepeat start="\(^\|\s\+\)\(for\|start\)\ze\($\|\s\+\)" end="\(^\|\s\+\)\(next\|step\)\ze\($\|\s\+\)" contains=ALL keepend extend
|
|
314
|
|
315 " ELSEIF/END
|
|
316 syntax region rplElseifEnd matchgroup=rplConditional start="\(^\|\s\+\)elseif\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained contains=ALLBUT,rplElseEnd keepend
|
|
317
|
|
318 " ELSE/END
|
|
319 syntax region rplElseEnd matchgroup=rplConditional start="\(^\|\s\+\)else\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained contains=ALLBUT,rplElseEnd,rplThenEnd,rplElseifEnd keepend
|
|
320
|
|
321 " THEN/END
|
|
322 syntax region rplThenEnd matchgroup=rplConditional start="\(^\|\s\+\)then\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained containedin=rplIfEnd contains=ALLBUT,rplThenEnd keepend
|
|
323
|
|
324 " IF/END
|
|
325 syntax region rplIfEnd matchgroup=rplConditional start="\(^\|\s\+\)if\(err\|\)\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplElseEnd,rplElseifEnd keepend extend
|
|
326 " if end is accepted !
|
|
327 " select end too !
|
|
328
|
|
329 " CASE/THEN
|
|
330 syntax region rplCaseThen matchgroup=rplConditional start="\(^\|\s\+\)case\ze\($\|\s\+\)" end="\(^\|\s\+\)then\ze\($\|\s\+\)" contains=ALLBUT,rplCaseThen,rplCaseEnd,rplThenEnd keepend extend contained containedin=rplCaseEnd
|
|
331
|
|
332 " CASE/END
|
|
333 syntax region rplCaseEnd matchgroup=rplConditional start="\(^\|\s\+\)case\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplCaseEnd,rplThenEnd,rplElseEnd keepend extend contained containedin=rplSelectEnd
|
|
334
|
|
335 " DEFAULT/END
|
|
336 syntax region rplDefaultEnd matchgroup=rplConditional start="\(^\|\s\+\)default\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplDefaultEnd keepend contained containedin=rplSelectEnd
|
|
337
|
|
338 " SELECT/END
|
|
339 syntax region rplSelectEnd matchgroup=rplConditional start="\(^\|\s\+\)select\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplThenEnd keepend extend
|
|
340 " select end is accepted !
|
|
341
|
|
342 " DO/UNTIL/END
|
|
343 syntax region rplUntilEnd matchgroup=rplConditional start="\(^\|\s\+\)until\ze\($\|\s\+\)" end="\(^\|\s\+\)\zsend\ze\($\|\s\+\)" contains=ALLBUT,rplUntilEnd contained containedin=rplDoUntil extend keepend
|
|
344 syntax region rplDoUntil matchgroup=rplConditional start="\(^\|\s\+\)do\ze\($\|\s\+\)" end="\(^\|\s\+\)until\ze\($\|\s\+\)" contains=ALL keepend extend
|
|
345
|
|
346 " WHILE/REPEAT/END
|
|
347 syntax region rplRepeatEnd matchgroup=rplConditional start="\(^\|\s\+\)repeat\ze\($\|\s\+\)" end="\(^\|\s\+\)\zsend\ze\($\|\s\+\)" contains=ALLBUT,rplRepeatEnd contained containedin=rplWhileRepeat extend keepend
|
|
348 syntax region rplWhileRepeat matchgroup=rplConditional start="\(^\|\s\+\)while\ze\($\|\s\+\)" end="\(^\|\s\+\)repeat\ze\($\|\s\+\)" contains=ALL keepend extend
|
|
349
|
|
350 " Comments
|
|
351 syntax match rplCommentError "\*/"
|
|
352 syntax region rplCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1
|
|
353 syntax region rplCommentLine start="\(^\|\s\+\)//\ze" skip="\\$" end="$" contains=NONE keepend extend
|
|
354 syntax region rplComment start="\(^\|\s\+\)/\*\ze" end="\*/" contains=rplCommentString keepend extend
|
|
355
|
|
356 " Catch errors caused by too many right parentheses
|
|
357 syntax region rplParen transparent start="(" end=")" contains=ALLBUT,rplParenError,rplComplex,rplIncluded keepend extend
|
|
358 syntax match rplParenError ")"
|
|
359
|
|
360 " Subroutines
|
|
361 " Catch errors caused by too many right '>>'
|
|
362 syntax match rplSubError "\(^\|\s\+\)>>\ze\($\|\s\+\)"hs=e-1
|
|
363 syntax region rplSub matchgroup=rplSubDelimitor start="\(^\|\s\+\)<<\ze\($\|\s\+\)" end="\(^\|\s\+\)>>\ze\($\|\s\+\)" contains=ALLBUT,rplSubError,rplIncluded,rplDefaultEnd,rplStorageSub keepend extend
|
|
364
|
|
365 " Expressions
|
|
366 syntax region rplExpr start="\(^\|\s\+\)'" end="'\ze\($\|\s\+\)" contains=rplParen,rplParenError
|
|
367
|
|
368 " Local variables
|
|
369 syntax match rplStorageError "\(^\|\s\+\)->\ze\($\|\s\+\)"hs=e-1
|
|
370 syntax region rplStorageSub matchgroup=rplStorage start="\(^\|\s\+\)<<\ze\($\|\s\+\)" end="\(^\|\s\+\)>>\ze\($\|\s\+\)" contains=ALLBUT,rplSubError,rplIncluded,rplDefaultEnd,rplStorageExpr contained containedin=rplLocalStorage keepend extend
|
|
371 syntax region rplStorageExpr matchgroup=rplStorage start="\(^\|\s\+\)'" end="'\ze\($\|\s\+\)" contains=rplParen,rplParenError extend contained containedin=rplLocalStorage
|
|
372 syntax region rplLocalStorage matchgroup=rplStorage start="\(^\|\s\+\)->\ze\($\|\s\+\)" end="\(^\|\s\+\)\(<<\ze\($\|\s\+\)\|'\)" contains=rplStorageSub,rplStorageExpr,rplComment,rplCommentLine keepend extend
|
|
373
|
|
374 " Catch errors caused by too many right brackets
|
|
375 syntax match rplArrayError "\]"
|
|
376 syntax match rplArray "\]" contained containedin=rplArray
|
|
377 syntax region rplArray matchgroup=rplArray start="\[" end="\]" contains=ALLBUT,rplArrayError keepend extend
|
|
378
|
|
379 " Catch errors caused by too many right '}'
|
|
380 syntax match rplListError "}"
|
|
381 syntax match rplList "}" contained containedin=rplList
|
|
382 syntax region rplList matchgroup=rplList start="{" end="}" contains=ALLBUT,rplListError,rplIncluded keepend extend
|
|
383
|
|
384 " cpp is used by RPL/2
|
|
385 syntax match rplPreProc "\_^#\s*\(define\|undef\)\>"
|
|
386 syntax match rplPreProc "\_^#\s*\(warning\|error\)\>"
|
|
387 syntax match rplPreCondit "\_^#\s*\(if\|ifdef\|ifndef\|elif\|else\|endif\)\>"
|
|
388 syntax match rplIncluded contained "\<<\s*\S*\s*>\>"
|
|
389 syntax match rplInclude "\_^#\s*include\>\s*["<]" contains=rplIncluded,rplString
|
|
390 "syntax match rplExecPath "\%^\_^#!\s*\S*"
|
|
391 syntax match rplExecPath "\%^\_^#!\p*\_$"
|
|
392
|
|
393 " Any integer
|
|
394 syntax match rplInteger "\(^\|\s\+\)[-+]\=\d\+\ze\($\|\s\+\)"
|
|
395
|
|
396 " Floating point number
|
|
397 " [S][ip].[fp]
|
|
398 syntax match rplFloat "\(^\|\s\+\)[-+]\=\(\d*\)\=[\.,]\(\d*\)\=\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign
|
|
399 " [S]ip[.fp]E[S]exp
|
|
400 syntax match rplFloat "\(^\|\s\+\)[-+]\=\d\+\([\.,]\d*\)\=[eE]\([-+]\)\=\d\+\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign
|
|
401 " [S].fpE[S]exp
|
|
402 syntax match rplFloat "\(^\|\s\+\)[-+]\=\(\d*\)\=[\.,]\d\+[eE]\([-+]\)\=\d\+\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign
|
|
403 syntax match rplPoint "\<[\.,]\>"
|
|
404 syntax match rplSign "\<[+-]\>"
|
|
405
|
|
406 " Complex number
|
|
407 " (x,y)
|
|
408 syntax match rplComplex "\(^\|\s\+\)([-+]\=\(\d*\)\=\.\=\d*\([eE][-+]\=\d\+\)\=\s*,\s*[-+]\=\(\d*\)\=\.\=\d*\([eE][-+]\=\d\+\)\=)\ze\($\|\s\+\)"
|
|
409 " (x.y)
|
|
410 syntax match rplComplex "\(^\|\s\+\)([-+]\=\(\d*\)\=,\=\d*\([eE][-+]\=\d\+\)\=\s*\.\s*[-+]\=\(\d*\)\=,\=\d*\([eE][-+]\=\d\+\)\=)\ze\($\|\s\+\)"
|
|
411
|
|
412 " Strings
|
|
413 syntax match rplStringGuilles "\\\""
|
|
414 syntax match rplStringAntislash "\\\\"
|
|
415 syntax region rplString start=+\(^\|\s\+\)"+ end=+"\ze\($\|\s\+\)+ contains=rplStringGuilles,rplStringAntislash
|
|
416
|
|
417 syntax match rplTab "\t" transparent
|
|
418
|
|
419 " Define the default highlighting.
|
|
420 " For version 5.7 and earlier: only when not done already
|
|
421 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
422 if version >= 508 || !exists("did_rpl_syntax_inits")
|
|
423 if version < 508
|
|
424 let did_rpl_syntax_inits = 1
|
|
425 command -nargs=+ HiLink highlight link <args>
|
|
426 else
|
|
427 command -nargs=+ HiLink highlight default link <args>
|
|
428 endif
|
|
429
|
|
430 " The default highlighting.
|
|
431
|
|
432 HiLink rplControl Statement
|
|
433 HiLink rplStatement Statement
|
|
434 HiLink rplAlgConditional Conditional
|
|
435 HiLink rplConditional Repeat
|
|
436 HiLink rplConditionalError Error
|
|
437 HiLink rplRepeat Repeat
|
|
438 HiLink rplCycle Repeat
|
|
439 HiLink rplUntil Repeat
|
|
440 HiLink rplIntrinsic Special
|
|
441 HiLink rplStorage StorageClass
|
|
442 HiLink rplStorageExpr StorageClass
|
|
443 HiLink rplStorageError Error
|
|
444 HiLink rplReadWrite rplIntrinsic
|
|
445
|
|
446 HiLink rplOperator Operator
|
|
447
|
|
448 HiLink rplList Special
|
|
449 HiLink rplArray Special
|
|
450 HiLink rplConstant Identifier
|
|
451 HiLink rplExpr Type
|
|
452
|
|
453 HiLink rplString String
|
|
454 HiLink rplStringGuilles String
|
|
455 HiLink rplStringAntislash String
|
|
456
|
|
457 HiLink rplBinary Boolean
|
|
458 HiLink rplOctal Boolean
|
|
459 HiLink rplDecimal Boolean
|
|
460 HiLink rplHexadecimal Boolean
|
|
461 HiLink rplInteger Number
|
|
462 HiLink rplFloat Float
|
|
463 HiLink rplComplex Float
|
|
464 HiLink rplBoolean Identifier
|
|
465
|
|
466 HiLink rplObsolete Todo
|
|
467
|
|
468 HiLink rplPreCondit PreCondit
|
|
469 HiLink rplInclude Include
|
|
470 HiLink rplIncluded rplString
|
|
471 HiLink rplInclude Include
|
|
472 HiLink rplExecPath Include
|
|
473 HiLink rplPreProc PreProc
|
|
474 HiLink rplComment Comment
|
|
475 HiLink rplCommentLine Comment
|
|
476 HiLink rplCommentString Comment
|
|
477 HiLink rplSubDelimitor rplStorage
|
|
478 HiLink rplCommentError Error
|
|
479 HiLink rplParenError Error
|
|
480 HiLink rplSubError Error
|
|
481 HiLink rplArrayError Error
|
|
482 HiLink rplListError Error
|
|
483 HiLink rplTab Error
|
|
484 HiLink rplBinaryError Error
|
|
485 HiLink rplOctalError Error
|
|
486 HiLink rplDecimalError Error
|
|
487 HiLink rplHexadecimalError Error
|
|
488
|
|
489 delcommand HiLink
|
|
490 endif
|
|
491
|
|
492 let b:current_syntax = "rpl"
|
|
493
|
3312
|
494 let &cpo = s:cpo_save
|
|
495 unlet s:cpo_save
|
7
|
496 " vim: ts=8 tw=132
|