2 " Language: SiCAD (procedure language)
3 " Maintainer: Zsolt Branyiczky <zbranyiczky@lmark.mgx.hu>
4 " Last Change: 2001 May 22
5 " URL: http://lmark.mgx.hu:81/download/vim/sicad.vim
7 " For version 5.x: Clear all syntax items
8 " For version 6.x: Quit when a syntax file was already loaded
11 elseif exists("b:current_syntax")
15 " use SQL highlighting after 'sql' command
17 syn include @SQL syntax/sql.vim
19 syn include @SQL <sfile>:p:h/sql.vim
21 unlet b:current_syntax
23 " spaces are used in (auto)indents since sicad hates tabulator characters
33 " most important commands - not listed by ausku
34 syn keyword sicadStatement define
35 syn keyword sicadStatement dialog
36 syn keyword sicadStatement do
37 syn keyword sicadStatement dop contained
38 syn keyword sicadStatement end
39 syn keyword sicadStatement enddo
40 syn keyword sicadStatement endp
41 syn keyword sicadStatement erroff
42 syn keyword sicadStatement erron
43 syn keyword sicadStatement exitp
44 syn keyword sicadGoto goto contained
45 syn keyword sicadStatement hh
46 syn keyword sicadStatement if
47 syn keyword sicadStatement in
48 syn keyword sicadStatement msgsup
49 syn keyword sicadStatement out
50 syn keyword sicadStatement padd
51 syn keyword sicadStatement parbeg
52 syn keyword sicadStatement parend
53 syn keyword sicadStatement pdoc
54 syn keyword sicadStatement pprot
55 syn keyword sicadStatement procd
56 syn keyword sicadStatement procn
57 syn keyword sicadStatement psav
58 syn keyword sicadStatement psel
59 syn keyword sicadStatement psymb
60 syn keyword sicadStatement ptrace
61 syn keyword sicadStatement ptstat
62 syn keyword sicadStatement set
63 syn keyword sicadStatement sql contained
64 syn keyword sicadStatement step
65 syn keyword sicadStatement sys
66 syn keyword sicadStatement ww
69 syn match sicadStatement "\<atan("me=e-1
70 syn match sicadStatement "\<atan2("me=e-1
71 syn match sicadStatement "\<cos("me=e-1
72 syn match sicadStatement "\<dist("me=e-1
73 syn match sicadStatement "\<exp("me=e-1
74 syn match sicadStatement "\<log("me=e-1
75 syn match sicadStatement "\<log10("me=e-1
76 syn match sicadStatement "\<sin("me=e-1
77 syn match sicadStatement "\<sqrt("me=e-1
78 syn match sicadStatement "\<tanh("me=e-1
79 syn match sicadStatement "\<x("me=e-1
80 syn match sicadStatement "\<y("me=e-1
81 syn match sicadStatement "\<v("me=e-1
82 syn match sicadStatement "\<x%g\=p[0-9]\{1,2}\>"me=s+1
83 syn match sicadStatement "\<y%g\=p[0-9]\{1,2}\>"me=s+1
86 syn match sicadOperator "\.and\."
87 syn match sicadOperator "\.ne\."
88 syn match sicadOperator "\.not\."
89 syn match sicadOperator "\.eq\."
90 syn match sicadOperator "\.ge\."
91 syn match sicadOperator "\.gt\."
92 syn match sicadOperator "\.le\."
93 syn match sicadOperator "\.lt\."
94 syn match sicadOperator "\.or\."
95 syn match sicadOperator "\.eqv\."
96 syn match sicadOperator "\.neqv\."
99 syn match sicadIdentifier "%g\=[irpt][0-9]\{1,2}\>"
100 syn match sicadIdentifier "%g\=l[0-9]\>"
101 syn match sicadIdentifier "%g\=[irptl]("me=e-1
102 syn match sicadIdentifier "%error\>"
103 syn match sicadIdentifier "%nsel\>"
104 syn match sicadIdentifier "%nvar\>"
105 syn match sicadIdentifier "%scl\>"
106 syn match sicadIdentifier "%wd\>"
107 syn match sicadIdentifier "\$[irt][0-9]\{1,2}\>" contained
110 syn match sicadLabel1 "^ *\.[a-z][a-z0-9]\{0,7} \+[^ ]"me=e-1
111 syn match sicadLabel1 "^ *\.[a-z][a-z0-9]\{0,7}\*"me=e-1
112 syn match sicadLabel2 "\<goto \.\=[a-z][a-z0-9]\{0,7}\>" contains=sicadGoto
113 syn match sicadLabel2 "\<goto\.[a-z][a-z0-9]\{0,7}\>" contains=sicadGoto
116 syn match sicadBoolean "\.[ft]\."
117 " integer without sign
118 syn match sicadNumber "\<[0-9]\+\>"
119 " floating point number, with dot, optional exponent
120 syn match sicadFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\>"
121 " floating point number, starting with a dot, optional exponent
122 syn match sicadFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>"
123 " floating point number, without dot, with exponent
124 syn match sicadFloat "\<[0-9]\+e[-+]\=[0-9]\+\>"
126 " without this extraString definition a ' ; ' could stop the comment
127 syn region sicadString_ transparent start=+'+ end=+'+ oneline contained
129 syn region sicadString start=+'+ end=+'+ oneline
131 " comments - nasty ones in sicad
133 " - ' * blabla' or ' * blabla;'
134 syn region sicadComment start="^ *\*" skip='\\ *$' end=";"me=e-1 end="$" contains=sicadString_
135 " - ' .LABEL03 * blabla' or ' .LABEL03 * blabla;'
136 syn region sicadComment start="^ *\.[a-z][a-z0-9]\{0,7} *\*" skip='\\ *$' end=";"me=e-1 end="$" contains=sicadLabel1,sicadString_
137 " - '; * blabla' or '; * blabla;'
138 syn region sicadComment start="; *\*"ms=s+1 skip='\\ *$' end=";"me=e-1 end="$" contains=sicadString_
139 " - comments between docbeg and docend
140 syn region sicadComment matchgroup=sicadStatement start="\<docbeg\>" end="\<docend\>"
142 " catch \ at the end of line
143 syn match sicadLineCont "\\ *$"
145 " parameters in dop block - for the time being it is not used
146 "syn match sicadParameter " [a-z][a-z0-9]*[=:]"me=e-1 contained
147 " dop block - for the time being it is not used
148 syn region sicadDopBlock transparent matchgroup=sicadStatement start='\<dop\>' skip='\\ *$' end=';'me=e-1 end='$' contains=ALL
150 " sql block - new highlighting mode is used (see syn include)
151 syn region sicadSqlBlock transparent matchgroup=sicadStatement start='\<sql\>' skip='\\ *$' end=';'me=e-1 end='$' contains=@SQL,sicadIdentifier,sicadLineCont
154 syn sync clear " clear sync used in sql.vim
155 syn sync match sicadSyncComment groupthere NONE "\<docend\>"
156 syn sync match sicadSyncComment grouphere sicadComment "\<docbeg\>"
157 " next line must be examined too
158 syn sync linecont "\\ *$"
160 " catch error caused by tabulator key
161 syn match sicadError "\t"
162 " catch errors caused by wrong parenthesis
163 "syn region sicadParen transparent start='(' end=')' contains=ALLBUT,sicadParenError
164 syn region sicadParen transparent start='(' skip='\\ *$' end=')' end='$' contains=ALLBUT,sicadParenError
165 syn match sicadParenError ')'
166 "syn region sicadApostrophe transparent start=+'+ end=+'+ contains=ALLBUT,sicadApostropheError
167 "syn match sicadApostropheError +'+
168 " not closed apostrophe
169 "syn region sicadError start=+'+ end=+$+ contains=ALLBUT,sicadApostropheError
170 "syn match sicadApostropheError +'[^']*$+me=s+1 contained
173 syn keyword sicadStatement abst add addsim adrin aib
174 syn keyword sicadStatement aibzsn aidump aifgeo aisbrk alknam
175 syn keyword sicadStatement alknr alksav alksel alktrc alopen
176 syn keyword sicadStatement ansbo aractiv ararea arareao ararsfs
177 syn keyword sicadStatement arbuffer archeck arcomv arcont arconv
178 syn keyword sicadStatement arcopy arcopyo arcorr arcreate arerror
179 syn keyword sicadStatement areval arflfm arflop arfrast argbkey
180 syn keyword sicadStatement argenf argraph argrapho arinters arkompfl
181 syn keyword sicadStatement arlasso arlcopy arlgraph arline arlining
182 syn keyword sicadStatement arlisly armakea armemo arnext aroverl
183 syn keyword sicadStatement arovers arparkmd arpars arrefp arselect
184 syn keyword sicadStatement arset arstruct arunify arupdate arvector
185 syn keyword sicadStatement arveinfl arvflfl arvoroni ausku basis
186 syn keyword sicadStatement basisaus basisdar basisnr bebos befl
187 syn keyword sicadStatement befla befli befls beo beorta
188 syn keyword sicadStatement beortn bep bepan bepap bepola
189 syn keyword sicadStatement bepoln bepsn bepsp ber berili
190 syn keyword sicadStatement berk bewz bkl bli bma
191 syn keyword sicadStatement bmakt bmakts bmbm bmerk bmerw
192 syn keyword sicadStatement bmerws bminit bmk bmorth bmos
193 syn keyword sicadStatement bmoss bmpar bmsl bmsum bmsums
194 syn keyword sicadStatement bmver bmvero bmw bo bta
195 syn keyword sicadStatement buffer bvl bw bza bzap
196 syn keyword sicadStatement bzd bzgera bzorth cat catel
197 syn keyword sicadStatement cdbdiff ce cgmparam close closesim
198 syn keyword sicadStatement comgener comp comp conclose conclose coninfo
199 syn keyword sicadStatement conopen conread contour conwrite cop
200 syn keyword sicadStatement copar coparp coparp2 copel cr
201 syn keyword sicadStatement cs cstat cursor d da
202 syn keyword sicadStatement dal dasp dasps dataout dcol
203 syn keyword sicadStatement dd defsr del delel deskrdef
204 syn keyword sicadStatement df dfn dfns dfpos dfr
205 syn keyword sicadStatement dgd dgm dgp dgr dh
206 syn keyword sicadStatement diag diaus dir disbsd dkl
207 syn keyword sicadStatement dktx dkur dlgfix dlgfre dma
208 syn keyword sicadStatement dprio dr druse dsel dskinfo
209 syn keyword sicadStatement dsr dv dve eba ebd
210 syn keyword sicadStatement ebdmod ebs edbsdbin edbssnin edbsvtin
211 syn keyword sicadStatement edt egaus egdef egdefs eglist
212 syn keyword sicadStatement egloe egloenp egloes egxx eib
213 syn keyword sicadStatement ekur ekuradd elel elpos epg
214 syn keyword sicadStatement esau esauadd esek eta etap
215 syn keyword sicadStatement etav feparam ficonv filse fl
216 syn keyword sicadStatement fli flin flini flinit flins
217 syn keyword sicadStatement flkor fln flnli flop flout
218 syn keyword sicadStatement flowert flparam flraster flsy flsyd
219 syn keyword sicadStatement flsym flsyms flsymt fmtatt fmtdia
220 syn keyword sicadStatement fmtlib fpg gbadddb gbaim gbanrs
221 syn keyword sicadStatement gbatw gbau gbaudit gbclosp gbcredic
222 syn keyword sicadStatement gbcreem gbcreld gbcresdb gbcretd gbde
223 syn keyword sicadStatement gbdeldb gbdeldic gbdelem gbdelld gbdelref
224 syn keyword sicadStatement gbdeltd gbdisdb gbdisem gbdisld gbdistd
225 syn keyword sicadStatement gbebn gbemau gbepsv gbgetdet gbgetes
226 syn keyword sicadStatement gbgetmas gbgqel gbgqelr gbgqsa gbgrant
227 syn keyword sicadStatement gbimpdic gbler gblerb gblerf gbles
228 syn keyword sicadStatement gblocdic gbmgmg gbmntdb gbmoddb gbnam
229 syn keyword sicadStatement gbneu gbopenp gbpoly gbpos gbpruef
230 syn keyword sicadStatement gbpruefg gbps gbqgel gbqgsa gbrefdic
231 syn keyword sicadStatement gbreftab gbreldic gbresem gbrevoke gbsav
232 syn keyword sicadStatement gbsbef gbsddk gbsicu gbsrt gbss
233 syn keyword sicadStatement gbstat gbsysp gbszau gbubp gbueb
234 syn keyword sicadStatement gbunmdb gbuseem gbw gbweg gbwieh
235 syn keyword sicadStatement gbzt gelp gera getvar hgw
236 syn keyword sicadStatement hpg hr0 hra hrar icclchan
237 syn keyword sicadStatement iccrecon icdescon icfree icgetcon icgtresp
238 syn keyword sicadStatement icopchan icputcon icreacon icreqd icreqnw
239 syn keyword sicadStatement icreqw icrespd icresrve icwricon imsget
240 syn keyword sicadStatement imsgqel imsmget imsplot imsprint inchk
241 syn keyword sicadStatement inf infd inst kbml kbmls
242 syn keyword sicadStatement kbmm kbmms kbmt kbmtdps kbmts
243 syn keyword sicadStatement khboe khbol khdob khe khetap
244 syn keyword sicadStatement khfrw khktk khlang khld khmfrp
245 syn keyword sicadStatement khmks khms khpd khpfeil khpl
246 syn keyword sicadStatement khprofil khrand khsa khsabs khsaph
247 syn keyword sicadStatement khsd khsdl khse khskbz khsna
248 syn keyword sicadStatement khsnum khsob khspos khsvph khtrn
249 syn keyword sicadStatement khver khzpe khzpl kib kldat
250 syn keyword sicadStatement klleg klsch klsym klvert kmpg
251 syn keyword sicadStatement kmtlage kmtp kmtps kodef kodefp
252 syn keyword sicadStatement kodefs kok kokp kolae kom
253 syn keyword sicadStatement kontly kopar koparp kopg kosy
254 syn keyword sicadStatement kp kr krsek krtclose krtopen
255 syn keyword sicadStatement ktk lad lae laesel language
256 syn keyword sicadStatement lasso lbdes lcs ldesk ldesks
257 syn keyword sicadStatement le leak leattdes leba lebas
258 syn keyword sicadStatement lebaznp lebd lebm lebv lebvaus
259 syn keyword sicadStatement lebvlist lede ledel ledepo ledepol
260 syn keyword sicadStatement ledepos leder ledist ledm lee
261 syn keyword sicadStatement leeins lees lege lekr lekrend
262 syn keyword sicadStatement lekwa lekwas lel lelh lell
263 syn keyword sicadStatement lelp lem lena lend lenm
264 syn keyword sicadStatement lep lepe lepee lepko lepl
265 syn keyword sicadStatement lepmko lepmkop lepos leposm leqs
266 syn keyword sicadStatement leqsl leqssp leqsv leqsvov les
267 syn keyword sicadStatement lesch lesr less lestd let
268 syn keyword sicadStatement letaum letl lev levm levtm
269 syn keyword sicadStatement levtp levtr lew lewm lexx
270 syn keyword sicadStatement lfs li lining lldes lmode
271 syn keyword sicadStatement loedk loepkt lop lose loses
272 syn keyword sicadStatement lp lppg lppruef lr ls
273 syn keyword sicadStatement lsop lsta lstat ly lyaus
274 syn keyword sicadStatement lz lza lzae lzbz lze
275 syn keyword sicadStatement lznr lzo lzpos ma ma0
276 syn keyword sicadStatement ma1 mad map mapoly mcarp
277 syn keyword sicadStatement mccfr mccgr mcclr mccrf mcdf
278 syn keyword sicadStatement mcdma mcdr mcdrp mcdve mcebd
279 syn keyword sicadStatement mcgse mcinfo mcldrp md me
280 syn keyword sicadStatement mefd mefds minmax mipg ml
281 syn keyword sicadStatement mmcmdme mmdbf mmdellb mmdir mmdome
282 syn keyword sicadStatement mmfsb mminfolb mmlapp mmlbf mmlistlb
283 syn keyword sicadStatement mmloadcm mmmsg mmreadlb mmsetlb mmshowcm
284 syn keyword sicadStatement mmstatme mnp mpo mr mra
285 syn keyword sicadStatement ms msav msgout msgsnd msp
286 syn keyword sicadStatement mspf mtd nasel ncomp new
287 syn keyword sicadStatement nlist nlistlt nlistly nlistnp nlistpo
288 syn keyword sicadStatement np npa npdes npe npem
289 syn keyword sicadStatement npinfa npruef npsat npss npssa
290 syn keyword sicadStatement ntz oa oan odel odf
291 syn keyword sicadStatement odfx oj oja ojaddsk ojaed
292 syn keyword sicadStatement ojaeds ojaef ojaefs ojaen ojak
293 syn keyword sicadStatement ojaks ojakt ojakz ojalm ojatkis
294 syn keyword sicadStatement ojatt ojatw ojbsel ojcasel ojckon
295 syn keyword sicadStatement ojde ojdtl ojeb ojebd ojel
296 syn keyword sicadStatement ojelpas ojesb ojesbd ojex ojezge
297 syn keyword sicadStatement ojko ojlb ojloe ojlsb ojmerk
298 syn keyword sicadStatement ojmos ojnam ojpda ojpoly ojprae
299 syn keyword sicadStatement ojs ojsak ojsort ojstrukt ojsub
300 syn keyword sicadStatement ojtdef ojvek ojx old oldd
301 syn keyword sicadStatement op opa opa1 open opensim
302 syn keyword sicadStatement opnbsd orth osanz ot otp
303 syn keyword sicadStatement otrefp param paranf pas passw
304 syn keyword sicadStatement pcatchf pda pdadd pg pg0
305 syn keyword sicadStatement pgauf pgaufsel pgb pgko pgm
306 syn keyword sicadStatement pgr pgvs pily pkpg plot
307 syn keyword sicadStatement plotf plotfr pmap pmdata pmdi
308 syn keyword sicadStatement pmdp pmeb pmep pminfo pmlb
309 syn keyword sicadStatement pmli pmlp pmmod pnrver poa
310 syn keyword sicadStatement pos posa posaus post printfr
311 syn keyword sicadStatement protect prs prssy prsym ps
312 syn keyword sicadStatement psadd psclose psopen psparam psprw
313 syn keyword sicadStatement psres psstat psw pswr qualif
314 syn keyword sicadStatement rahmen raster rasterd rbbackup rbchang2
315 syn keyword sicadStatement rbchange rbcmd rbcoldst rbcolor rbcopy
316 syn keyword sicadStatement rbcut rbcut2 rbdbcl rbdbload rbdbop
317 syn keyword sicadStatement rbdbwin rbdefs rbedit rbfdel rbfill
318 syn keyword sicadStatement rbfill2 rbfload rbfload2 rbfnew rbfnew2
319 syn keyword sicadStatement rbfpar rbfree rbg rbgetcol rbgetdst
320 syn keyword sicadStatement rbinfo rbpaste rbpixel rbrstore rbsnap
321 syn keyword sicadStatement rbsta rbtile rbtrpix rbvtor rcol
322 syn keyword sicadStatement rd rdchange re reb rebmod
323 syn keyword sicadStatement refunc ren renel rk rkpos
324 syn keyword sicadStatement rohr rohrpos rpr rr rr0
325 syn keyword sicadStatement rra rrar rs samtosdb sav
326 syn keyword sicadStatement savd savesim savx scol scopy
327 syn keyword sicadStatement scopye sdbtosam sddk sdwr se
328 syn keyword sicadStatement selaus selpos seman semi sesch
329 syn keyword sicadStatement setscl setvar sfclntpf sfconn sffetchf
330 syn keyword sicadStatement sffpropi sfftypi sfqugeoc sfquwhcl sfself
331 syn keyword sicadStatement sfstat sftest sge sid sie
332 syn keyword sicadStatement sig sigp skk skks sn
333 syn keyword sicadStatement sn21 snpa snpar snparp snparps
334 syn keyword sicadStatement snpars snpas snpd snpi snpkor
335 syn keyword sicadStatement snpl snpm sob sob0 sobloe
336 syn keyword sicadStatement sobs sof sop split spr
337 syn keyword sicadStatement sqdadd sqdlad sqdold sqdsav
338 syn keyword sicadStatement sr sres srt sset stat
339 syn keyword sicadStatement stdtxt string strukt strupru suinfl
340 syn keyword sicadStatement suinflk suinfls supo supo1 sva
341 syn keyword sicadStatement svr sy sya syly sysout
342 syn keyword sicadStatement syu syux taa tabeg tabl
343 syn keyword sicadStatement tabm tam tanr tapg tapos
344 syn keyword sicadStatement tarkd tas tase tb tbadd
345 syn keyword sicadStatement tbd tbext tbget tbint tbout
346 syn keyword sicadStatement tbput tbsat tbsel tbstr tcaux
347 syn keyword sicadStatement tccable tcchkrep tccomm tccond tcdbg
348 syn keyword sicadStatement tcgbnr tcgrpos tcinit tclconv tcmodel
349 syn keyword sicadStatement tcnwe tcpairs tcpath tcrect tcrmdli
350 syn keyword sicadStatement tcscheme tcschmap tcse tcselc tcstar
351 syn keyword sicadStatement tcstrman tcsubnet tcsymbol tctable tcthrcab
352 syn keyword sicadStatement tctrans tctst tdb tdbdel tdbget
353 syn keyword sicadStatement tdblist tdbput tgmod titel tmoff
354 syn keyword sicadStatement tmon tp tpa tps tpta
355 syn keyword sicadStatement tra trans transkdo transopt transpro
356 syn keyword sicadStatement triangle trm trpg trrkd trs
357 syn keyword sicadStatement ts tsa tx txa txchk
358 syn keyword sicadStatement txcng txju txl txp txpv
359 syn keyword sicadStatement txtcmp txv txz uckon uiinfo
360 syn keyword sicadStatement uistatus umdk umdk1 umdka umge
361 syn keyword sicadStatement umges umr verbo verflli verif
362 syn keyword sicadStatement verly versinfo vfg vpactive vpcenter
363 syn keyword sicadStatement vpcreate vpdelete vpinfo vpmodify vpscroll
364 syn keyword sicadStatement vpsta wabsym wzmerk zdrhf zdrhfn
365 syn keyword sicadStatement zdrhfw zdrhfwn zefp zfl zflaus
366 syn keyword sicadStatement zka zlel zlels zortf zortfn
367 syn keyword sicadStatement zortfw zortfwn zortp zortpn zparb
368 syn keyword sicadStatement zparbn zparf zparfn zparfw zparfwn
369 syn keyword sicadStatement zparp zparpn zwinkp zwinkpn
371 " Define the default highlighting.
372 " For version 5.7 and earlier: only when not done already
373 " For version 5.8 and later: only when an item doesn't have highlighting yet
374 if version >= 508 || !exists("did_sicad_syntax_inits")
377 let did_sicad_syntax_inits = 1
378 command -nargs=+ HiLink hi link <args>
380 command -nargs=+ HiLink hi def link <args>
383 HiLink sicadLabel PreProc
384 HiLink sicadLabel1 sicadLabel
385 HiLink sicadLabel2 sicadLabel
386 HiLink sicadConditional Conditional
387 HiLink sicadBoolean Boolean
388 HiLink sicadNumber Number
389 HiLink sicadFloat Float
390 HiLink sicadOperator Operator
391 HiLink sicadStatement Statement
392 HiLink sicadParameter sicadStatement
393 HiLink sicadGoto sicadStatement
394 HiLink sicadLineCont sicadStatement
395 HiLink sicadString String
396 HiLink sicadComment Comment
397 HiLink sicadSpecial Special
398 HiLink sicadIdentifier Type
399 " HiLink sicadIdentifier Identifier
400 HiLink sicadError Error
401 HiLink sicadParenError sicadError
402 HiLink sicadApostropheError sicadError
403 HiLink sicadStringError sicadError
404 HiLink sicadCommentError sicadError
405 " HiLink sqlStatement Special " modified highlight group in sql.vim
411 let b:current_syntax = "sicad"