2 " Language: cl ("Clever Language" by Multibase, http://www.mbase.com.au)
3 " Filename extensions: *.ent, *.eni
4 " Maintainer: Philip Uren <philu@system77.com>
5 " Last update: Wed May 2 10:30:30 EST 2001
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")
16 setlocal iskeyword=@,48-57,_,-,
18 set iskeyword=@,48-57,_,-,
25 "If/else/elsif/endif and while/wend mismatch errors
26 syn match clifError "\<wend\>"
27 syn match clifError "\<elsif\>"
28 syn match clifError "\<else\>"
29 syn match clifError "\<endif\>"
31 " If and while regions
32 syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
33 syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure
35 " Make those TODO notes and debugging stand out!
36 syn keyword clTodo contained TODO BUG DEBUG FIX
37 syn keyword clDebug contained debug
39 syn match clComment "#.*$" contains=clTodo,clNeedsWork
40 syn region clProcedure oneline start="^\s*[{}]" end="$"
41 syn match clInclude "^\s*include\s.*"
43 " We don't put "debug" in the clSetOptions;
44 " we contain it in clSet so we can make it stand out.
45 syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
46 syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug
48 syn match clPreProc "^\s*#P.*"
50 syn keyword clConditional else elsif
51 syn keyword clWhile continue endloop
52 " 'break' needs to be a region so we can sync on it above.
53 syn region clBreak oneline start="^\s*break" end="$"
55 syn match clOperator "[!;|)(:.><+*=-]"
57 syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
59 syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+
60 syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+
62 syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
64 syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
66 syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
68 " Define the default highlighting.
69 " For version 5.7 and earlier: only when not done already
70 " For version 5.8 and later: only when an item doesn't have highlighting yet
71 if version >= 508 || !exists("did_cl_syntax_inits")
73 let did_cl_syntax_inits = 1
74 command -nargs=+ HiLink hi link <args>
76 command -nargs=+ HiLink hi def link <args>
79 HiLink clifError Error
81 HiLink clConditional Conditional
83 HiLink clNeedsWork Todo
85 HiLink clComment Comment
86 HiLink clProcedure Procedure
87 HiLink clBreak Procedure
88 HiLink clInclude Include
89 HiLink clSetOption Statement
90 HiLink clSet Identifier
91 HiLink clPreProc PreProc
92 HiLink clOperator Operator
93 HiLink clNumber Number
94 HiLink clString String
95 HiLink clQuote Delimiter
96 HiLink clReserved Identifier
97 HiLink clFunction Function
98 HiLink clStatement Statement
103 let b:current_syntax = "cl"