Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (24 sloc) 0.789 kB
grammar IPv4Address
# A host identified by an IPv4 literal address is represented in
# dotted-decimal notation (a sequence of four decimal numbers in the
# range 0 to 255, separated by "."), as described in [RFC1123] by
# reference to [RFC0952]. Note that other forms of dotted notation may
# be interpreted on some platforms, as described in Section 7.4, but
# only the dotted-decimal form of four octets is allowed by this
# grammar.
rule IPv4address
(dec-octet '.' dec-octet '.' dec-octet '.' dec-octet) {
def version; 4 end
}
end
rule dec-octet
'25' [0-5] # 250-255
| '2' [0-4] DIGIT # 200-249
| '1' DIGIT DIGIT # 100-199
| [1-9] DIGIT # 10-99
| DIGIT # 0-9
end
rule DIGIT
[0-9]
end
end
Jump to Line
Something went wrong with that request. Please try again.