. Uniform Resource Locators in XBNF This is an XBNF(eXtreme Bachus-Naur-Form) description of the Uniform Resource Locator syntax. Each definition has the traditional separator with two collons and an equal sign, but is terminated by a period (.). A vertical line | indicates alternatives, and O(brackets) indicate optional parts. N(brackets) indicate a number (one or more) occurences. #(brakets) is zero or more. Spaces are represented by the word "space", and the vertical line character by "vline". Single letters stand for single letters. All words of more than one letter below are entities described somewhere in this description. Characters are shown in double quotation marks. And quoation marks as "quotes". The current IETF URI working group preference is for the prefixedurl production. (Nov 1993. July 93: url). The "national" and "punctuation" characters do not appear in any productions and therefore may not appear in URLs. The "afsaddress" is left in as historical note, but is not "a" url production prefixedurl ::= "url:" $url. url ::= $httpaddress | $ftpaddress | $newsaddress | $nntpaddress | $prosperoaddress | $telnetaddress | $gopheraddress | $waisaddress | $mailtoaddress | $midaddress | $cidaddress. scheme ::= $ialpha. httpaddress ::= "http:" "//" $hostport O( "/" $path ) O( "?" $search ) $ftpaddress ::= "ftp://" $login "/" $path O( $ftptype ). afsaddress ::= "afs://" $cellname "/" $path. newsaddress ::= "news:" $group_art. nntpaddress ::= "nntp:" $group "/" N($digit). midaddress ::= "mid" ":" addr_spec. cidaddress ::= "cid:" content_identifier. mailtoaddress ::= "mailto:" N($xalpha) "@" $hostname. waisaddress ::= $waisindex | $waisdoc. waisindex ::= "wais://" $hostport "/" $database O( "?" $search ). waisdoc ::= "wais://" $hostport "/" $database "/" $wtype "/" $wpath. wpath ::= N($digit) "=" $path ";" O( $wpath ). group_art ::= "*" | $group | $article. group ::= $ialpha O( "." $group ). article ::= N($xalpha) "@" $host. database ::= N($xalpha). wtype ::= N($xalpha). prosperoaddress ::= $prosperolink. prosperolink ::= "prospero://" $hostport "/" $hsoname O( "%" "00" $version O( N(attribute) ) ). hsoname ::= $path. version ::= N($digit). attribute ::= N(alphanum). telnetaddress ::= "telnet://" $login. gopheraddress ::= "gopher://" $hostport O(/ $gtype O( $gcommand ) ). login ::= O( $user O( ":" $password ")"@")" $hostport. hostport ::= $host O( ":" $port ). host ::= $hostname | $hostnumber.. ftptype ::= "A" $formcode | "E" $formcode | "I" | "L" N($digit). formcode ::= "N" | "T" | "C". cellname ::= $hostname. hostname ::= $ialpha O( "." $hostname ). hostnumber ::= N($digit) "." N($digit) "." N($digit) "." N($digit). port ::= N($digit). gcommand ::= $path. path ::= $void | $segment O( "/" $path ). segment ::= N($xpalpha). search ::= N($xalpha) O( $search ). user ::= $alphanum2 O( $user ). password ::= $alphanum2 O( $password ). fragmentid ::= N($xalpha). gtype ::= $xalpha. alphanum2 ::=alpha | $digit | "-" | "_" | "." | "+". xalpha ::= $alpha | $digit | $safe | $extra | $escape. xpalpha ::= $xalpha | v$oid. ialpha ::= $alpha O( N($xalpha) ). safe ::= "$" | "-" | | "@" | . | "&" | | "-". extra ::="!" | "*" | quotes | "'" | "(" | ")" | ",". reserved ::= "=" | ";" | "/" | "#" | ? | ":" | space. escape ::= "%" $hex $hex. hex ::= $digit | "a".."f" | "A".."F". national ::= "{" | "}" | vline | "[" | "]" | "\\" | "^" | "~". punctuation ::= "<" | ">". alphanum ::= $alpha | $digit void ::="" (end of URL BNF)