826
|
1 " Vim syntax file
|
|
2 " Maintainer: Nikolai Weibull <now@bitwi.se>
|
837
|
3 " Latest Revision: 2006-04-14
|
826
|
4
|
|
5 if exists("b:current_syntax")
|
|
6 finish
|
|
7 endif
|
|
8
|
|
9 let s:cpo_save = &cpo
|
|
10 set cpo&vim
|
|
11
|
|
12 if exists("g:kconfig_syntax_heavy")
|
|
13
|
|
14 syn match kconfigBegin '^' nextgroup=kconfigKeyword
|
|
15 \ skipwhite
|
|
16
|
|
17 syn keyword kconfigTodo contained TODO FIXME XXX NOTE
|
|
18
|
|
19 syn match kconfigComment display '#.*$' contains=kconfigTodo
|
|
20
|
|
21 syn keyword kconfigKeyword config nextgroup=kconfigSymbol
|
|
22 \ skipwhite
|
|
23
|
|
24 syn keyword kconfigKeyword menuconfig nextgroup=kconfigSymbol
|
|
25 \ skipwhite
|
|
26
|
|
27 syn keyword kconfigKeyword comment menu mainmenu
|
|
28 \ nextgroup=kconfigKeywordPrompt
|
|
29 \ skipwhite
|
|
30
|
|
31 syn keyword kconfigKeyword choice
|
|
32 \ nextgroup=@kconfigConfigOptions
|
|
33 \ skipwhite skipnl
|
|
34
|
|
35 syn keyword kconfigKeyword endmenu endchoice
|
|
36
|
|
37 syn keyword kconfigPreProc source
|
|
38 \ nextgroup=kconfigPath
|
|
39 \ skipwhite
|
|
40
|
|
41 " TODO: This is a hack. The who .*Expr stuff should really be generated so
|
|
42 " that we can reuse it for various nextgroups.
|
|
43 syn keyword kconfigConditional if endif
|
|
44 \ nextgroup=@kconfigConfigOptionIfExpr
|
|
45 \ skipwhite
|
|
46
|
|
47 syn match kconfigKeywordPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
48 \ contained
|
|
49 \ nextgroup=@kconfigConfigOptions
|
|
50 \ skipwhite skipnl
|
|
51
|
|
52 syn match kconfigPath '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+'
|
|
53 \ contained
|
|
54
|
|
55 syn match kconfigSymbol '\<\k\+\>'
|
|
56 \ contained
|
|
57 \ nextgroup=@kconfigConfigOptions
|
|
58 \ skipwhite skipnl
|
|
59
|
|
60 " FIXME: There is – probably – no reason to cluster these instead of just
|
|
61 " defining them in the same group.
|
|
62 syn cluster kconfigConfigOptions contains=kconfigTypeDefinition,
|
|
63 \ kconfigInputPrompt,
|
|
64 \ kconfigDefaultValue,
|
|
65 \ kconfigDependencies,
|
|
66 \ kconfigReverseDependencies,
|
|
67 \ kconfigNumericalRanges,
|
|
68 \ kconfigHelpText,
|
|
69 \ kconfigDefBool,
|
|
70 \ kconfigOptional
|
|
71
|
|
72 syn keyword kconfigTypeDefinition bool boolean tristate string hex int
|
|
73 \ contained
|
|
74 \ nextgroup=kconfigTypeDefPrompt,
|
|
75 \ @kconfigConfigOptions
|
|
76 \ skipwhite skipnl
|
|
77
|
|
78 syn match kconfigTypeDefPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
79 \ contained
|
|
80 \ nextgroup=kconfigConfigOptionIf,
|
|
81 \ @kconfigConfigOptions
|
|
82 \ skipwhite skipnl
|
|
83
|
|
84 syn match kconfigTypeDefPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
85 \ contained
|
|
86 \ nextgroup=kconfigConfigOptionIf,
|
|
87 \ @kconfigConfigOptions
|
|
88 \ skipwhite skipnl
|
|
89
|
|
90 syn keyword kconfigInputPrompt prompt
|
|
91 \ contained
|
|
92 \ nextgroup=kconfigPromptPrompt
|
|
93 \ skipwhite
|
|
94
|
|
95 syn match kconfigPromptPrompt '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
96 \ contained
|
|
97 \ nextgroup=kconfigConfigOptionIf,
|
|
98 \ @kconfigConfigOptions
|
|
99 \ skipwhite skipnl
|
|
100
|
|
101 syn match kconfigPromptPrompt "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
102 \ contained
|
|
103 \ nextgroup=kconfigConfigOptionIf,
|
|
104 \ @kconfigConfigOptions
|
|
105 \ skipwhite skipnl
|
|
106
|
|
107 syn keyword kconfigDefaultValue default
|
|
108 \ contained
|
|
109 \ nextgroup=@kconfigConfigOptionExpr
|
|
110 \ skipwhite
|
|
111
|
|
112 syn match kconfigDependencies 'depends on\|requires'
|
|
113 \ contained
|
|
114 \ nextgroup=@kconfigConfigOptionIfExpr
|
|
115 \ skipwhite
|
|
116
|
|
117 syn keyword kconfigReverseDependencies select
|
|
118 \ contained
|
|
119 \ nextgroup=@kconfigRevDepSymbol
|
|
120 \ skipwhite
|
|
121
|
|
122 syn cluster kconfigRevDepSymbol contains=kconfigRevDepCSymbol,
|
|
123 \ kconfigRevDepNCSymbol
|
|
124
|
|
125 syn match kconfigRevDepCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
126 \ contained
|
|
127 \ nextgroup=kconfigConfigOptionIf,
|
|
128 \ @kconfigConfigOptions
|
|
129 \ skipwhite skipnl
|
|
130
|
|
131 syn match kconfigRevDepCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
132 \ contained
|
|
133 \ nextgroup=kconfigConfigOptionIf,
|
|
134 \ @kconfigConfigOptions
|
|
135 \ skipwhite skipnl
|
|
136
|
|
137 syn match kconfigRevDepNCSymbol '\<\k\+\>'
|
|
138 \ contained
|
|
139 \ nextgroup=kconfigConfigOptionIf,
|
|
140 \ @kconfigConfigOptions
|
|
141 \ skipwhite skipnl
|
|
142
|
|
143 syn keyword kconfigNumericalRanges range
|
|
144 \ contained
|
|
145 \ nextgroup=@kconfigRangeSymbol
|
|
146 \ skipwhite
|
|
147
|
|
148 syn cluster kconfigRangeSymbol contains=kconfigRangeCSymbol,
|
|
149 \ kconfigRangeNCSymbol
|
|
150
|
|
151 syn match kconfigRangeCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
152 \ contained
|
|
153 \ nextgroup=@kconfigRangeSymbol2
|
|
154 \ skipwhite skipnl
|
|
155
|
|
156 syn match kconfigRangeCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
157 \ contained
|
|
158 \ nextgroup=@kconfigRangeSymbol2
|
|
159 \ skipwhite skipnl
|
|
160
|
|
161 syn match kconfigRangeNCSymbol '\<\k\+\>'
|
|
162 \ contained
|
|
163 \ nextgroup=@kconfigRangeSymbol2
|
|
164 \ skipwhite skipnl
|
|
165
|
|
166 syn cluster kconfigRangeSymbol2 contains=kconfigRangeCSymbol2,
|
|
167 \ kconfigRangeNCSymbol2
|
|
168
|
|
169 syn match kconfigRangeCSymbol2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
170 \ contained
|
|
171 \ nextgroup=kconfigConfigOptionIf,
|
|
172 \ @kconfigConfigOptions
|
|
173 \ skipwhite skipnl
|
|
174
|
|
175 syn match kconfigRangeNCSymbol2 '\<\k\+\>'
|
|
176 \ contained
|
|
177 \ nextgroup=kconfigConfigOptionIf,
|
|
178 \ @kconfigConfigOptions
|
|
179 \ skipwhite skipnl
|
|
180
|
|
181 syn region kconfigHelpText contained
|
|
182 \ matchgroup=kconfigConfigOption
|
827
|
183 \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)'
|
826
|
184 \ skip='^$'
|
|
185 \ end='^\z1\@!'
|
|
186 \ nextgroup=@kconfigConfigOptions
|
|
187 \ skipwhite skipnl
|
|
188
|
|
189 " XXX: Undocumented
|
|
190 syn keyword kconfigDefBool def_bool
|
|
191 \ contained
|
|
192 \ nextgroup=@kconfigDefBoolSymbol
|
|
193 \ skipwhite
|
|
194
|
|
195 syn cluster kconfigDefBoolSymbol contains=kconfigDefBoolCSymbol,
|
|
196 \ kconfigDefBoolNCSymbol
|
|
197
|
|
198 syn match kconfigDefBoolCSymbol '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
199 \ contained
|
|
200 \ nextgroup=kconfigConfigOptionIf,
|
|
201 \ @kconfigConfigOptions
|
|
202 \ skipwhite skipnl
|
|
203
|
|
204 syn match kconfigDefBoolCSymbol "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
205 \ contained
|
|
206 \ nextgroup=kconfigConfigOptionIf,
|
|
207 \ @kconfigConfigOptions
|
|
208 \ skipwhite skipnl
|
|
209
|
|
210 syn match kconfigDefBoolNCSymbol '\<\k\+\>'
|
|
211 \ contained
|
|
212 \ nextgroup=kconfigConfigOptionIf,
|
|
213 \ @kconfigConfigOptions
|
|
214 \ skipwhite skipnl
|
|
215
|
|
216 " XXX: This is actually only a valid option for “choice”, but treating it
|
|
217 " specially would require a lot of extra groups.
|
|
218 syn keyword kconfigOptional optional
|
|
219 \ contained
|
|
220 \ nextgroup=@kconfigConfigOptions
|
|
221 \ skipwhite skipnl
|
|
222
|
|
223 syn keyword kconfigConfigOptionIf if
|
|
224 \ contained
|
|
225 \ nextgroup=@kconfigConfigOptionIfExpr
|
|
226 \ skipwhite
|
|
227
|
|
228 syn cluster kconfigConfigOptionIfExpr contains=@kconfigConfOptIfExprSym,
|
|
229 \ kconfigConfOptIfExprNeg,
|
|
230 \ kconfigConfOptIfExprGroup
|
|
231
|
|
232 syn cluster kconfigConfOptIfExprSym contains=kconfigConfOptIfExprCSym,
|
|
233 \ kconfigConfOptIfExprNCSym
|
|
234
|
|
235 syn match kconfigConfOptIfExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
236 \ contained
|
|
237 \ nextgroup=@kconfigConfigOptions,
|
|
238 \ kconfigConfOptIfExprAnd,
|
|
239 \ kconfigConfOptIfExprOr,
|
|
240 \ kconfigConfOptIfExprEq,
|
|
241 \ kconfigConfOptIfExprNEq
|
|
242 \ skipwhite skipnl
|
|
243
|
|
244 syn match kconfigConfOptIfExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
245 \ contained
|
|
246 \ nextgroup=@kconfigConfigOptions,
|
|
247 \ kconfigConfOptIfExprAnd,
|
|
248 \ kconfigConfOptIfExprOr,
|
|
249 \ kconfigConfOptIfExprEq,
|
|
250 \ kconfigConfOptIfExprNEq
|
|
251 \ skipwhite skipnl
|
|
252
|
|
253 syn match kconfigConfOptIfExprNCSym '\<\k\+\>'
|
|
254 \ contained
|
|
255 \ nextgroup=@kconfigConfigOptions,
|
|
256 \ kconfigConfOptIfExprAnd,
|
|
257 \ kconfigConfOptIfExprOr,
|
|
258 \ kconfigConfOptIfExprEq,
|
|
259 \ kconfigConfOptIfExprNEq
|
|
260 \ skipwhite skipnl
|
|
261
|
|
262 syn cluster kconfigConfOptIfExprSym2 contains=kconfigConfOptIfExprCSym2,
|
|
263 \ kconfigConfOptIfExprNCSym2
|
|
264
|
|
265 syn match kconfigConfOptIfExprEq '='
|
|
266 \ contained
|
|
267 \ nextgroup=@kconfigConfOptIfExprSym2
|
|
268 \ skipwhite
|
|
269
|
|
270 syn match kconfigConfOptIfExprNEq '!='
|
|
271 \ contained
|
|
272 \ nextgroup=@kconfigConfOptIfExprSym2
|
|
273 \ skipwhite
|
|
274
|
|
275 syn match kconfigConfOptIfExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
276 \ contained
|
|
277 \ nextgroup=@kconfigConfigOptions,
|
|
278 \ kconfigConfOptIfExprAnd,
|
|
279 \ kconfigConfOptIfExprOr
|
|
280 \ skipwhite skipnl
|
|
281
|
|
282 syn match kconfigConfOptIfExprNCSym2 '\<\k\+\>'
|
|
283 \ contained
|
|
284 \ nextgroup=@kconfigConfigOptions,
|
|
285 \ kconfigConfOptIfExprAnd,
|
|
286 \ kconfigConfOptIfExprOr
|
|
287 \ skipwhite skipnl
|
|
288
|
|
289 syn match kconfigConfOptIfExprNeg '!'
|
|
290 \ contained
|
|
291 \ nextgroup=@kconfigConfigOptionIfExpr
|
|
292 \ skipwhite
|
|
293
|
|
294 syn match kconfigConfOptIfExprAnd '&&'
|
|
295 \ contained
|
|
296 \ nextgroup=@kconfigConfigOptionIfExpr
|
|
297 \ skipwhite
|
|
298
|
|
299 syn match kconfigConfOptIfExprOr '||'
|
|
300 \ contained
|
|
301 \ nextgroup=@kconfigConfigOptionIfExpr
|
|
302 \ skipwhite
|
|
303
|
|
304 syn match kconfigConfOptIfExprGroup '('
|
|
305 \ contained
|
|
306 \ nextgroup=@kconfigConfigOptionIfGExp
|
|
307 \ skipwhite
|
|
308
|
|
309 " TODO: hm, this kind of recursion doesn't work right. We need another set of
|
|
310 " expressions that have kconfigConfigOPtionIfGExp as nextgroup and a matcher
|
|
311 " for '(' that sets it all off.
|
|
312 syn cluster kconfigConfigOptionIfGExp contains=@kconfigConfOptIfGExpSym,
|
|
313 \ kconfigConfOptIfGExpNeg,
|
|
314 \ kconfigConfOptIfExprGroup
|
|
315
|
|
316 syn cluster kconfigConfOptIfGExpSym contains=kconfigConfOptIfGExpCSym,
|
|
317 \ kconfigConfOptIfGExpNCSym
|
|
318
|
|
319 syn match kconfigConfOptIfGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
320 \ contained
|
|
321 \ nextgroup=@kconfigConfigIf,
|
|
322 \ kconfigConfOptIfGExpAnd,
|
|
323 \ kconfigConfOptIfGExpOr,
|
|
324 \ kconfigConfOptIfGExpEq,
|
|
325 \ kconfigConfOptIfGExpNEq
|
|
326 \ skipwhite skipnl
|
|
327
|
|
328 syn match kconfigConfOptIfGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
329 \ contained
|
|
330 \ nextgroup=@kconfigConfigIf,
|
|
331 \ kconfigConfOptIfGExpAnd,
|
|
332 \ kconfigConfOptIfGExpOr,
|
|
333 \ kconfigConfOptIfGExpEq,
|
|
334 \ kconfigConfOptIfGExpNEq
|
|
335 \ skipwhite skipnl
|
|
336
|
|
337 syn match kconfigConfOptIfGExpNCSym '\<\k\+\>'
|
|
338 \ contained
|
|
339 \ nextgroup=kconfigConfOptIfExprGrpE,
|
|
340 \ kconfigConfOptIfGExpAnd,
|
|
341 \ kconfigConfOptIfGExpOr,
|
|
342 \ kconfigConfOptIfGExpEq,
|
|
343 \ kconfigConfOptIfGExpNEq
|
|
344 \ skipwhite skipnl
|
|
345
|
|
346 syn cluster kconfigConfOptIfGExpSym2 contains=kconfigConfOptIfGExpCSym2,
|
|
347 \ kconfigConfOptIfGExpNCSym2
|
|
348
|
|
349 syn match kconfigConfOptIfGExpEq '='
|
|
350 \ contained
|
|
351 \ nextgroup=@kconfigConfOptIfGExpSym2
|
|
352 \ skipwhite
|
|
353
|
|
354 syn match kconfigConfOptIfGExpNEq '!='
|
|
355 \ contained
|
|
356 \ nextgroup=@kconfigConfOptIfGExpSym2
|
|
357 \ skipwhite
|
|
358
|
|
359 syn match kconfigConfOptIfGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
360 \ contained
|
|
361 \ nextgroup=kconfigConfOptIfExprGrpE,
|
|
362 \ kconfigConfOptIfGExpAnd,
|
|
363 \ kconfigConfOptIfGExpOr
|
|
364 \ skipwhite skipnl
|
|
365
|
|
366 syn match kconfigConfOptIfGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
367 \ contained
|
|
368 \ nextgroup=kconfigConfOptIfExprGrpE,
|
|
369 \ kconfigConfOptIfGExpAnd,
|
|
370 \ kconfigConfOptIfGExpOr
|
|
371 \ skipwhite skipnl
|
|
372
|
|
373 syn match kconfigConfOptIfGExpNCSym2 '\<\k\+\>'
|
|
374 \ contained
|
|
375 \ nextgroup=kconfigConfOptIfExprGrpE,
|
|
376 \ kconfigConfOptIfGExpAnd,
|
|
377 \ kconfigConfOptIfGExpOr
|
|
378 \ skipwhite skipnl
|
|
379
|
|
380 syn match kconfigConfOptIfGExpNeg '!'
|
|
381 \ contained
|
|
382 \ nextgroup=@kconfigConfigOptionIfGExp
|
|
383 \ skipwhite
|
|
384
|
|
385 syn match kconfigConfOptIfGExpAnd '&&'
|
|
386 \ contained
|
|
387 \ nextgroup=@kconfigConfigOptionIfGExp
|
|
388 \ skipwhite
|
|
389
|
|
390 syn match kconfigConfOptIfGExpOr '||'
|
|
391 \ contained
|
|
392 \ nextgroup=@kconfigConfigOptionIfGExp
|
|
393 \ skipwhite
|
|
394
|
|
395 syn match kconfigConfOptIfExprGrpE ')'
|
|
396 \ contained
|
|
397 \ nextgroup=@kconfigConfigOptions,
|
|
398 \ kconfigConfOptIfExprAnd,
|
|
399 \ kconfigConfOptIfExprOr
|
|
400 \ skipwhite skipnl
|
|
401
|
|
402
|
|
403 syn cluster kconfigConfigOptionExpr contains=@kconfigConfOptExprSym,
|
|
404 \ kconfigConfOptExprNeg,
|
|
405 \ kconfigConfOptExprGroup
|
|
406
|
|
407 syn cluster kconfigConfOptExprSym contains=kconfigConfOptExprCSym,
|
|
408 \ kconfigConfOptExprNCSym
|
|
409
|
|
410 syn match kconfigConfOptExprCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
411 \ contained
|
|
412 \ nextgroup=kconfigConfigOptionIf,
|
|
413 \ kconfigConfOptExprAnd,
|
|
414 \ kconfigConfOptExprOr,
|
|
415 \ kconfigConfOptExprEq,
|
|
416 \ kconfigConfOptExprNEq,
|
|
417 \ @kconfigConfigOptions
|
|
418 \ skipwhite skipnl
|
|
419
|
|
420 syn match kconfigConfOptExprCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
421 \ contained
|
|
422 \ nextgroup=kconfigConfigOptionIf,
|
|
423 \ kconfigConfOptExprAnd,
|
|
424 \ kconfigConfOptExprOr,
|
|
425 \ kconfigConfOptExprEq,
|
|
426 \ kconfigConfOptExprNEq,
|
|
427 \ @kconfigConfigOptions
|
|
428 \ skipwhite skipnl
|
|
429
|
|
430 syn match kconfigConfOptExprNCSym '\<\k\+\>'
|
|
431 \ contained
|
|
432 \ nextgroup=kconfigConfigOptionIf,
|
|
433 \ kconfigConfOptExprAnd,
|
|
434 \ kconfigConfOptExprOr,
|
|
435 \ kconfigConfOptExprEq,
|
|
436 \ kconfigConfOptExprNEq,
|
|
437 \ @kconfigConfigOptions
|
|
438 \ skipwhite skipnl
|
|
439
|
|
440 syn cluster kconfigConfOptExprSym2 contains=kconfigConfOptExprCSym2,
|
|
441 \ kconfigConfOptExprNCSym2
|
|
442
|
|
443 syn match kconfigConfOptExprEq '='
|
|
444 \ contained
|
|
445 \ nextgroup=@kconfigConfOptExprSym2
|
|
446 \ skipwhite
|
|
447
|
|
448 syn match kconfigConfOptExprNEq '!='
|
|
449 \ contained
|
|
450 \ nextgroup=@kconfigConfOptExprSym2
|
|
451 \ skipwhite
|
|
452
|
|
453 syn match kconfigConfOptExprCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
454 \ contained
|
|
455 \ nextgroup=kconfigConfigOptionIf,
|
|
456 \ kconfigConfOptExprAnd,
|
|
457 \ kconfigConfOptExprOr,
|
|
458 \ @kconfigConfigOptions
|
|
459 \ skipwhite skipnl
|
|
460
|
|
461 syn match kconfigConfOptExprCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
462 \ contained
|
|
463 \ nextgroup=kconfigConfigOptionIf,
|
|
464 \ kconfigConfOptExprAnd,
|
|
465 \ kconfigConfOptExprOr,
|
|
466 \ @kconfigConfigOptions
|
|
467 \ skipwhite skipnl
|
|
468
|
|
469 syn match kconfigConfOptExprNCSym2 '\<\k\+\>'
|
|
470 \ contained
|
|
471 \ nextgroup=kconfigConfigOptionIf,
|
|
472 \ kconfigConfOptExprAnd,
|
|
473 \ kconfigConfOptExprOr,
|
|
474 \ @kconfigConfigOptions
|
|
475 \ skipwhite skipnl
|
|
476
|
|
477 syn match kconfigConfOptExprNeg '!'
|
|
478 \ contained
|
|
479 \ nextgroup=@kconfigConfigOptionExpr
|
|
480 \ skipwhite
|
|
481
|
|
482 syn match kconfigConfOptExprAnd '&&'
|
|
483 \ contained
|
|
484 \ nextgroup=@kconfigConfigOptionExpr
|
|
485 \ skipwhite
|
|
486
|
|
487 syn match kconfigConfOptExprOr '||'
|
|
488 \ contained
|
|
489 \ nextgroup=@kconfigConfigOptionExpr
|
|
490 \ skipwhite
|
|
491
|
|
492 syn match kconfigConfOptExprGroup '('
|
|
493 \ contained
|
|
494 \ nextgroup=@kconfigConfigOptionGExp
|
|
495 \ skipwhite
|
|
496
|
|
497 syn cluster kconfigConfigOptionGExp contains=@kconfigConfOptGExpSym,
|
|
498 \ kconfigConfOptGExpNeg,
|
|
499 \ kconfigConfOptGExpGroup
|
|
500
|
|
501 syn cluster kconfigConfOptGExpSym contains=kconfigConfOptGExpCSym,
|
|
502 \ kconfigConfOptGExpNCSym
|
|
503
|
|
504 syn match kconfigConfOptGExpCSym '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
505 \ contained
|
|
506 \ nextgroup=kconfigConfOptExprGrpE,
|
|
507 \ kconfigConfOptGExpAnd,
|
|
508 \ kconfigConfOptGExpOr,
|
|
509 \ kconfigConfOptGExpEq,
|
|
510 \ kconfigConfOptGExpNEq
|
|
511 \ skipwhite skipnl
|
|
512
|
|
513 syn match kconfigConfOptGExpCSym "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
514 \ contained
|
|
515 \ nextgroup=kconfigConfOptExprGrpE,
|
|
516 \ kconfigConfOptGExpAnd,
|
|
517 \ kconfigConfOptGExpOr,
|
|
518 \ kconfigConfOptGExpEq,
|
|
519 \ kconfigConfOptGExpNEq
|
|
520 \ skipwhite skipnl
|
|
521
|
|
522 syn match kconfigConfOptGExpNCSym '\<\k\+\>'
|
|
523 \ contained
|
|
524 \ nextgroup=kconfigConfOptExprGrpE,
|
|
525 \ kconfigConfOptGExpAnd,
|
|
526 \ kconfigConfOptGExpOr,
|
|
527 \ kconfigConfOptGExpEq,
|
|
528 \ kconfigConfOptGExpNEq
|
|
529 \ skipwhite skipnl
|
|
530
|
|
531 syn cluster kconfigConfOptGExpSym2 contains=kconfigConfOptGExpCSym2,
|
|
532 \ kconfigConfOptGExpNCSym2
|
|
533
|
|
534 syn match kconfigConfOptGExpEq '='
|
|
535 \ contained
|
|
536 \ nextgroup=@kconfigConfOptGExpSym2
|
|
537 \ skipwhite
|
|
538
|
|
539 syn match kconfigConfOptGExpNEq '!='
|
|
540 \ contained
|
|
541 \ nextgroup=@kconfigConfOptGExpSym2
|
|
542 \ skipwhite
|
|
543
|
|
544 syn match kconfigConfOptGExpCSym2 '"[^"\\]*\%(\\.[^"\\]*\)*"'
|
|
545 \ contained
|
|
546 \ nextgroup=kconfigConfOptExprGrpE,
|
|
547 \ kconfigConfOptGExpAnd,
|
|
548 \ kconfigConfOptGExpOr
|
|
549 \ skipwhite skipnl
|
|
550
|
|
551 syn match kconfigConfOptGExpCSym2 "'[^'\\]*\%(\\.[^'\\]*\)*'"
|
|
552 \ contained
|
|
553 \ nextgroup=kconfigConfOptExprGrpE,
|
|
554 \ kconfigConfOptGExpAnd,
|
|
555 \ kconfigConfOptGExpOr
|
|
556 \ skipwhite skipnl
|
|
557
|
|
558 syn match kconfigConfOptGExpNCSym2 '\<\k\+\>'
|
|
559 \ contained
|
|
560 \ nextgroup=kconfigConfOptExprGrpE,
|
|
561 \ kconfigConfOptGExpAnd,
|
|
562 \ kconfigConfOptGExpOr
|
|
563 \ skipwhite skipnl
|
|
564
|
|
565 syn match kconfigConfOptGExpNeg '!'
|
|
566 \ contained
|
|
567 \ nextgroup=@kconfigConfigOptionGExp
|
|
568 \ skipwhite
|
|
569
|
|
570 syn match kconfigConfOptGExpAnd '&&'
|
|
571 \ contained
|
|
572 \ nextgroup=@kconfigConfigOptionGExp
|
|
573 \ skipwhite
|
|
574
|
|
575 syn match kconfigConfOptGExpOr '||'
|
|
576 \ contained
|
|
577 \ nextgroup=@kconfigConfigOptionGExp
|
|
578 \ skipwhite
|
|
579
|
|
580 syn match kconfigConfOptExprGrpE ')'
|
|
581 \ contained
|
|
582 \ nextgroup=kconfigConfigOptionIf,
|
|
583 \ kconfigConfOptExprAnd,
|
|
584 \ kconfigConfOptExprOr
|
|
585 \ skipwhite skipnl
|
|
586
|
827
|
587 syn sync minlines=50
|
|
588
|
826
|
589 hi def link kconfigTodo Todo
|
|
590 hi def link kconfigComment Comment
|
|
591 hi def link kconfigKeyword Keyword
|
|
592 hi def link kconfigPreProc PreProc
|
|
593 hi def link kconfigConditional Conditional
|
|
594 hi def link kconfigPrompt String
|
|
595 hi def link kconfigKeywordPrompt kconfigPrompt
|
|
596 hi def link kconfigPath String
|
|
597 hi def link kconfigSymbol String
|
|
598 hi def link kconfigConstantSymbol Constant
|
|
599 hi def link kconfigConfigOption Type
|
|
600 hi def link kconfigTypeDefinition kconfigConfigOption
|
|
601 hi def link kconfigTypeDefPrompt kconfigPrompt
|
|
602 hi def link kconfigInputPrompt kconfigConfigOption
|
|
603 hi def link kconfigPromptPrompt kconfigPrompt
|
|
604 hi def link kconfigDefaultValue kconfigConfigOption
|
|
605 hi def link kconfigDependencies kconfigConfigOption
|
|
606 hi def link kconfigReverseDependencies kconfigConfigOption
|
|
607 hi def link kconfigRevDepCSymbol kconfigConstantSymbol
|
|
608 hi def link kconfigRevDepNCSymbol kconfigSymbol
|
|
609 hi def link kconfigNumericalRanges kconfigConfigOption
|
|
610 hi def link kconfigRangeCSymbol kconfigConstantSymbol
|
|
611 hi def link kconfigRangeNCSymbol kconfigSymbol
|
|
612 hi def link kconfigRangeCSymbol2 kconfigConstantSymbol
|
|
613 hi def link kconfigRangeNCSymbol2 kconfigSymbol
|
|
614 hi def link kconfigHelpText Normal
|
|
615 hi def link kconfigDefBool kconfigConfigOption
|
|
616 hi def link kconfigDefBoolCSymbol kconfigConstantSymbol
|
|
617 hi def link kconfigDefBoolNCSymbol kconfigSymbol
|
|
618 hi def link kconfigOptional kconfigConfigOption
|
|
619 hi def link kconfigConfigOptionIf Conditional
|
|
620 hi def link kconfigConfOptIfExprCSym kconfigConstantSymbol
|
|
621 hi def link kconfigConfOptIfExprNCSym kconfigSymbol
|
|
622 hi def link kconfigOperator Operator
|
|
623 hi def link kconfigConfOptIfExprEq kconfigOperator
|
|
624 hi def link kconfigConfOptIfExprNEq kconfigOperator
|
|
625 hi def link kconfigConfOptIfExprCSym2 kconfigConstantSymbol
|
|
626 hi def link kconfigConfOptIfExprNCSym2 kconfigSymbol
|
|
627 hi def link kconfigConfOptIfExprNeg kconfigOperator
|
|
628 hi def link kconfigConfOptIfExprAnd kconfigOperator
|
|
629 hi def link kconfigConfOptIfExprOr kconfigOperator
|
|
630 hi def link kconfigDelimiter Delimiter
|
|
631 hi def link kconfigConfOptIfExprGroup kconfigDelimiter
|
|
632 hi def link kconfigConfOptIfGExpCSym kconfigConstantSymbol
|
|
633 hi def link kconfigConfOptIfGExpNCSym kconfigSymbol
|
|
634 hi def link kconfigConfOptIfGExpEq kconfigOperator
|
|
635 hi def link kconfigConfOptIfGExpNEq kconfigOperator
|
|
636 hi def link kconfigConfOptIfGExpCSym2 kconfigConstantSymbol
|
|
637 hi def link kconfigConfOptIfGExpNCSym2 kconfigSymbol
|
|
638 hi def link kconfigConfOptIfGExpNeg kconfigOperator
|
|
639 hi def link kconfigConfOptIfGExpAnd kconfigOperator
|
|
640 hi def link kconfigConfOptIfGExpOr kconfigOperator
|
|
641 hi def link kconfigConfOptIfExprGrpE kconfigDelimiter
|
|
642 hi def link kconfigConfOptExprCSym kconfigConstantSymbol
|
|
643 hi def link kconfigConfOptExprNCSym kconfigSymbol
|
|
644 hi def link kconfigConfOptExprEq kconfigOperator
|
|
645 hi def link kconfigConfOptExprNEq kconfigOperator
|
|
646 hi def link kconfigConfOptExprCSym2 kconfigConstantSymbol
|
|
647 hi def link kconfigConfOptExprNCSym2 kconfigSymbol
|
|
648 hi def link kconfigConfOptExprNeg kconfigOperator
|
|
649 hi def link kconfigConfOptExprAnd kconfigOperator
|
|
650 hi def link kconfigConfOptExprOr kconfigOperator
|
|
651 hi def link kconfigConfOptExprGroup kconfigDelimiter
|
|
652 hi def link kconfigConfOptGExpCSym kconfigConstantSymbol
|
|
653 hi def link kconfigConfOptGExpNCSym kconfigSymbol
|
|
654 hi def link kconfigConfOptGExpEq kconfigOperator
|
|
655 hi def link kconfigConfOptGExpNEq kconfigOperator
|
|
656 hi def link kconfigConfOptGExpCSym2 kconfigConstantSymbol
|
|
657 hi def link kconfigConfOptGExpNCSym2 kconfigSymbol
|
|
658 hi def link kconfigConfOptGExpNeg kconfigOperator
|
|
659 hi def link kconfigConfOptGExpAnd kconfigOperator
|
|
660 hi def link kconfigConfOptGExpOr kconfigOperator
|
|
661 hi def link kconfigConfOptExprGrpE kconfigConfOptIfExprGroup
|
|
662
|
|
663 else
|
|
664
|
|
665 syn keyword kconfigTodo contained TODO FIXME XXX NOTE
|
|
666
|
|
667 syn match kconfigComment display '#.*$' contains=kconfigTodo
|
|
668
|
|
669 syn keyword kconfigKeyword config menuconfig comment menu mainmenu
|
|
670
|
|
671 syn keyword kconfigConditional choice endchoice if endif
|
|
672
|
|
673 syn keyword kconfigPreProc source
|
|
674 \ nextgroup=kconfigPath
|
|
675 \ skipwhite
|
|
676
|
827
|
677 syn keyword kconfigTriState y m n
|
|
678
|
826
|
679 syn match kconfigSpecialChar contained '\\.'
|
837
|
680 syn match kconfigSpecialChar '\\$'
|
826
|
681
|
|
682 syn region kconfigPath matchgroup=kconfigPath
|
|
683 \ start=+"+ skip=+\\\\\|\\\"+ end=+"+
|
|
684 \ contains=kconfigSpecialChar
|
|
685
|
|
686 syn region kconfigPath matchgroup=kconfigPath
|
|
687 \ start=+'+ skip=+\\\\\|\\\'+ end=+'+
|
|
688 \ contains=kconfigSpecialChar
|
|
689
|
|
690 syn match kconfigPath '\S\+'
|
|
691 \ contained
|
|
692
|
|
693 syn region kconfigString matchgroup=kconfigString
|
|
694 \ start=+"+ skip=+\\\\\|\\\"+ end=+"+
|
|
695 \ contains=kconfigSpecialChar
|
|
696
|
|
697 syn region kconfigString matchgroup=kconfigString
|
|
698 \ start=+'+ skip=+\\\\\|\\\'+ end=+'+
|
|
699 \ contains=kconfigSpecialChar
|
|
700
|
|
701 syn keyword kconfigType bool boolean tristate string hex int
|
|
702
|
|
703 syn keyword kconfigOption prompt default requires select range
|
|
704 \ optional
|
827
|
705 syn match kconfigOption 'depends\%( on\)\='
|
826
|
706
|
|
707 syn keyword kconfigMacro def_bool def_tristate
|
|
708
|
827
|
709 syn region kconfigHelpText
|
|
710 \ matchgroup=kconfigOption
|
|
711 \ start='\%(help\|---help---\)\ze\s*\n\z(\s\+\)'
|
826
|
712 \ skip='^$'
|
|
713 \ end='^\z1\@!'
|
|
714
|
828
|
715 syn sync match kconfigSyncHelp grouphere kconfigHelpText 'help\|---help---'
|
|
716
|
826
|
717 hi def link kconfigTodo Todo
|
|
718 hi def link kconfigComment Comment
|
|
719 hi def link kconfigKeyword Keyword
|
|
720 hi def link kconfigConditional Conditional
|
|
721 hi def link kconfigPreProc PreProc
|
827
|
722 hi def link kconfigTriState Boolean
|
826
|
723 hi def link kconfigSpecialChar SpecialChar
|
|
724 hi def link kconfigPath String
|
|
725 hi def link kconfigString String
|
|
726 hi def link kconfigType Type
|
|
727 hi def link kconfigOption Identifier
|
|
728 hi def link kconfigHelpText Normal
|
|
729 hi def link kconfigmacro Macro
|
|
730
|
|
731 endif
|
|
732
|
|
733 let b:current_syntax = "kconfig"
|
|
734
|
|
735 let &cpo = s:cpo_save
|
|
736 unlet s:cpo_save
|