Value List NEIGHBOR_NAME (\S+)
Value LOCAL_INTERFACE (\S+)
Value List NEIGHBOR_INTERFACE (\S+)
Value CHASSIS_ID (([0-9a-f]{2}[:-]){5}([0-9a-f]{2}))

Start
  ^System\s+capability\s+legend
  ^\S+\s*-
  ^\s*Port\s+Device\s+ID\s+Port\s+ID\s+System\s+Name\s+Capabilities\s+TTL -> Begin
  ^\s*$$
  ^. -> Error

Begin
  ^\S+ -> Continue.Record
  ^${LOCAL_INTERFACE}\s+${CHASSIS_ID}\s+${NEIGHBOR_INTERFACE}\s+(${NEIGHBOR_NAME})?\s+\S+\s+\d+
  ^\s{28}${NEIGHBOR_INTERFACE}\s*$$
  ^\s{42}${NEIGHBOR_NAME}\s*$$
  ^\s{28}${NEIGHBOR_INTERFACE}\s+${NEIGHBOR_NAME}\s*$$
  ^-+
  ^\s*$$
  ^. -> Error
