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