|
24 | 24 | WhspChar = [ \t\f]
|
25 | 25 | WhiteSpace = {WhspChar}+
|
26 | 26 | EOL = ([\n\r] | \r\n)
|
27 |
| - |
28 |
| -/* |
29 |
| - * See org.opensolaris.opengrok.util.StringUtils FNAME_CHARS_PAT where the |
30 |
| - * following regex is mirrored. |
31 |
| - */ |
32 |
| -FNameChar = [a-zA-Z0-9_\-\.] |
33 |
| - |
34 |
| -Path = "/"? [a-zA-Z]{FNameChar}* ("/" [a-zA-Z]{FNameChar}*[a-zA-Z0-9])+ |
35 |
| - |
36 |
| -/* |
37 |
| - * From RFC-3986. See |
38 |
| - * org.opensolaris.opengrok.util.StringUtils URI_CHARS_PAT where a regex |
39 |
| - * in accordance with the following definition is maintained. |
40 |
| - * |
41 |
| - * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] |
42 |
| - */ |
43 |
| -BrowseableURI = {BrowseableURI_scheme} {URI_tail} |
44 |
| -URI_tail = ":" {URI_hier_part} ("?" {URI_query})? ("#" {URI_fragment})? |
45 |
| - |
46 |
| -/* |
47 |
| - * hier-part = "//" authority path-abempty |
48 |
| - * / path-absolute |
49 |
| - * / path-rootless |
50 |
| - * / path-empty ; N.b. not used in OpenGrok |
51 |
| - */ |
52 |
| -URI_hier_part = ("//" {URI_authority} {URI_path_abempty} | |
53 |
| - "/" ({URI_path_absolute} | {URI_path_rootless})) |
54 |
| - |
55 |
| -/* |
56 |
| - * scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) |
57 |
| - */ |
58 |
| -BrowseableURI_scheme = ([Hh][Tt][Tt][Pp][Ss]? | [Ff][Tt][Pp]) |
59 |
| - |
60 |
| -/* |
61 |
| - * authority = [ userinfo "@" ] host [ ":" port ] |
62 |
| - * userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) |
63 |
| - * host = IP-literal / IPv4address / reg-name |
64 |
| - * port = *DIGIT |
65 |
| - */ |
66 |
| -URI_authority = ({URI_userinfo} "@")? {URI_host} (":" {URI_port})? |
67 |
| -URI_userinfo = ({URI_unreserved} | {URI_pct_encoded} | {URI_sub_delims} | |
68 |
| - ":")* |
69 |
| -URI_host = ({URI_IP_literal} | {URI_IPv4address} | {URI_reg_name}) |
70 |
| -URI_port = {DIGIT}* |
71 |
| - |
72 |
| -/* |
73 |
| - * IP-literal = "[" ( IPv6address / IPvFuture ) "]" |
74 |
| - */ |
75 |
| -URI_IP_literal = "[" ({URI_IPv6address} | {URI_IPvFuture}) "]" |
76 |
| - |
77 |
| -/* |
78 |
| - * IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" ) |
79 |
| - */ |
80 |
| -URI_IPvFuture = "v" {HEXDIG}+ "." ({URI_unreserved} | {URI_sub_delims} | |
81 |
| - ":")+ |
82 |
| - |
83 |
| -/* |
84 |
| - * IPv6address = 6( h16 ":" ) ls32 |
85 |
| - * / "::" 5( h16 ":" ) ls32 |
86 |
| - * / [ h16 ] "::" 4( h16 ":" ) ls32 |
87 |
| - * / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 |
88 |
| - * / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 |
89 |
| - * / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 |
90 |
| - * / [ *4( h16 ":" ) h16 ] "::" ls32 |
91 |
| - * / [ *5( h16 ":" ) h16 ] "::" h16 |
92 |
| - * / [ *6( h16 ":" ) h16 ] "::" |
93 |
| - */ |
94 |
| -URI_IPv6address = ( |
95 |
| - ( {URI_h16} ":" ){6} {URI_ls32} | |
96 |
| - "::" ({URI_h16} ":"){5} {URI_ls32} | |
97 |
| - ({URI_h16})? "::" ({URI_h16} ":"){4} {URI_ls32} | |
98 |
| - (({URI_h16} ":"){0,1} {URI_h16})? "::" ({URI_h16} ":"){3} {URI_ls32} | |
99 |
| - (({URI_h16} ":"){0,2} {URI_h16})? "::" ({URI_h16} ":"){2} {URI_ls32} | |
100 |
| - (({URI_h16} ":"){0,3} {URI_h16})? "::" {URI_h16} ":" {URI_ls32} | |
101 |
| - (({URI_h16} ":"){0,4} {URI_h16})? "::" {URI_ls32} | |
102 |
| - (({URI_h16} ":"){0,5} {URI_h16})? "::" {URI_h16} | |
103 |
| - (({URI_h16} ":"){0,6} {URI_h16})? "::" |
104 |
| - ) |
105 |
| -/* |
106 |
| - * h16 = 1*4HEXDIG |
107 |
| - * ls32 = ( h16 ":" h16 ) / IPv4address |
108 |
| - * IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet |
109 |
| - */ |
110 |
| -URI_h16 = {HEXDIG}{1,4} |
111 |
| -URI_ls32 = ({URI_h16} ":" {URI_h16} | {URI_IPv4address}) |
112 |
| -URI_IPv4address = ({URI_dec_octet} "." {URI_dec_octet} "." {URI_dec_octet} |
113 |
| - "." {URI_dec_octet}) |
114 |
| - |
115 |
| -/* |
116 |
| - * dec-octet = DIGIT ; 0-9 |
117 |
| - * / %x31-39 DIGIT ; 10-99 |
118 |
| - * / "1" 2DIGIT ; 100-199 |
119 |
| - * / "2" %x30-34 DIGIT ; 200-249 |
120 |
| - * / "25" %x30-35 ; 250-255 |
121 |
| - */ |
122 |
| -URI_dec_octet = ({DIGIT} | // 0-9 |
123 |
| - [\u{31}-\u{39}] {DIGIT} | // 10-99 |
124 |
| - "1" {DIGIT}{DIGIT} | // 100-199 |
125 |
| - "2" [\u{30}-\u{34}] {DIGIT} | // 200-249 |
126 |
| - "25" [\u{30}-\u{35}]) // 250-255 |
127 |
| - |
128 |
| -/* |
129 |
| - * reg-name = *( unreserved / pct-encoded / sub-delims ) |
130 |
| - */ |
131 |
| -URI_reg_name = ({URI_unreserved} | {URI_pct_encoded} | {URI_sub_delims})* |
132 |
| - |
133 |
| -/* |
134 |
| - * path = path-abempty ; begins with "/" or is empty |
135 |
| - * / path-absolute ; begins with "/" but not "//" |
136 |
| - * / path-noscheme ; begins with a non-colon segment |
137 |
| - * / path-rootless ; begins with a segment |
138 |
| - * / path-empty ; zero characters |
139 |
| - * |
140 |
| - * path-abempty = *( "/" segment ) |
141 |
| - * path-absolute = "/" [ segment-nz *( "/" segment ) ] |
142 |
| - * path-noscheme = segment-nz-nc *( "/" segment ) ; N.b. not used in OpenGrok |
143 |
| - * path-rootless = segment-nz *( "/" segment ) |
144 |
| - * path-empty = 0<pchar> ; N.b. not used in OpenGrok |
145 |
| - */ |
146 |
| -URI_path_abempty = ("/" {URI_segment})* |
147 |
| -URI_path_absolute = "/" ({URI_segment_nz} ("/" {URI_segment})*)? |
148 |
| -URI_path_rootless = {URI_segment_nz} ("/" {URI_segment})* |
149 |
| - |
150 |
| -/* |
151 |
| - * segment = *pchar |
152 |
| - * segment-nz = 1*pchar |
153 |
| - * segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" ) |
154 |
| - * ; non-zero-length segment without any colon ":" |
155 |
| - * ; N.b. not used in OpenGrok |
156 |
| - * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" |
157 |
| - */ |
158 |
| -URI_segment = {URI_pchar}* |
159 |
| -URI_segment_nz = {URI_pchar}+ |
160 |
| -URI_pchar = ({URI_unreserved} | {URI_pct_encoded} | {URI_sub_delims} | |
161 |
| - [:@]) |
162 |
| - |
163 |
| -/* |
164 |
| - * query = *( pchar / "/" / "?" ) |
165 |
| - */ |
166 |
| -URI_query = ({URI_pchar} | [/\?])* |
167 |
| - |
168 |
| -/* |
169 |
| - * fragment = *( pchar / "/" / "?" ) |
170 |
| - */ |
171 |
| -URI_fragment = ({URI_pchar} | [/\?])* |
172 |
| - |
173 |
| -/* |
174 |
| - * pct-encoded = "%" HEXDIG HEXDIG |
175 |
| - */ |
176 |
| -URI_pct_encoded = "%" {HEXDIG} {HEXDIG} |
177 |
| - |
178 |
| -/* |
179 |
| - * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" |
180 |
| - * reserved = gen-delims / sub-delims ; N.b. not used in OpenGrok |
181 |
| - * gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" |
182 |
| - * ; N.b. not used in OpenGrok |
183 |
| - * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" |
184 |
| - * / "*" / "+" / "," / ";" / "=" |
185 |
| - */ |
186 |
| -URI_unreserved = ({ASCII_ALPHA} | {DIGIT} | [\-\._~]) |
187 |
| -URI_sub_delims = [\!\$&\'\(\)\*\+,;=] |
188 |
| - |
189 |
| -ASCII_ALPHA = [A-Za-z] |
190 |
| -HEXDIG = [0-9A-Fa-f] |
191 |
| -DIGIT = [0-9] |
0 commit comments