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