home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vim60.zip / vim60rt2.zip / vim / vim60 / syntax / lilo.vim < prev    next >
Encoding:
Text File  |  2001-09-26  |  8.8 KB  |  176 lines

  1. " 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>
  5. " Last Change: 2001-07-10
  6. " URI: http://physics.muni.cz/~yeti/download/lilo.vim
  7.  
  8.  
  9. " Setup
  10. if version >= 600
  11.   if exists("b:current_syntax")
  12.     finish
  13.   endif
  14. else
  15.   syntax clear
  16. endif
  17.  
  18. if version >= 600
  19.   command -nargs=1 SetIsk setlocal iskeyword=<args>
  20. else
  21.   command -nargs=1 SetIsk set iskeyword=<args>
  22. endif
  23. SetIsk @,48-57,.,-,_
  24. delcommand SetIsk
  25.  
  26. syn case ignore
  27.  
  28. " Base constructs
  29. syn match liloError "\S\+"
  30. syn match liloComment "#.*$"
  31. syn match liloEnviron "\$\w\+" contained
  32. syn match liloEnviron "\${[^}]\+}" contained
  33. syn match liloDecNumber "-\=\d\+" contained
  34. syn match liloHexNumber "0[xX]\x\+" contained
  35. syn match liloSpecial contained "\\\(\"\|\\\|$\)"
  36. syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron
  37. syn match liloLabel "\S\+" contained contains=liloSpecial,liloEnviron
  38. syn region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron
  39. syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString
  40.  
  41. " Path
  42. syn keyword liloOption backup boot force-backup install keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
  43. syn keyword liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
  44. syn keyword liloImageOpt path loader table nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
  45. syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
  46.  
  47. " Other
  48. syn keyword liloOption default serial nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
  49. syn keyword liloKernelOpt ramdisk nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
  50. syn keyword liloImageOpt alias label nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty
  51. syn keyword liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
  52. syn keyword liloDiskOpt set type nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
  53.  
  54. " Symbolic
  55. syn keyword liloKernelOpt vga nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
  56.  
  57. " Number
  58. syn keyword liloOption delay timeout verbose nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
  59. syn keyword liloDiskOpt sectors heads cylinders start nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
  60.  
  61. " String
  62. syn keyword liloKernelOpt append nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
  63. syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
  64.  
  65. " Hex number
  66. syn keyword liloImageOpt map-drive to nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
  67. syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
  68.  
  69. " Flag
  70. syn keyword liloOption compact fix-table ignore-table lba32 linear nowarn prompt
  71. syn keyword liloKernelOpt read-only read-write
  72. syn keyword liloImageOpt lock optional restricted single-key unsafe
  73. syn keyword liloDiskOpt change activate deactivate inaccessible reset
  74.  
  75. " Image
  76. syn keyword liloImage image other nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
  77. syn keyword liloDisk disk nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
  78. syn keyword liloChRules change-rules
  79.  
  80. " Vga keywords
  81. syn keyword liloVgaKeyword ask ext extended normal contained
  82.  
  83. " Comment followed by equal sign and ...
  84. syn match liloEqPathComment "#.*$" contained nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
  85. syn match liloEqVgaComment "#.*$" contained nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
  86. syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
  87. syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
  88. syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
  89. syn match liloEqStringComment "#.*$" contained nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
  90. syn match liloEqLabelComment "#.*$" contained nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty
  91. syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
  92.  
  93. " Equal sign followed by ...
  94. syn match liloEqPath "=" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
  95. syn match liloEqVga "=" contained nextgroup=liloVgaKeyword,liloHexNumber,liloDecNumber,liloVgaComment,liloError skipwhite skipempty
  96. syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
  97. syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
  98. syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
  99. syn match liloEqString "=" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
  100. syn match liloEqLabel "=" contained nextgroup=liloLabel,liloLabelComment,liloError skipwhite skipempty
  101. syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
  102.  
  103. " Comment followed by ...
  104. syn match liloPathComment "#.*$" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
  105. syn match liloVgaComment "#.*$" contained nextgroup=liloVgaKeyword,liloHexNumber,liloVgaComment,liloError skipwhite skipempty
  106. syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
  107. syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
  108. syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
  109. syn match liloStringComment "#.*$" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
  110. syn match liloLabelComment "#.*$" contained nextgroup=liloLabel,liloLabelComment,liloError skipwhite skipempty
  111. syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
  112.  
  113. " Define the default highlighting
  114. if version >= 508 || !exists("did_lilo_syntax_inits")
  115.   if version < 508
  116.     let did_lilo_syntax_inits = 1
  117.     command -nargs=+ HiLink hi link <args>
  118.   else
  119.     command -nargs=+ HiLink hi def link <args>
  120.   endif
  121.  
  122.   HiLink liloEqPath             liloEquals
  123.   HiLink liloEqWord             liloEquals
  124.   HiLink liloEqVga              liloEquals
  125.   HiLink liloEqDecNumber        liloEquals
  126.   HiLink liloEqHexNumber        liloEquals
  127.   HiLink liloEqNumber           liloEquals
  128.   HiLink liloEqString           liloEquals
  129.   HiLink liloEqLabel            liloEquals
  130.   HiLink liloEqAnything         liloEquals
  131.   HiLink liloEquals             Special
  132.  
  133.   HiLink liloError              Error
  134.  
  135.   HiLink liloEqPathComment      liloComment
  136.   HiLink liloEqVgaComment       liloComment
  137.   HiLink liloEqDecNumberComment liloComment
  138.   HiLink liloEqHexNumberComment liloComment
  139.   HiLink liloEqStringComment    liloComment
  140.   HiLink liloEqLabelComment     liloComment
  141.   HiLink liloEqAnythingComment  liloComment
  142.   HiLink liloPathComment        liloComment
  143.   HiLink liloVgaComment         liloComment
  144.   HiLink liloDecNumberComment   liloComment
  145.   HiLink liloHexNumberComment   liloComment
  146.   HiLink liloNumberComment      liloComment
  147.   HiLink liloStringComment      liloComment
  148.   HiLink liloLabelComment       liloComment
  149.   HiLink liloAnythingComment    liloComment
  150.   HiLink liloComment            Comment
  151.  
  152.   HiLink liloDiskOpt            liloOption
  153.   HiLink liloKernelOpt          liloOption
  154.   HiLink liloImageOpt           liloOption
  155.   HiLink liloOption             Keyword
  156.  
  157.   HiLink liloDecNumber          liloNumber
  158.   HiLink liloHexNumber          liloNumber
  159.   HiLink liloNumber             Number
  160.   HiLink liloString             String
  161.   HiLink liloPath               Constant
  162.  
  163.   HiLink liloSpecial            Special
  164.   HiLink liloLabel              Title
  165.   HiLink liloAnything           Normal
  166.   HiLink liloEnviron            Identifier
  167.   HiLink liloVgaKeyword         Identifier
  168.   HiLink liloImage              Type
  169.   HiLink liloChRules            Preproc
  170.   HiLink liloDisk               Preproc
  171.  
  172.   delcommand HiLink
  173. endif
  174.  
  175. let b:current_syntax = "lilo"
  176.