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