grammar Grammar::URI::RFC1738 { # URL schemeparts for ip-based protocols token ip-schemepart { '//' [ '/' ]? } token login { [ [ ':' ]? '@' ]? } token hostport { [ ':' ]? } token host { | } token hostname { [ '.' ]* } token domainlabel { | [ [ | '-' ]* ] } token toplabel { | [ [ | '-' ]* ] } token alphadigit { | } token hostnumber { '.' '.' '.' } token port { } token user { [ | ';' | '?' | '&' | '=' ]* } token password { [ | ';' | '?' | '&' | '=' ]* } token urlpath { * } # FTP token ftpurl { 'ftp://' [ '/' [ ';type=' ]? ]? } token fpath { [ '/' ]* } token fsegment { [ | '?' | ':' | '@' | '&' | '=' ]* } token ftyptype { 'A' | 'I' | 'D' | 'a' | 'i' | 'd' } # FILE token fileurl { 'file://' [ | 'localhost' ]? '/' } # HTTP token httpurl { 'http://' [ '/' [ '?' ]? ]? } token hpath { [ '/' ]* } token hsegment { [ | ';' | ':' | '@' | '&' | '=' ]* } token search { [ | ';' | ':' | '@' | '&' | '=' ]* } # GOPHER token gopherurl { 'gopher://' [ '/' [ [ [ '%09' [ '%09' ]? ]? ]? ]? ]? } token gtype { } token selector { * } token gopher__string { * } # MAILTO token mailtourl { 'mailto:' } token encoded822addr { **{ 1 .. * } } # "further defined in RFC822". yeah, okay. # NEWS token newsurl { 'news:' } token grouppart { '*' | |
} token group { [ | | '-' | '.' | '+' | '_' ]* } token article { [ | ';' | '/' | '?' | ':' | '&' | '=' ]**{ 1 .. * } '@' } # NNTP token nntpurl { 'nttp://' '/' [ '/' ]? } # TELNET token telneturl { 'telnet://' '/'? } # WAIS token waisurl { | | } token waisdatabase { 'wais://' '/' } token waisindex { 'wais://' '/' '?' } token waisdoc { 'wais://' '/' '/' '/' } token database { * } token wtype { * } token wpath { * } # PROSPERO token prosperourl { 'prospero://' '/' * } token ppath { [ '/' ]* } token psegment { [ | < ? : @ & = > ]* } token fieldspec { ';' '=' } token fieldname { [ | < ? : @ & > ]* } token fieldvalue { [ | < ? : @ & > ]* } # miscellaneous definitions token lowalpha { <[ \x61 .. \x7A ]> } # a-z token hialpha { <[ \x41 .. \x5A ]> } # A-Z token alpha { | } token digit { <[ \x30 .. \x39 ]> } # 0–9 token safe { < $ - _ . + > } token extra { < ! * ' ( ) , > } token national { < { } | \\ ^ ~ [ ] ` > } token punctuation { <[ \< \> \# \% \" ]> } token reserved { < ; / ? : @ & = > } token hex { | <[ A B C D E F a b c d e f ]> } token escape { '%' } token unreserved { | | | } token uchar { | } token xchar { | | } token digits { **{ 1 .. * } } }