blob: 3c6f41ba826dc0ab92b9b1b63b3b6d06adb17d04 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
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
6
7" For version 5.x: Clear all syntax items
8" For version 6.x: Quit when a syntax file was already loaded
9if version < 600
10 syntax clear
11elseif exists("b:current_syntax")
12 finish
13endif
14
15if version >= 600
16 setlocal iskeyword=@,48-57,_,-,
17else
18 set iskeyword=@,48-57,_,-,
19endif
20
21syn case ignore
22
23syn sync lines=300
24
25"If/else/elsif/endif and while/wend mismatch errors
26syn match clifError "\<wend\>"
27syn match clifError "\<elsif\>"
28syn match clifError "\<else\>"
29syn match clifError "\<endif\>"
30
31" If and while regions
32syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
33syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure
34
35" Make those TODO notes and debugging stand out!
36syn keyword clTodo contained TODO BUG DEBUG FIX
37syn keyword clDebug contained debug
38
39syn match clComment "#.*$" contains=clTodo,clNeedsWork
40syn region clProcedure oneline start="^\s*[{}]" end="$"
41syn match clInclude "^\s*include\s.*"
42
43" We don't put "debug" in the clSetOptions;
44" we contain it in clSet so we can make it stand out.
45syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
46syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug
47
48syn match clPreProc "^\s*#P.*"
49
50syn keyword clConditional else elsif
51syn keyword clWhile continue endloop
52" 'break' needs to be a region so we can sync on it above.
53syn region clBreak oneline start="^\s*break" end="$"
54
55syn match clOperator "[!;|)(:.><+*=-]"
56
57syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
58
59syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+
60syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+
61
62syn 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
63
64syn 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
65
66syn 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
67
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
71if version >= 508 || !exists("did_cl_syntax_inits")
72 if version < 508
73 let did_cl_syntax_inits = 1
74 command -nargs=+ HiLink hi link <args>
75 else
76 command -nargs=+ HiLink hi def link <args>
77 endif
78
79 HiLink clifError Error
80 HiLink clWhile Repeat
81 HiLink clConditional Conditional
82 HiLink clDebug Debug
83 HiLink clNeedsWork Todo
84 HiLink clTodo 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
99
100 delcommand HiLink
101endif
102
103let b:current_syntax = "cl"
104
105" vim: ts=4 sw=4