blob: e3ba2af00b496658b49cf5f8972346d25968e4fb [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" This is a GENERATED FILE. Please always refer to source file at the URI below.
3" Language: lilo configuration (lilo.conf)
4" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
Bram Moolenaar5eb86f92004-07-26 12:53:41 +00005" Last Change: 2004-07-20
Bram Moolenaar071d4272004-06-13 20:20:40 +00006" URL: http://trific.ath.cx/Ftp/vim/syntax/lilo.vim
7
Bram Moolenaar5eb86f92004-07-26 12:53:41 +00008
Bram Moolenaar071d4272004-06-13 20:20:40 +00009" Setup
10if version >= 600
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000011 if exists("b:current_syntax")
12 finish
13 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014else
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000015 syntax clear
Bram Moolenaar071d4272004-06-13 20:20:40 +000016endif
17
18if version >= 600
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000019 command -nargs=1 SetIsk setlocal iskeyword=<args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000020else
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000021 command -nargs=1 SetIsk set iskeyword=<args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000022endif
23SetIsk @,48-57,.,-,_
24delcommand SetIsk
25
26syn case ignore
27
28" Base constructs
29syn match liloError "\S\+"
30syn match liloComment "#.*$"
31syn match liloEnviron "\$\w\+" contained
32syn match liloEnviron "\${[^}]\+}" contained
33syn match liloDecNumber "\d\+" contained
34syn match liloHexNumber "0[xX]\x\+" contained
35syn match liloDecNumberP "\d\+p\=" contained
36syn match liloSpecial contained "\\\(\"\|\\\|$\)"
37syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000038syn match liloLabel :[^ "]\+: contained contains=liloSpecial,liloEnviron
Bram Moolenaar071d4272004-06-13 20:20:40 +000039syn region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron
40syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber
41syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber
42syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString
43
44" Path
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000045syn keyword liloOption backup bitmap boot disktab force-backup keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
Bram Moolenaar071d4272004-06-13 20:20:40 +000046syn keyword liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
47syn keyword liloImageOpt path loader table nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
48syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
49
50" Other
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000051syn keyword liloOption menu-scheme raid-extra-boot serial install nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
52syn keyword liloOption bios-passes-dl nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
53syn keyword liloOption default label alias wmdefault nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty
Bram Moolenaar071d4272004-06-13 20:20:40 +000054syn keyword liloKernelOpt ramdisk nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
Bram Moolenaar071d4272004-06-13 20:20:40 +000055syn keyword liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
56syn keyword liloDiskOpt set type nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
57
58" Symbolic
59syn keyword liloKernelOpt vga nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
60
61" Number
62syn keyword liloOption delay timeout verbose nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
63syn keyword liloDiskOpt sectors heads cylinders start nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
64
65" String
66syn keyword liloOption menu-title nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
67syn keyword liloKernelOpt append nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
68syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
69
70" Hex number
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000071syn keyword liloImageOpt map-drive to boot-as nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
Bram Moolenaar071d4272004-06-13 20:20:40 +000072syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
73
74" Number list
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000075syn keyword liloOption bmp-colors nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
Bram Moolenaar071d4272004-06-13 20:20:40 +000076
77" Number list, some of the numbers followed by p
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000078syn keyword liloOption bmp-table bmp-timer nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
Bram Moolenaar071d4272004-06-13 20:20:40 +000079
80" Flag
81syn keyword liloOption compact fix-table geometric ignore-table lba32 linear mandatory nowarn prompt
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000082syn keyword liloOption bmp-retain el-torito-bootable-CD large-memory suppress-boot-time-BIOS-data
Bram Moolenaar071d4272004-06-13 20:20:40 +000083syn keyword liloKernelOpt read-only read-write
84syn keyword liloImageOpt bypass lock mandatory optional restricted single-key unsafe
Bram Moolenaar5eb86f92004-07-26 12:53:41 +000085syn keyword liloImageOpt master-boot wmwarn wmdisable
Bram Moolenaar071d4272004-06-13 20:20:40 +000086syn keyword liloDiskOpt change activate deactivate inaccessible reset
87
88" Image
89syn keyword liloImage image other nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
90syn keyword liloDisk disk nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
91syn keyword liloChRules change-rules
92
93" Vga keywords
94syn keyword liloVgaKeyword ask ext extended normal contained
95
96" Comment followed by equal sign and ...
97syn match liloEqPathComment "#.*$" contained nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
98syn match liloEqVgaComment "#.*$" contained nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
99syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
100syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
101syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
102syn match liloEqStringComment "#.*$" contained nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000103syn match liloEqLabelStringComment "#.*$" contained nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty
Bram Moolenaar071d4272004-06-13 20:20:40 +0000104syn match liloEqNumberListComment "#.*$" contained nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
105syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
106syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
107
108" Equal sign followed by ...
109syn match liloEqPath "=" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
110syn match liloEqVga "=" contained nextgroup=liloVgaKeyword,liloHexNumber,liloDecNumber,liloVgaComment,liloError skipwhite skipempty
111syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
112syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
113syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
114syn match liloEqString "=" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000115syn match liloEqLabelString "=" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty
Bram Moolenaar071d4272004-06-13 20:20:40 +0000116syn match liloEqNumberList "=" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
117syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
118syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
119
120" Comment followed by ...
121syn match liloPathComment "#.*$" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
122syn match liloVgaComment "#.*$" contained nextgroup=liloVgaKeyword,liloHexNumber,liloVgaComment,liloError skipwhite skipempty
123syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
124syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
125syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
126syn match liloStringComment "#.*$" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000127syn match liloLabelStringComment "#.*$" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty
Bram Moolenaar071d4272004-06-13 20:20:40 +0000128syn match liloDecNumberListComment "#.*$" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
129syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
130syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
131
132" Define the default highlighting
133if version >= 508 || !exists("did_lilo_syntax_inits")
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000134 if version < 508
135 let did_lilo_syntax_inits = 1
136 command -nargs=+ HiLink hi link <args>
137 else
138 command -nargs=+ HiLink hi def link <args>
139 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000140
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000141 HiLink liloEqPath liloEquals
142 HiLink liloEqWord liloEquals
143 HiLink liloEqVga liloEquals
144 HiLink liloEqDecNumber liloEquals
145 HiLink liloEqHexNumber liloEquals
146 HiLink liloEqNumber liloEquals
147 HiLink liloEqString liloEquals
148 HiLink liloEqAnything liloEquals
149 HiLink liloEquals Special
Bram Moolenaar071d4272004-06-13 20:20:40 +0000150
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000151 HiLink liloError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +0000152
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000153 HiLink liloEqPathComment liloComment
154 HiLink liloEqVgaComment liloComment
155 HiLink liloEqDecNumberComment liloComment
156 HiLink liloEqHexNumberComment liloComment
157 HiLink liloEqStringComment liloComment
158 HiLink liloEqAnythingComment liloComment
159 HiLink liloPathComment liloComment
160 HiLink liloVgaComment liloComment
161 HiLink liloDecNumberComment liloComment
162 HiLink liloHexNumberComment liloComment
163 HiLink liloNumberComment liloComment
164 HiLink liloStringComment liloComment
165 HiLink liloAnythingComment liloComment
166 HiLink liloComment Comment
Bram Moolenaar071d4272004-06-13 20:20:40 +0000167
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000168 HiLink liloDiskOpt liloOption
169 HiLink liloKernelOpt liloOption
170 HiLink liloImageOpt liloOption
171 HiLink liloOption Keyword
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000173 HiLink liloDecNumber liloNumber
174 HiLink liloHexNumber liloNumber
175 HiLink liloDecNumberP liloNumber
176 HiLink liloNumber Number
177 HiLink liloString String
178 HiLink liloPath Constant
Bram Moolenaar071d4272004-06-13 20:20:40 +0000179
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000180 HiLink liloSpecial Special
181 HiLink liloLabel Title
182 HiLink liloDecNumberList Special
183 HiLink liloDecNumberPList Special
184 HiLink liloAnything Normal
185 HiLink liloEnviron Identifier
186 HiLink liloVgaKeyword Identifier
187 HiLink liloImage Type
188 HiLink liloChRules Preproc
189 HiLink liloDisk Preproc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000190
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000191 delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +0000192endif
193
194let b:current_syntax = "lilo"