citrus 2.3.7 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +0,0 @@
1
- # The grammars in this file conform to the ABNF given in Appendix A of RFC 3986
2
- # Uniform Resource Identifier (URI): Generic Syntax.
3
- #
4
- # See http://tools.ietf.org/html/rfc3986#appendix-A for more information.
5
-
6
- require 'ipv4address'
7
- require 'ipv6address'
8
-
9
- grammar IPAddress
10
- include IPv4Address
11
- include IPv6Address
12
-
13
- rule IPaddress
14
- IPv4address | IPv6address
15
- end
16
- end
@@ -1,26 +0,0 @@
1
- grammar IPv4Address
2
- # A host identified by an IPv4 literal address is represented in
3
- # dotted-decimal notation (a sequence of four decimal numbers in the
4
- # range 0 to 255, separated by "."), as described in [RFC1123] by
5
- # reference to [RFC0952]. Note that other forms of dotted notation may
6
- # be interpreted on some platforms, as described in Section 7.4, but
7
- # only the dotted-decimal form of four octets is allowed by this
8
- # grammar.
9
- rule IPv4address
10
- (dec-octet '.' dec-octet '.' dec-octet '.' dec-octet) {
11
- def version; 4 end
12
- }
13
- end
14
-
15
- rule dec-octet
16
- '25' [0-5] # 250-255
17
- | '2' [0-4] DIGIT # 200-249
18
- | '1' DIGIT DIGIT # 100-199
19
- | [1-9] DIGIT # 10-99
20
- | DIGIT # 0-9
21
- end
22
-
23
- rule DIGIT
24
- [0-9]
25
- end
26
- end
@@ -1,43 +0,0 @@
1
- require 'ipv4address'
2
-
3
- grammar IPv6Address
4
- include IPv4Address
5
-
6
- # A 128-bit IPv6 address is divided into eight 16-bit pieces. Each
7
- # piece is represented numerically in case-insensitive hexadecimal,
8
- # using one to four hexadecimal digits (leading zeroes are permitted).
9
- # The eight encoded pieces are given most-significant first, separated
10
- # by colon characters. Optionally, the least-significant two pieces
11
- # may instead be represented in IPv4 address textual format. A
12
- # sequence of one or more consecutive zero-valued 16-bit pieces within
13
- # the address may be elided, omitting all their digits and leaving
14
- # exactly two consecutive colons in their place to mark the elision.
15
- rule IPv6address
16
- ( (h16 ":")6*6 ls32
17
- | "::" (h16 ":")5*5 ls32
18
- | h16 ? "::" (h16 ":")4*4 ls32
19
- | (h16 (":" h16)*1)? "::" (h16 ":")3*3 ls32
20
- | (h16 (":" h16)*2)? "::" (h16 ":")2*2 ls32
21
- | (h16 (":" h16)*3)? "::" h16 ":" ls32
22
- | (h16 (":" h16)*4)? "::" ls32
23
- | (h16 (":" h16)*5)? "::" h16
24
- | (h16 (":" h16)*6)? "::"
25
- ) {
26
- def version; 6 end
27
- }
28
- end
29
-
30
- # 16-bit address represented in hexadecimal.
31
- rule h16
32
- HEXDIG 1*4
33
- end
34
-
35
- # Least-significant 32 bits of address.
36
- rule ls32
37
- (h16 ":" h16) | IPv4address
38
- end
39
-
40
- rule HEXDIG
41
- DIGIT | [a-fA-F] # Hexadecimal should be case-insensitive.
42
- end
43
- end