xref: /vim-8.2.3635/runtime/syntax/lilo.vim (revision f37506f6)
1" Vim syntax file
2" Language: lilo configuration (lilo.conf)
3" Maintainer: Niels Horn <[email protected]>
4" Previous Maintainer: David Necas (Yeti) <[email protected]>
5" Last Change: 2010-02-03
6
7" Setup
8" quit when a syntax file was already loaded
9if exists("b:current_syntax")
10  finish
11endif
12
13setlocal iskeyword=@,48-57,.,-,_
14
15syn case ignore
16
17" Base constructs
18syn match liloError "\S\+"
19syn match liloComment "#.*$"
20syn match liloEnviron "\$\w\+" contained
21syn match liloEnviron "\${[^}]\+}" contained
22syn match liloDecNumber "\d\+" contained
23syn match liloHexNumber "0[xX]\x\+" contained
24syn match liloDecNumberP "\d\+p\=" contained
25syn match liloSpecial contained "\\\(\"\|\\\|$\)"
26syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron
27syn match liloLabel :[^ "]\+: contained contains=liloSpecial,liloEnviron
28syn region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron
29syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber
30syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber
31syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString
32
33" Path
34syn keyword liloOption backup bitmap boot disktab force-backup keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
35syn keyword liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
36syn keyword liloImageOpt path loader table nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
37syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
38
39" Other
40syn keyword liloOption menu-scheme raid-extra-boot serial install nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
41syn keyword liloOption bios-passes-dl nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
42syn keyword liloOption default label alias wmdefault nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty
43syn keyword liloKernelOpt ramdisk nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
44syn keyword liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
45syn keyword liloDiskOpt set type nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
46
47" Symbolic
48syn keyword liloKernelOpt vga nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
49
50" Number
51syn keyword liloOption delay timeout verbose nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
52syn keyword liloDiskOpt sectors heads cylinders start nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
53
54" String
55syn keyword liloOption menu-title nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
56syn keyword liloKernelOpt append addappend nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
57syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
58
59" Hex number
60syn keyword liloImageOpt map-drive to boot-as nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
61syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
62
63" Number list
64syn keyword liloOption bmp-colors nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
65
66" Number list, some of the numbers followed by p
67syn keyword liloOption bmp-table bmp-timer nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
68
69" Flag
70syn keyword liloOption compact fix-table geometric ignore-table lba32 linear mandatory nowarn prompt
71syn keyword liloOption bmp-retain el-torito-bootable-CD large-memory suppress-boot-time-BIOS-data
72syn keyword liloKernelOpt read-only read-write
73syn keyword liloImageOpt bypass lock mandatory optional restricted single-key unsafe
74syn keyword liloImageOpt master-boot wmwarn wmdisable
75syn keyword liloDiskOpt change activate deactivate inaccessible reset
76
77" Image
78syn keyword liloImage image other nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
79syn keyword liloDisk disk nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
80syn keyword liloChRules change-rules
81
82" Vga keywords
83syn keyword liloVgaKeyword ask ext extended normal contained
84
85" Comment followed by equal sign and ...
86syn match liloEqPathComment "#.*$" contained nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
87syn match liloEqVgaComment "#.*$" contained nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
88syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
89syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
90syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
91syn match liloEqStringComment "#.*$" contained nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
92syn match liloEqLabelStringComment "#.*$" contained nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty
93syn match liloEqNumberListComment "#.*$" contained nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
94syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
95syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
96
97" Equal sign followed by ...
98syn match liloEqPath "=" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
99syn match liloEqVga "=" contained nextgroup=liloVgaKeyword,liloHexNumber,liloDecNumber,liloVgaComment,liloError skipwhite skipempty
100syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
101syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
102syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
103syn match liloEqString "=" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
104syn match liloEqLabelString "=" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty
105syn match liloEqNumberList "=" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
106syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
107syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
108
109" Comment followed by ...
110syn match liloPathComment "#.*$" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
111syn match liloVgaComment "#.*$" contained nextgroup=liloVgaKeyword,liloHexNumber,liloVgaComment,liloError skipwhite skipempty
112syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
113syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
114syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
115syn match liloStringComment "#.*$" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
116syn match liloLabelStringComment "#.*$" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty
117syn match liloDecNumberListComment "#.*$" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
118syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
119syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
120
121" Define the default highlighting
122
123hi def link liloEqPath             liloEquals
124hi def link liloEqWord             liloEquals
125hi def link liloEqVga              liloEquals
126hi def link liloEqDecNumber        liloEquals
127hi def link liloEqHexNumber        liloEquals
128hi def link liloEqNumber           liloEquals
129hi def link liloEqString           liloEquals
130hi def link liloEqAnything         liloEquals
131hi def link liloEquals             Special
132
133hi def link liloError              Error
134
135hi def link liloEqPathComment      liloComment
136hi def link liloEqVgaComment       liloComment
137hi def link liloEqDecNumberComment liloComment
138hi def link liloEqHexNumberComment liloComment
139hi def link liloEqStringComment    liloComment
140hi def link liloEqAnythingComment  liloComment
141hi def link liloPathComment        liloComment
142hi def link liloVgaComment         liloComment
143hi def link liloDecNumberComment   liloComment
144hi def link liloHexNumberComment   liloComment
145hi def link liloNumberComment      liloComment
146hi def link liloStringComment      liloComment
147hi def link liloAnythingComment    liloComment
148hi def link liloComment            Comment
149
150hi def link liloDiskOpt            liloOption
151hi def link liloKernelOpt          liloOption
152hi def link liloImageOpt           liloOption
153hi def link liloOption             Keyword
154
155hi def link liloDecNumber          liloNumber
156hi def link liloHexNumber          liloNumber
157hi def link liloDecNumberP         liloNumber
158hi def link liloNumber             Number
159hi def link liloString             String
160hi def link liloPath               Constant
161
162hi def link liloSpecial            Special
163hi def link liloLabel              Title
164hi def link liloDecNumberList      Special
165hi def link liloDecNumberPList     Special
166hi def link liloAnything           Normal
167hi def link liloEnviron            Identifier
168hi def link liloVgaKeyword         Identifier
169hi def link liloImage              Type
170hi def link liloChRules            Preproc
171hi def link liloDisk               Preproc
172
173
174let b:current_syntax = "lilo"
175