Passa al contenuto principale

Specifica grammaticale della tabella degli host

A. Grammatica di parsing

<entry> ::= <keyword> ":" <addresses> ":" <names> [":" [<cputype>]
[":" [<opsys>] [":" [<protocol list>] ]]] ":"
<addresses> ::= <address> *["," <address>]
<address> ::= <octet> "." <octet> "." <octet> "." <octet>
<octet> ::= <0 to 255 decimal>
<names> ::= <netname> | <gatename>
| <official hostname> *["," <nicknames>]
<netname> ::= <name>
<gatename> ::= <name>
<official hostname> ::= <name>
<nickname> ::= <name>
<protocol list> ::= <protocol spec> *["," <protocol spec>]
<protocol spec> ::= <transport name> "/" <service name> |
<raw protocol name>

B. Grammatica lessicale

<entry-field> ::= <entry-text> [<cr><lf> <blank> <entry-field>]
<blank> ::= <space or tab>
<keyword> ::= NET | GATEWAY | HOST
<name> ::= <letter>[*[<letter-or-digit-or-hyphen>]<letter-or-digit>]
<cputype> ::= PDP-11/70 | DEC-1080 | C/30 | CDC-6400...etc.
<opsys> ::= ITS | MULTICS | TOPS20 | UNIX...etc.
<transport name> ::= TCP | NCP | UDP | IP...etc.
<service name> ::= TELNET | FTP | SMTP | MTP...etc.
<raw protocol name> ::= <name>
<comment> ::= ";" <arbitrary text><cr><lf>

Note:

  1. Tra i separatori " , : " sono ammessi zero o più "blank". I "blank" sono spazi e tabulazioni.
  2. Le righe di continuazione sono righe che iniziano con almeno un blank. Possono essere usate ovunque i "blank" siano ammessi per suddividere una voce su più righe.