| |

2 .

2.1 - (BNF).

, , , - (BNF), RFC 822 [9]. , . - :

=
name = definition
- ( "<" ">"), "=". , , . , SP, LWS, HT, CRLF, DIGIT, ALPHA ., . , .
""
"literal"
. , -.
1 | 2
rule1 | rule2
, ("|") . , " | " , .
(1 2)
(rule1 rule2)
, . , "(elem (foo | bar) elem)" "elem foo elem" "elem bar elem".
*
*rule
"*", , . - "<n>*<m>element" <n>, <m> . - 0 . "*(element)" ( ); "1*element" ; "1*2element" , .
[]
[rule]
; "[foo bar]" "*1(foo bar)".
N
N rule
: "<n>(element)" "<n>*<n>(element)"; <n> . 2DIGIT - 2 , 3ALPHA - .
#
#rule
"#" , "*", . - "<n>#<m>element" <n>, <m> , (","), , , (LWS). ; "( *LWS element *( *LWS "," *LWS element)) " "1#". , , , . "(element), , (element)" , . , , . - 0 . "#(element)" ( ); "1#element" ; "1*2element" .
;
; comment
, , , . - .
*LWS
implied *LWS
, . , , (LWS) ( ), (tspecials), . (tspecials), .

2.2 .

. US-ASCII ANSI X3.4-1986 [21].

          OCTET          = < 8-  >

          CHAR           = < US-ASCII  ( 0 - 127)>

          UPALPHA        = < US-ASCII   
                            "A".."Z">

          LOALPHA        = < US-ASCII   
                            "a".."z">

          ALPHA          = UPALPHA | LOALPHA

          DIGIT          = < US-ASCII  "0".."9">

          CTL            = < US-ASCII   (
                           0 - 31)  DEL (127)>

          CR             = <US-ASCII CR,   (13)>

          LF             = <US-ASCII LF,   (10)>

          SP             = <US-ASCII SP,  (32)>

          HT             = <US-ASCII HT,  
                             (9)>

          <">            = <US-ASCII   (34)>

HTTP/1.1 CR LF , ( 19.3 (tolerant applications)). , 3.7.

          CRLF           = CR LF

HTTP/1.1 , . , , , SP.

          LWS            = [CRLF] 1*( SP | HT )

TEXT , , . *TEXT (character sets), ISO 8859-1 [22], RFC 1522 [14].

          TEXT           = < OCTET,   CTLs,
                              LWS>

.

          HEX            = "A" | "B" | "C" | "D" | "E" | "F"
                         | "a" | "b" | "c" | "d" | "e" | "f" | DIGIT

HTTP/1.1 , LWS . (quoted string), .

          token          = 1*< CHAR   CTLs 
                              tspecials>

          tspecials      = "(" | ")" | "<" | ">" | "@"
                         | "," | ";" | ":" | "\" | <">
                         | "/" | "[" | "]" | "?" | "="
                         | "{" | "}" | SP | HT

HTTP . . , "comment" . .

          comment        = "(" *( ctext | comment ) ")"

          ctext          = < TEXT   "(" and ")">

, , .

          quoted-string  = ( <"> *(qdtext) <"> )

          qdtext         = < TEXT   <">>

("\") (quoted-string).

          quoted-pair    = "\" CHAR

Copyright  ©  1998 Alex Simonoff (http://www.omsk.com/Leshik/), All Rights Reserved.


| |