Install vim74
[msysgit.git] / share / vim / vim74 / syntax / cl.vim
blob41c045fb090d59d7c3a935656542de2b44af52b6
1 " Vim syntax file
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)
7 " Filename extensions:  *.ent
8 "                       *.eni
9 " Maintainer:           Philip Uren     <philuSPAX@ieee.org> Remove SPAX spam block
10 " Version:              6
11 " Last Change:          Mar 06 2013
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
16         syntax clear
17 elseif exists("b:current_syntax")
18         finish
19 endif
21 if version >= 600
22         setlocal iskeyword=@,48-57,_,-
23 else
24         set iskeyword=@,48-57,_,-
25 endif
27 syn case ignore
29 syn sync lines=300
31 "If/else/elsif/endif and while/wend mismatch errors
32 syn match       clifError       "\<wend\>"
33 syn match       clifError       "\<elsif\>"
34 syn match       clifError       "\<else\>"
35 syn match       clifError       "\<endif\>"
37 syn match       clSpaceError    "\s\+$"
39 " If and while regions
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
43 " Make those TODO notes and debugging stand out!
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
48 syn match       clComment       "#.*$"          contains=clTodo,clNeedsWork,@Spell
49 syn region      clProcedure     oneline         start="^\s*[{}]" end="$"
50 syn match       clInclude       "^\s*include\s.*"
52 " We don't put "debug" in the clSetOptions;
53 " we contain it in clSet so we can make it stand out.
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
57 syn match       clPreProc       "^\s*#P.*"
59 syn keyword     clConditional   else elsif
60 syn keyword     clWhile         continue endloop
61 " 'break' needs to be a region so we can sync on it above.
62 syn region      clBreak         oneline start="^\s*break" end="$"
64 syn match       clOperator      "[!;|)(:.><+*=-]"
66 syn match       clNumber        "\<\d\+\(u\=l\=\|lu\|f\)\>"
68 syn region      clString        matchgroup=clQuote      start=+"+ end=+"+       skip=+\\"+ contains=@Spell
69 syn region      clString        matchgroup=clQuote      start=+'+ end=+'+       skip=+\\'+ contains=@Spell
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
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
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
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
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
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
110         delcommand HiLink
111 endif
113 let b:current_syntax = "cl"
115 " vim: ts=8 sw=8