Value Required,Filldown TYPE (Service|Network|V6-Service|V6-Network)
Value Required,Filldown NAME (\S+)
Value DESCRIPTION (.+)
Value NESTED_GROUPS (\S+)
Value ANY (any)
Value HOST (((\d+\.\d+\.\d+\.\d+)|([A-Fa-f0-9:]+:+)+[A-Fa-f0-9]+))
Value HOST_RANGE_START (\d+\.\d+\.\d+\.\d+)
Value HOST_RANGE_END (\d+\.\d+\.\d+\.\d+)
Value NETWORK ((\d+\.\d+\.\d+\.\d+)|([A-Fa-f0-9:]+:+[A-Fa-f0-9:]+))
Value NETMASK ((\d+\.\d+\.\d+\.\d+)|((?:\d{1,3})))
Value PROTOCOL (\S+)
Value PORT_MATCH (eq|neq|range|lt|gt)
Value PORT ((?<!range\s)\S+)
Value PORT_RANGE_START ((?<=range\s)\S+)
Value PORT_RANGE_END (\S+)
Value ICMP_TYPE (echo|echo-reply|administratively-prohibited|unreachable|port-unreachable|redirect|router-advertisement|router-solicitation|packet-too-big|time-exceeded|ttl-exceeded|parameter-problem)
Value ICMP6_TYPE (dhaad-reply|dhaad-request|echo-reply|echo-request|mld-query|mld-reduction|mld-report|mld-v2-report|mpd-advertisement|mpd-solicitation|nd-na|nd-ns|packet-too-big|parameter-problem|redirect|router-advertisement|router-renumbering|router-solicitation|time-exceeded|unreachable)

Start
  ^(Service|Network|V6-Service|V6-Network) -> Continue.Clearall
  ^${TYPE}\s+object\s+group\s+${NAME}\s*$$ -> Record
  ^\s+Description\s+${DESCRIPTION}$$ -> Record
  ^\s+group-object\s+${NESTED_GROUPS}\s*$$ -> Record
  ^\s+(host\s+${HOST}|range\s+${HOST_RANGE_START}\s+${HOST_RANGE_END}|${ANY}|${NETWORK}\s*/?${NETMASK})\s*$$ -> Record
  ^\s+icmp\s+(${ICMP_TYPE}|${ICMP6_TYPE})\s*$$ -> Record
  ^\s+${PROTOCOL}\s+${PORT_MATCH}\s+(${PORT_RANGE_START}\s+${PORT_RANGE_END}|${PORT})\s*$$ -> Record
  ^\s+${PROTOCOL}\s*$$ -> Record
  ^\s*$$
  ^. -> Error

EOF
