xinetd.vim 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. " Vim syntax file
  2. " Language: xinetd.conf(5) configuration file
  3. " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
  4. " Latest Revision: 2006-04-19
  5. if exists("b:current_syntax")
  6. finish
  7. endif
  8. let s:cpo_save = &cpo
  9. set cpo&vim
  10. syn keyword xinetdTodo contained TODO FIXME XXX NOTE
  11. syn region xinetdComment display oneline start='^\s*#' end='$'
  12. \ contains=xinetdTodo,@Spell
  13. syn match xinetdService '^\s*service\>'
  14. \ nextgroup=xinetdServiceName skipwhite
  15. syn match xinetdServiceName contained '\S\+'
  16. \ nextgroup=xinetdServiceGroup skipwhite skipnl
  17. syn match xinetdDefaults '^\s*defaults'
  18. \ nextgroup=xinetdServiceGroup skipwhite skipnl
  19. syn region xinetdServiceGroup contained transparent
  20. \ matchgroup=xinetdServiceGroupD start='{'
  21. \ matchgroup=xinetdServiceGroupD end='}'
  22. \ contains=xinetdAttribute,xinetdReqAttribute,
  23. \ xinetdDisable
  24. syn keyword xinetdReqAttribute contained user server protocol
  25. \ nextgroup=xinetdStringEq skipwhite
  26. syn keyword xinetdAttribute contained id group bind
  27. \ interface
  28. \ nextgroup=xinetdStringEq skipwhite
  29. syn match xinetdStringEq contained display '='
  30. \ nextgroup=xinetdString skipwhite
  31. syn match xinetdString contained display '\S\+'
  32. syn keyword xinetdAttribute contained type nextgroup=xinetdTypeEq skipwhite
  33. syn match xinetdTypeEq contained display '='
  34. \ nextgroup=xinetdType skipwhite
  35. syn keyword xinetdType contained RPC INTERNAL TCPMUX TCPMUXPLUS
  36. \ UNLISTED
  37. \ nextgroup=xinetdType skipwhite
  38. syn keyword xinetdAttribute contained flags
  39. \ nextgroup=xinetdFlagsEq skipwhite
  40. syn cluster xinetdFlagsC contains=xinetdFlags,xinetdDeprFlags
  41. syn match xinetdFlagsEq contained display '='
  42. \ nextgroup=@xinetdFlagsC skipwhite
  43. syn keyword xinetdFlags contained INTERCEPT NORETRY IDONLY NAMEINARGS
  44. \ NODELAY KEEPALIVE NOLIBWRAP SENSOR IPv4 IPv6
  45. \ nextgroup=@xinetdFlagsC skipwhite
  46. syn keyword xinetdDeprFlags contained REUSE nextgroup=xinetdFlagsC skipwhite
  47. syn keyword xinetdDisable contained disable
  48. \ nextgroup=xinetdBooleanEq skipwhite
  49. syn match xinetdBooleanEq contained display '='
  50. \ nextgroup=xinetdBoolean skipwhite
  51. syn keyword xinetdBoolean contained yes no
  52. syn keyword xinetdReqAttribute contained socket_type
  53. \ nextgroup=xinetdSocketTypeEq skipwhite
  54. syn match xinetdSocketTypeEq contained display '='
  55. \ nextgroup=xinetdSocketType skipwhite
  56. syn keyword xinetdSocketType contained stream dgram raw seqpacket
  57. syn keyword xinetdReqAttribute contained wait
  58. \ nextgroup=xinetdBooleanEq skipwhite
  59. syn keyword xinetdAttribute contained groups mdns
  60. \ nextgroup=xinetdBooleanEq skipwhite
  61. syn keyword xinetdAttribute contained instances per_source rlimit_cpu
  62. \ rlimit_data rlimit_rss rlimit_stack
  63. \ nextgroup=xinetdUNumberEq skipwhite
  64. syn match xinetdUNumberEq contained display '='
  65. \ nextgroup=xinetdUnlimited,xinetdNumber
  66. \ skipwhite
  67. syn keyword xinetdUnlimited contained UNLIMITED
  68. syn match xinetdNumber contained display '\<\d\+\>'
  69. syn keyword xinetdAttribute contained nice
  70. \ nextgroup=xinetdSignedNumEq skipwhite
  71. syn match xinetdSignedNumEq contained display '='
  72. \ nextgroup=xinetdSignedNumber skipwhite
  73. syn match xinetdSignedNumber contained display '[+-]\=\d\+\>'
  74. syn keyword xinetdAttribute contained server_args
  75. \ enabled
  76. \ nextgroup=xinetdStringsEq skipwhite
  77. syn match xinetdStringsEq contained display '='
  78. \ nextgroup=xinetdStrings skipwhite
  79. syn match xinetdStrings contained display '\S\+'
  80. \ nextgroup=xinetdStrings skipwhite
  81. syn keyword xinetdAttribute contained only_from no_access passenv
  82. \ nextgroup=xinetdStringsAdvEq skipwhite
  83. syn match xinetdStringsAdvEq contained display '[+-]\=='
  84. \ nextgroup=xinetdStrings skipwhite
  85. syn keyword xinetdAttribute contained access_times
  86. \ nextgroup=xinetdTimeRangesEq skipwhite
  87. syn match xinetdTimeRangesEq contained display '='
  88. \ nextgroup=xinetdTimeRanges skipwhite
  89. syn match xinetdTimeRanges contained display
  90. \ '\%(0?\d\|1\d\|2[0-3]\):\%(0?\d\|[1-5]\d\)-\%(0?\d\|1\d\|2[0-3]\):\%(0?\d\|[1-5]\d\)'
  91. \ nextgroup=xinetdTimeRanges skipwhite
  92. syn keyword xinetdAttribute contained log_type nextgroup=xinetdLogTypeEq
  93. \ skipwhite
  94. syn match xinetdLogTypeEq contained display '='
  95. \ nextgroup=xinetdLogType skipwhite
  96. syn keyword xinetdLogType contained SYSLOG nextgroup=xinetdSyslogType
  97. \ skipwhite
  98. syn keyword xinetdLogType contained FILE nextgroup=xinetdLogFile skipwhite
  99. syn keyword xinetdSyslogType contained daemon auth authpriv user mail lpr
  100. \ news uucp ftp local0 local1 local2 local3
  101. \ local4 local5 local6 local7
  102. \ nextgroup=xinetdSyslogLevel skipwhite
  103. syn keyword xinetdSyslogLevel contained emerg alert crit err warning notice
  104. \ info debug
  105. syn match xinetdLogFile contained display '\S\+'
  106. \ nextgroup=xinetdLogSoftLimit skipwhite
  107. syn match xinetdLogSoftLimit contained display '\<\d\+\>'
  108. \ nextgroup=xinetdLogHardLimit skipwhite
  109. syn match xinetdLogHardLimit contained display '\<\d\+\>'
  110. syn keyword xinetdAttribute contained log_on_success
  111. \ nextgroup=xinetdLogSuccessEq skipwhite
  112. syn match xinetdLogSuccessEq contained display '[+-]\=='
  113. \ nextgroup=xinetdLogSuccess skipwhite
  114. syn keyword xinetdLogSuccess contained PID HOST USERID EXIT DURATION TRAFFIC
  115. \ nextgroup=xinetdLogSuccess skipwhite
  116. syn keyword xinetdAttribute contained log_on_failure
  117. \ nextgroup=xinetdLogFailureEq skipwhite
  118. syn match xinetdLogFailureEq contained display '[+-]\=='
  119. \ nextgroup=xinetdLogFailure skipwhite
  120. syn keyword xinetdLogFailure contained HOST USERID ATTEMPT
  121. \ nextgroup=xinetdLogFailure skipwhite
  122. syn keyword xinetdReqAttribute contained rpc_version
  123. \ nextgroup=xinetdRPCVersionEq skipwhite
  124. syn match xinetdRPCVersionEq contained display '='
  125. \ nextgroup=xinetdRPCVersion skipwhite
  126. syn match xinetdRPCVersion contained display '\d\+\%(-\d\+\)\=\>'
  127. syn keyword xinetdReqAttribute contained rpc_number port
  128. \ nextgroup=xinetdNumberEq skipwhite
  129. syn match xinetdNumberEq contained display '='
  130. \ nextgroup=xinetdNumber skipwhite
  131. syn keyword xinetdAttribute contained env nextgroup=xinetdEnvEq skipwhite
  132. syn match xinetdEnvEq contained display '+\=='
  133. \ nextgroup=xinetdEnvName skipwhite
  134. syn match xinetdEnvName contained display '[^=]\+'
  135. \ nextgroup=xinetdEnvNameEq
  136. syn match xinetdEnvNameEq contained display '=' nextgroup=xinetdEnvValue
  137. syn match xinetdEnvValue contained display '\S\+'
  138. \ nextgroup=xinetdEnvName skipwhite
  139. syn keyword xinetdAttribute contained banner banner_success banner_failure
  140. \ nextgroup=xinetdPathEq skipwhite
  141. syn keyword xinetdPPAttribute include includedir
  142. \ nextgroup=xinetdPath skipwhite
  143. syn match xinetdPathEq contained display '='
  144. \ nextgroup=xinetdPath skipwhite
  145. syn match xinetdPath contained display '\S\+'
  146. syn keyword xinetdAttribute contained redirect nextgroup=xinetdRedirectEq
  147. \ skipwhite
  148. syn match xinetdRedirectEq contained display '='
  149. \ nextgroup=xinetdRedirectIP skipwhite
  150. syn match xinetdRedirectIP contained display '\S\+'
  151. \ nextgroup=xinetdNumber skipwhite
  152. syn keyword xinetdAttribute contained cps nextgroup=xinetdCPSEq skipwhite
  153. syn match xinetdCPSEq contained display '='
  154. \ nextgroup=xinetdCPS skipwhite
  155. syn match xinetdCPS contained display '\<\d\+\>'
  156. \ nextgroup=xinetdNumber skipwhite
  157. syn keyword xinetdAttribute contained max_load nextgroup=xinetdFloatEq
  158. \ skipwhite
  159. syn match xinetdFloatEq contained display '='
  160. \ nextgroup=xinetdFloat skipwhite
  161. syn match xinetdFloat contained display '\d\+\.\d*\|\.\d\+'
  162. syn keyword xinetdAttribute contained umask nextgroup=xinetdOctalEq
  163. \ skipwhite
  164. syn match xinetdOctalEq contained display '='
  165. \ nextgroup=xinetdOctal,xinetdOctalError
  166. \ skipwhite
  167. syn match xinetdOctal contained display '\<0\o\+\>'
  168. \ contains=xinetdOctalZero
  169. syn match xinetdOctalZero contained display '\<0'
  170. syn match xinetdOctalError contained display '\<0\o*[89]\d*\>'
  171. syn keyword xinetdAttribute contained rlimit_as nextgroup=xinetdASEq
  172. \ skipwhite
  173. syn match xinetdASEq contained display '='
  174. \ nextgroup=xinetdAS,xinetdUnlimited
  175. \ skipwhite
  176. syn match xinetdAS contained display '\d\+' nextgroup=xinetdASMult
  177. syn match xinetdASMult contained display '[KM]'
  178. syn keyword xinetdAttribute contained deny_time nextgroup=xinetdDenyTimeEq
  179. \ skipwhite
  180. syn match xinetdDenyTimeEq contained display '='
  181. \ nextgroup=xinetdDenyTime,xinetdNumber
  182. \ skipwhite
  183. syn keyword xinetdDenyTime contained FOREVER NEVER
  184. hi def link xinetdTodo Todo
  185. hi def link xinetdComment Comment
  186. hi def link xinetdService Keyword
  187. hi def link xinetdServiceName String
  188. hi def link xinetdDefaults Keyword
  189. hi def link xinetdServiceGroupD Delimiter
  190. hi def link xinetdReqAttribute Keyword
  191. hi def link xinetdAttribute Type
  192. hi def link xinetdEq Operator
  193. hi def link xinetdStringEq xinetdEq
  194. hi def link xinetdString String
  195. hi def link xinetdTypeEq xinetdEq
  196. hi def link xinetdType Identifier
  197. hi def link xinetdFlagsEq xinetdEq
  198. hi def link xinetdFlags xinetdType
  199. hi def link xinetdDeprFlags WarningMsg
  200. hi def link xinetdDisable Special
  201. hi def link xinetdBooleanEq xinetdEq
  202. hi def link xinetdBoolean Boolean
  203. hi def link xinetdSocketTypeEq xinetdEq
  204. hi def link xinetdSocketType xinetdType
  205. hi def link xinetdUNumberEq xinetdEq
  206. hi def link xinetdUnlimited Define
  207. hi def link xinetdNumber Number
  208. hi def link xinetdSignedNumEq xinetdEq
  209. hi def link xinetdSignedNumber xinetdNumber
  210. hi def link xinetdStringsEq xinetdEq
  211. hi def link xinetdStrings xinetdString
  212. hi def link xinetdStringsAdvEq xinetdEq
  213. hi def link xinetdTimeRangesEq xinetdEq
  214. hi def link xinetdTimeRanges Number
  215. hi def link xinetdLogTypeEq xinetdEq
  216. hi def link xinetdLogType Keyword
  217. hi def link xinetdSyslogType xinetdType
  218. hi def link xinetdSyslogLevel Number
  219. hi def link xinetdLogFile xinetdPath
  220. hi def link xinetdLogSoftLimit xinetdNumber
  221. hi def link xinetdLogHardLimit xinetdNumber
  222. hi def link xinetdLogSuccessEq xinetdEq
  223. hi def link xinetdLogSuccess xinetdType
  224. hi def link xinetdLogFailureEq xinetdEq
  225. hi def link xinetdLogFailure xinetdType
  226. hi def link xinetdRPCVersionEq xinetdEq
  227. hi def link xinetdRPCVersion xinetdNumber
  228. hi def link xinetdNumberEq xinetdEq
  229. hi def link xinetdEnvEq xinetdEq
  230. hi def link xinetdEnvName Identifier
  231. hi def link xinetdEnvNameEq xinetdEq
  232. hi def link xinetdEnvValue String
  233. hi def link xinetdPPAttribute PreProc
  234. hi def link xinetdPathEq xinetdEq
  235. hi def link xinetdPath String
  236. hi def link xinetdRedirectEq xinetdEq
  237. hi def link xinetdRedirectIP String
  238. hi def link xinetdCPSEq xinetdEq
  239. hi def link xinetdCPS xinetdNumber
  240. hi def link xinetdFloatEq xinetdEq
  241. hi def link xinetdFloat xinetdNumber
  242. hi def link xinetdOctalEq xinetdEq
  243. hi def link xinetdOctal xinetdNumber
  244. hi def link xinetdOctalZero PreProc
  245. hi def link xinetdOctalError Error
  246. hi def link xinetdASEq xinetdEq
  247. hi def link xinetdAS xinetdNumber
  248. hi def link xinetdASMult PreProc
  249. hi def link xinetdDenyTimeEq xinetdEq
  250. hi def link xinetdDenyTime PreProc
  251. let b:current_syntax = "xinetd"
  252. let &cpo = s:cpo_save
  253. unlet s:cpo_save