-
Notifications
You must be signed in to change notification settings - Fork 0
/
ibdiagnet-lst.ebnf
71 lines (55 loc) · 1.51 KB
/
ibdiagnet-lst.ebnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
ibdiagnet_lst = (header <EOL> <EOL>)? links
header = <COMMENT>
version
command
timestamp
version = <'# Running version: '> versions <EOL>
versions = (version_item <','?>)+
version_item = <'"'> version_name <SPACE> version_value <'"'>
version_name = #'[^ \"]+'
version_value = #'[^ \"]+'
command = <'# Running command: '> STRING <EOL>
timestamp = <'# Timestamp: '> STRING <EOL>
links = link+
link = from <SPACE> to <SPACE> conn <EOL>
from = node
to = node
node = <'{'> <SPACE>
type <SPACE>
ports <SPACE>
system_guid <SPACE>
guid <SPACE>
port_guid <SPACE>
vendor_id <SPACE>
device_id <SPACE>
revision <SPACE>
name <SPACE>
lid <SPACE>
port <SPACE>
<'}'>
type = WORD
ports = <'Ports:'> HEX
system_guid = <'SystemGUID:'> HEX
guid = <'NodeGUID:'> HEX
port_guid = <'PortGUID:'> HEX
vendor_id = <'VenID:'> HEX
device_id = <'DevID:'> HEX
revision = <'Rev:'> HEX
lid = <'LID:'> HEX
port = <'PN:'> HEX
name = <'{'> #'[^\}]+' <'}'>
conn = phy <SPACE>
log <SPACE>
speed
phy = <'PHY='> (WORD | '')
log = <'LOG='> WORD
speed = <'SPD='> NUMBER
QUOTED_TUPLE = <'"'> #'[^ \"]+' <SPACE> #'[^ \"]+' <'"'>
COMMENT = <'#'> STRING? <EOL>
HEX = #'(0x)?[0-9a-fA-F]+'
SPACE = #'[ \t]+'
WORD = #'[^ \t]+'
NUMBER = #'[0-9]+(\.[0-9]+)?'
STRING = <SPACE*> #'[^\r\n]*[^\r\n \t]' <SPACE*>
<NOT_EOL> = #'[^\r\n]+'
<EOL> = #'(?:\r\n|\r|\n)'