2 " Language: setserial(8) configuration file
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2006-04-19
6 if exists("b:current_syntax")
13 syn match setserialBegin display '^'
14 \ nextgroup=setserialDevice,setserialComment
17 syn match setserialDevice contained display '\%(/[^ \t/]*\)\+'
18 \ nextgroup=setserialParameter skipwhite
20 syn keyword setserialParameter contained port irq baud_base divisor
21 \ close_delay closing_wait rx_trigger
22 \ tx_trigger flow_off flow_on rx_timeout
23 \ nextgroup=setserialNumber skipwhite
25 syn keyword setserialParameter contained uart
26 \ nextgroup=setserialUARTType skipwhite
28 syn keyword setserialParameter contained autoconfig auto_irq skip_test
29 \ spd_hi spd_vhi spd_shi spd_warp spd_cust
30 \ spd_normal sak fourport session_lockout
31 \ pgrp_lockout hup_notify split_termios
32 \ callout_nohup low_latency
33 \ nextgroup=setserialParameter skipwhite
35 syn match setserialParameter contained display
36 \ '\^\%(auto_irq\|skip_test\|sak\|fourport\)'
37 \ contains=setserialNegation
38 \ nextgroup=setserialParameter skipwhite
40 syn match setserialParameter contained display
41 \ '\^\%(session_lockout\|pgrp_lockout\)'
42 \ contains=setserialNegation
43 \ nextgroup=setserialParameter skipwhite
45 syn match setserialParameter contained display
46 \ '\^\%(hup_notify\|split_termios\)'
47 \ contains=setserialNegation
48 \ nextgroup=setserialParameter skipwhite
50 syn match setserialParameter contained display
51 \ '\^\%(callout_nohup\|low_latency\)'
52 \ contains=setserialNegation
53 \ nextgroup=setserialParameter skipwhite
55 syn keyword setserialParameter contained set_multiport
56 \ nextgroup=setserialMultiport skipwhite
58 syn match setserialNumber contained display '\<\d\+\>'
59 \ nextgroup=setserialParameter skipwhite
60 syn match setserialNumber contained display '0x\x\+'
61 \ nextgroup=setserialParameter skipwhite
63 syn keyword setserialUARTType contained none
65 syn match setserialUARTType contained display
66 \ '8250\|16[4789]50\|16550A\=\|16650\%(V2\)\='
67 \ nextgroup=setserialParameter skipwhite
69 syn match setserialUARTType contained display '166[59]4'
70 \ nextgroup=setserialParameter skipwhite
72 syn match setserialNegation contained display '\^'
74 syn match setserialMultiport contained '\<port\d\+\>'
75 \ nextgroup=setserialPort skipwhite
77 syn match setserialPort contained display '\<\d\+\>'
78 \ nextgroup=setserialMask skipwhite
79 syn match setserialPort contained display '0x\x\+'
80 \ nextgroup=setserialMask skipwhite
82 syn match setserialMask contained '\<mask\d\+\>'
83 \ nextgroup=setserialBitMask skipwhite
85 syn match setserialBitMask contained display '\<\d\+\>'
86 \ nextgroup=setserialMatch skipwhite
87 syn match setserialBitMask contained display '0x\x\+'
88 \ nextgroup=setserialMatch skipwhite
90 syn match setserialMatch contained '\<match\d\+\>'
91 \ nextgroup=setserialMatchBits skipwhite
93 syn match setserialMatchBits contained display '\<\d\+\>'
94 \ nextgroup=setserialMultiport skipwhite
95 syn match setserialMatchBits contained display '0x\x\+'
96 \ nextgroup=setserialMultiport skipwhite
98 syn keyword setserialTodo contained TODO FIXME XXX NOTE
100 syn region setserialComment display oneline start='^\s*#' end='$'
101 \ contains=setserialTodo,@Spell
103 hi def link setserialTodo Todo
104 hi def link setserialComment Comment
105 hi def link setserialDevice Normal
106 hi def link setserialParameter Identifier
107 hi def link setserialNumber Number
108 hi def link setserialUARTType Type
109 hi def link setserialNegation Operator
110 hi def link setserialMultiport Type
111 hi def link setserialPort setserialNumber
112 hi def link setserialMask Type
113 hi def link setserialBitMask setserialNumber
114 hi def link setserialMatch Type
115 hi def link setserialMatchBits setserialNumber
117 let b:current_syntax = "setserial"
119 let &cpo = s:cpo_save