Mercurial > vim
annotate runtime/syntax/chill.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 3fc0f57ecb91 |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: CHILL | |
3 " Maintainer: YoungSang Yoon <image@lgic.co.kr> | |
4 " Last change: 2004 Jan 21 | |
5 " | |
6 | |
7 " first created by image@lgic.co.kr & modified by paris@lgic.co.kr | |
8 | |
9 " CHILL (CCITT High Level Programming Language) is used for | |
10 " developing software of ATM switch at LGIC (LG Information | |
11 " & Communications LTd.) | |
12 | |
13 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
14 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
15 if exists("b:current_syntax") |
7 | 16 finish |
17 endif | |
18 | |
19 " A bunch of useful CHILL keywords | |
20 syn keyword chillStatement goto GOTO return RETURN returns RETURNS | |
21 syn keyword chillLabel CASE case ESAC esac | |
22 syn keyword chillConditional if IF else ELSE elsif ELSIF switch SWITCH THEN then FI fi | |
23 syn keyword chillLogical NOT not | |
24 syn keyword chillRepeat while WHILE for FOR do DO od OD TO to | |
25 syn keyword chillProcess START start STACKSIZE stacksize PRIORITY priority THIS this STOP stop | |
26 syn keyword chillBlock PROC proc PROCESS process | |
27 syn keyword chillSignal RECEIVE receive SEND send NONPERSISTENT nonpersistent PERSISTENT peristent SET set EVER ever | |
28 | |
29 syn keyword chillTodo contained TODO FIXME XXX | |
30 | |
31 " String and Character constants | |
32 " Highlight special characters (those which have a backslash) differently | |
33 syn match chillSpecial contained "\\x\x\+\|\\\o\{1,3\}\|\\.\|\\$" | |
34 syn region chillString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=chillSpecial | |
35 syn match chillCharacter "'[^\\]'" | |
36 syn match chillSpecialCharacter "'\\.'" | |
37 syn match chillSpecialCharacter "'\\\o\{1,3\}'" | |
38 | |
39 "when wanted, highlight trailing white space | |
40 if exists("chill_space_errors") | |
41 syn match chillSpaceError "\s*$" | |
42 syn match chillSpaceError " \+\t"me=e-1 | |
43 endif | |
44 | |
45 "catch errors caused by wrong parenthesis | |
46 syn cluster chillParenGroup contains=chillParenError,chillIncluded,chillSpecial,chillTodo,chillUserCont,chillUserLabel,chillBitField | |
47 syn region chillParen transparent start='(' end=')' contains=ALLBUT,@chillParenGroup | |
48 syn match chillParenError ")" | |
49 syn match chillInParen contained "[{}]" | |
50 | |
51 "integer number, or floating point number without a dot and with "f". | |
52 syn case ignore | |
53 syn match chillNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" | |
54 "floating point number, with dot, optional exponent | |
55 syn match chillFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" | |
56 "floating point number, starting with a dot, optional exponent | |
57 syn match chillFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" | |
58 "floating point number, without dot, with exponent | |
59 syn match chillFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" | |
60 "hex number | |
61 syn match chillNumber "\<0x\x\+\(u\=l\=\|lu\)\>" | |
62 "syn match chillIdentifier "\<[a-z_][a-z0-9_]*\>" | |
63 syn case match | |
64 " flag an octal number with wrong digits | |
65 syn match chillOctalError "\<0\o*[89]" | |
66 | |
67 if exists("chill_comment_strings") | |
68 " A comment can contain chillString, chillCharacter and chillNumber. | |
69 " But a "*/" inside a chillString in a chillComment DOES end the comment! So we | |
70 " need to use a special type of chillString: chillCommentString, which also ends on | |
71 " "*/", and sees a "*" at the start of the line as comment again. | |
72 " Unfortunately this doesn't very well work for // type of comments :-( | |
73 syntax match chillCommentSkip contained "^\s*\*\($\|\s\+\)" | |
74 syntax region chillCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=chillSpecial,chillCommentSkip | |
75 syntax region chillComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=chillSpecial | |
76 syntax region chillComment start="/\*" end="\*/" contains=chillTodo,chillCommentString,chillCharacter,chillNumber,chillFloat,chillSpaceError | |
77 syntax match chillComment "//.*" contains=chillTodo,chillComment2String,chillCharacter,chillNumber,chillSpaceError | |
78 else | |
79 syn region chillComment start="/\*" end="\*/" contains=chillTodo,chillSpaceError | |
80 syn match chillComment "//.*" contains=chillTodo,chillSpaceError | |
81 endif | |
82 syntax match chillCommentError "\*/" | |
83 | |
84 syn keyword chillOperator SIZE size | |
85 syn keyword chillType dcl DCL int INT char CHAR bool BOOL REF ref LOC loc INSTANCE instance | |
86 syn keyword chillStructure struct STRUCT enum ENUM newmode NEWMODE synmode SYNMODE | |
87 "syn keyword chillStorageClass | |
88 syn keyword chillBlock PROC proc END end | |
89 syn keyword chillScope GRANT grant SEIZE seize | |
90 syn keyword chillEDML select SELECT delete DELETE update UPDATE in IN seq SEQ WHERE where INSERT insert include INCLUDE exclude EXCLUDE | |
91 syn keyword chillBoolConst true TRUE false FALSE | |
92 | |
93 syn region chillPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=chillComment,chillString,chillCharacter,chillNumber,chillCommentError,chillSpaceError | |
94 syn region chillIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ | |
95 syn match chillIncluded contained "<[^>]*>" | |
96 syn match chillInclude "^\s*#\s*include\>\s*["<]" contains=chillIncluded | |
97 "syn match chillLineSkip "\\$" | |
98 syn cluster chillPreProcGroup contains=chillPreCondit,chillIncluded,chillInclude,chillDefine,chillInParen,chillUserLabel | |
99 syn region chillDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@chillPreProcGroup | |
100 syn region chillPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,@chillPreProcGroup | |
101 | |
102 " Highlight User Labels | |
103 syn cluster chillMultiGroup contains=chillIncluded,chillSpecial,chillTodo,chillUserCont,chillUserLabel,chillBitField | |
104 syn region chillMulti transparent start='?' end=':' contains=ALLBUT,@chillMultiGroup | |
105 " Avoid matching foo::bar() in C++ by requiring that the next char is not ':' | |
106 syn match chillUserCont "^\s*\I\i*\s*:$" contains=chillUserLabel | |
107 syn match chillUserCont ";\s*\I\i*\s*:$" contains=chillUserLabel | |
108 syn match chillUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=chillUserLabel | |
109 syn match chillUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=chillUserLabel | |
110 | |
111 syn match chillUserLabel "\I\i*" contained | |
112 | |
113 " Avoid recognizing most bitfields as labels | |
114 syn match chillBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1 | |
115 syn match chillBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 | |
116 | |
117 syn match chillBracket contained "[<>]" | |
118 if !exists("chill_minlines") | |
119 let chill_minlines = 15 | |
120 endif | |
121 exec "syn sync ccomment chillComment minlines=" . chill_minlines | |
122 | |
123 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
124 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
125 command -nargs=+ HiLink hi def link <args> |
7 | 126 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
127 HiLink chillLabel Label |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
128 HiLink chillUserLabel Label |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
129 HiLink chillConditional Conditional |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
130 " hi chillConditional term=bold ctermfg=red guifg=red gui=bold |
7 | 131 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
132 HiLink chillRepeat Repeat |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
133 HiLink chillProcess Repeat |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
134 HiLink chillSignal Repeat |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
135 HiLink chillCharacter Character |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
136 HiLink chillSpecialCharacter chillSpecial |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
137 HiLink chillNumber Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
138 HiLink chillFloat Float |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
139 HiLink chillOctalError chillError |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
140 HiLink chillParenError chillError |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
141 HiLink chillInParen chillError |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
142 HiLink chillCommentError chillError |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
143 HiLink chillSpaceError chillError |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
144 HiLink chillOperator Operator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
145 HiLink chillStructure Structure |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
146 HiLink chillBlock Operator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
147 HiLink chillScope Operator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
148 "hi chillEDML term=underline ctermfg=DarkRed guifg=Red |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
149 HiLink chillEDML PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
150 "hi chillBoolConst term=bold ctermfg=brown guifg=brown |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
151 HiLink chillBoolConst Constant |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
152 "hi chillLogical term=bold ctermfg=brown guifg=brown |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
153 HiLink chillLogical Constant |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
154 HiLink chillStorageClass StorageClass |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
155 HiLink chillInclude Include |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
156 HiLink chillPreProc PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
157 HiLink chillDefine Macro |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
158 HiLink chillIncluded chillString |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
159 HiLink chillError Error |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
160 HiLink chillStatement Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
161 HiLink chillPreCondit PreCondit |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
162 HiLink chillType Type |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
163 HiLink chillCommentError chillError |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
164 HiLink chillCommentString chillString |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
165 HiLink chillComment2String chillString |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
166 HiLink chillCommentSkip chillComment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
167 HiLink chillString String |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
168 HiLink chillComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
169 " hi chillComment term=None ctermfg=lightblue guifg=lightblue |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
170 HiLink chillSpecial SpecialChar |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
171 HiLink chillTodo Todo |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
172 HiLink chillBlock Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
173 "HiLink chillIdentifier Identifier |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
174 HiLink chillBracket Delimiter |
7 | 175 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
176 delcommand HiLink |
7 | 177 |
178 let b:current_syntax = "chill" | |
179 | |
180 " vim: ts=8 |