7
|
1 " Vim syntax file
|
4186
|
2 " Language: CL
|
|
3 " (pronounced alphabetically: "Cee-El".
|
|
4 " CL stands for Clever Language,
|
|
5 " but the language is CL, not "Clever".
|
|
6 " CL was created by Multibase, http://www.mbase.com.au)
|
3513
|
7 " Filename extensions: *.ent
|
4186
|
8 " *.eni
|
3513
|
9 " Maintainer: Philip Uren <philuSPAX@ieee.org> Remove SPAX spam block
|
4186
|
10 " Version: 6
|
|
11 " Last Change: Mar 06 2013
|
7
|
12
|
|
13 " For version 5.x: Clear all syntax items
|
|
14 " For version 6.x: Quit when a syntax file was already loaded
|
|
15 if version < 600
|
3830
|
16 syntax clear
|
7
|
17 elseif exists("b:current_syntax")
|
3830
|
18 finish
|
7
|
19 endif
|
|
20
|
|
21 if version >= 600
|
4098
|
22 setlocal iskeyword=@,48-57,_,-
|
7
|
23 else
|
4098
|
24 set iskeyword=@,48-57,_,-
|
7
|
25 endif
|
|
26
|
|
27 syn case ignore
|
|
28
|
|
29 syn sync lines=300
|
|
30
|
|
31 "If/else/elsif/endif and while/wend mismatch errors
|
3830
|
32 syn match clifError "\<wend\>"
|
|
33 syn match clifError "\<elsif\>"
|
|
34 syn match clifError "\<else\>"
|
|
35 syn match clifError "\<endif\>"
|
7
|
36
|
3830
|
37 syn match clSpaceError "\s\+$"
|
826
|
38
|
7
|
39 " If and while regions
|
3830
|
40 syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
|
|
41 syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure
|
7
|
42
|
|
43 " Make those TODO notes and debugging stand out!
|
3830
|
44 syn keyword clTodo contained TODO BUG DEBUG FIX
|
|
45 syn match clNeedsWork contained "NEED[S]*\s\s*WORK"
|
|
46 syn keyword clDebug contained debug
|
7
|
47
|
3830
|
48 syn match clComment "#.*$" contains=clTodo,clNeedsWork,@Spell
|
|
49 syn region clProcedure oneline start="^\s*[{}]" end="$"
|
|
50 syn match clInclude "^\s*include\s.*"
|
7
|
51
|
|
52 " We don't put "debug" in the clSetOptions;
|
|
53 " we contain it in clSet so we can make it stand out.
|
3830
|
54 syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
|
|
55 syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug
|
7
|
56
|
3830
|
57 syn match clPreProc "^\s*#P.*"
|
7
|
58
|
3830
|
59 syn keyword clConditional else elsif
|
|
60 syn keyword clWhile continue endloop
|
7
|
61 " 'break' needs to be a region so we can sync on it above.
|
3830
|
62 syn region clBreak oneline start="^\s*break" end="$"
|
7
|
63
|
3830
|
64 syn match clOperator "[!;|)(:.><+*=-]"
|
7
|
65
|
3830
|
66 syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
|
7
|
67
|
3830
|
68 syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ contains=@Spell
|
|
69 syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ contains=@Spell
|
7
|
70
|
3830
|
71 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
|
7
|
72
|
3830
|
73 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
|
7
|
74
|
3830
|
75 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
|
7
|
76
|
|
77 " Define the default highlighting.
|
|
78 " For version 5.7 and earlier: only when not done already
|
|
79 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
3830
|
80 if version >= 508 || !exists("did_cl_syntax_inits")
|
|
81 if version < 508
|
|
82 let did_cl_syntax_inits = 1
|
|
83 command -nargs=+ HiLink hi link <args>
|
|
84 else
|
|
85 command -nargs=+ HiLink hi def link <args>
|
|
86 endif
|
7
|
87
|
3830
|
88 HiLink clifError Error
|
|
89 HiLink clSpaceError Error
|
|
90 HiLink clWhile Repeat
|
|
91 HiLink clConditional Conditional
|
|
92 HiLink clDebug Debug
|
|
93 HiLink clNeedsWork Todo
|
|
94 HiLink clTodo Todo
|
|
95 HiLink clComment Comment
|
|
96 HiLink clProcedure Procedure
|
|
97 HiLink clBreak Procedure
|
|
98 HiLink clInclude Include
|
|
99 HiLink clSetOption Statement
|
|
100 HiLink clSet Identifier
|
|
101 HiLink clPreProc PreProc
|
|
102 HiLink clOperator Operator
|
|
103 HiLink clNumber Number
|
|
104 HiLink clString String
|
|
105 HiLink clQuote Delimiter
|
|
106 HiLink clReserved Identifier
|
|
107 HiLink clFunction Function
|
|
108 HiLink clStatement Statement
|
7
|
109
|
3830
|
110 delcommand HiLink
|
7
|
111 endif
|
|
112
|
|
113 let b:current_syntax = "cl"
|
|
114
|
3830
|
115 " vim: ts=8 sw=8
|