⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc166.txt

📁 著名的RFC文档,其中有一些文档是已经翻译成中文的的.
💻 TXT
📖 第 1 页 / 共 3 页
字号:
            Figure 4.  Use of Server TELNET   In Fig. 3 the user instructs his TELNET to make two duplex   connections to DRS.  One is used for control information (the CC) and   the other is a dummy.  When he issues the CONNECT he references the   dummy duplex connection (UC) using the "already connected" option.   In Fig. 4 the user has his TELNET (user side) call the DRS.  When he   issues the CONNECT the DRS calls the TELNET (server side) which   accepts the call on behalf of the console.  This distinction is known   only to the user since to the DRS the configuration Fig. 4 appears   identical to that in Fig. 1.  Two points should be noted:        1)  TELNET protocol is needed only to define forms and direct            connections.  It is not required for the using and servingAnderson, et al.                                                [Page 7]RFC 166               Data Reconfiguration Service              May 1971            processes.        2)  The using and serving processes need only a minimum of            modification for Network use, i.e., an NCP interface.                          III.  THE FORM MACHINEINPUT/OUTPUT STREAMS AND FORMS   This section describes the syntax and semantics of forms that specify   the data reconfigurations.  The Form Machine gets an input stream,   reformats the input stream according to a form describing the   reconfiguration, and emits the reformatted data as an output stream.   In reading this section it will be helpful to envision the   application of a form to the data stream as depicted in Fig. 5.  An   input stream pointer identifies the position of data (in the input   stream) that is being analyzed at any given time by a part of the   form.  Likewise, an output stream pointer locates data being emitted   in the output stream.       /\/\                                                  /\/\  ^    |  |                     FORM                         |  |   ^  |    |  |                -----------------                 |  |   |  |    |  |            +-  -----------------  -+             |  |   |  |    |  |            |   CURRENT PART OF     |             |  |   |INPUT  |  |<= CURRENT <    -----------------    > CURRENT => |  | OUTPUTSTREAM |  |   POINTER  |   FORM BEING APPLIED  |  POINTER    |  | STREAM       |  |            +-  -----------------  -+             |  |       |  |                -----------------                 |  |       |  |                -----------------                 |  |       |  |                -----------------                 |  |       \/\/                                                  \/\/              Figure 5.  Application of Form to Data StreamsAnderson, et al.                                                [Page 8]RFC 166               Data Reconfiguration Service              May 1971FORM MACHINE BNF SYNTAX   form           ::=  rule | rule form   rule           ;;=  label  inputstream  outputstream ;   label          ::=  INTEGER | <null>   inputstream    ::=  terms | <null>   terms          ::=  term | terms , term   outputstream   ::=  : terms | <null>   term           ::=  identifier | identifier  descriptor |                       descriptor | comparator   identifier     ::=  an alpha character followed by 0 to 3                       alphanumerics   descriptor     ::=  (replicationexpression , datatype ,                       valueexpression , lengthexpression  control)   comparator     ::=  (value  connective  value  control)  |                       (identifier  *<=*  control)   replicationexpression  ::=  # | arithmeticexpression | <null>   datatype       ::=  B | O | X | E | A   valueexpression  ::=  value | <null>   lengthexpression  ::=      arithmeticexpression | <null>   connective     ::=  .LE. | .LT. | .GE. | .GT. | .EQ. | .NE.   value          ::=  literal | arithmeticexpression   arithmeticexpression  ::=  primary | primary operator                              arithmeticexpression   primary        ::=  identifier | L(identifier) | V(identifier) |                       INTEGER   operator       ::=  + | - | * | /   literal        ::=  literaltype "string"Anderson, et al.                                                [Page 9]RFC 166               Data Reconfiguration Service              May 1971   literaltype    ::=  B | O | X | E | A   string         ::=  from 0 to 256 characters   control        ::=  :  options | <null>   options        ::=  S(where) | F(where) | U(where) |                       S(where) , F(where) |                       F(where) , S(where)   where          ::=  arithmeticexpression | R(arithmeticexpression)ALTERNATE SPECIFICATION OF FORM MACHINE SYNTAX                                   infinityform                    ::=  {rule}                                   1                                      1         1          1rule                    ::=  {INTEGER}   {terms}   {:terms} ;                                      0         0          0                                         infinityterms                   ::=  term {,term}                                         0                                                      1term                    ::=  identifier | {identifier}   descriptor                                                      0                             | comparator                                                    1descriptor              ::=  ({arithmeticexpression}  , datatype ,                                                    0                                    1                     1          1                             {value} ,  {lengthexpression}  {:options}                                    0                     0          0                                                                 1comparator              ::=  (value  connective  value {:options} ) |                                                                 0                                                              1                             (identifier .<=. value {:options} )                                                              0connective              ::=  .LE. | .LT. | .GE. | .GT. | .EQ. | .NE.lengthexpression        ::=  # | arithmeticexpressiondatatype                ::=  B | O | X | E | Avalue                   ::=  literal | arithmeticexpressionAnderson, et al.                                               [Page 10]RFC 166               Data Reconfiguration Service              May 1971                                                         infinityarithmeticexpression    ::=  primary  {operator  primary}                                                         0operator                ::= + | - | * | /primary                 ::=  identifier | L(identifier) |                             V(identifier) | INTEGER                                                      256literal                 ::=  literaltype  "{CHARACTER}   "                                                      0literaltype             ::=  B | O | X | A | E                                                 1options                 ::=  S(where) {,F(where)}  |                                                 0                                                 1                             F(where) {,S(where)}  | U(where)                                                 0where                   ::=  arithmeticexpression |                             R(arithmeticexpression)                                                     3identifier              ::=  ALPHABETIC  {ALPHAMERIC}                                                     0FORMS   A form is an ordered set of rules.         form ::=  rule | rule form   The current rule is applied to the current position of the input   stream.  If the (input stream part of a) rule fails to correctly   describe the contents of the current input then another rule is made   current and applied to the current position of the input stream.  The   next rule to be made current is either explicitly specified by the   current term in the current rule or it is the next sequential rule by   default.  Flow of control is more fully described under TERM AND RULE   SEQUENCING.   If the (input stream part of a) rule succeeds in correctly describing   the current input stream, then some data may be emitted at the   current position in the output stream according to the rule.  The   input and output stream pointers are advanced over the described and   emitted data, respectively, and the next rule is applied to the now   current position of the input stream.   Application of the form is terminated when an explicit return   (R(arithmeticexpression)) is encountered in a rule.  The user andAnderson, et al.                                               [Page 11]RFC 166               Data Reconfiguration Service              May 1971   server connections are closed and the return code   (arithmeticexpression) is sent to the originating user.RULES   A rule is a replacement, comparison, and/or an assignment operation   of the form shown below.         rule ::= label  inputstream  outputstream   A label is the name of a rule and it exists so that the rule may be   referenced elsewhere in the form for explicit rule transfer of   control.  Labels are of the form below.         label ::=  INTEGER | <null>   The optional integer labels are in the range 0 >= INTEGER >= 9999.   The rules need not be labeled in ascending numerical order.TERMS   The inputstream (describing the input stream to be matched) and the   outputstream (describing data to be emitted in the output stream)   consist of zero or more terms and are of the form shown below.         inputstream   ::=  terms | <null>         outputstream  ::=  :terms | <null>         terms         ::=  term | terms , term   Terms are of one of four formats as indicated below.         term ::=  identifier | identifier  descriptor |                   descriptor | comparatorTerm Format 1   The first term format is shown below.         identifier   The identifier is a symbolic reference to a previously identified   term (term format 2) in the form.  It takes on the same attributes   (value, length, type) as the term by that name.  Term format 1 is   normally used to emit data in the output stream.   Identifiers are formed by an alpha character followed by 0 to 3   alphanumeric characters.Anderson, et al.                                               [Page 12]RFC 166               Data Reconfiguration Service              May 1971Term Format 2   The second term format is shown below.         identifier descriptor   Term format 2 is generally used as an input stream term but can be   used as an output stream term.   A descriptor is defined as shown below.         descriptor ::= (replicationexpression, datatype,                        valueexpression, lengthexpression                        control)   The identifier is the symbolic name of the term in the usual   programming language sense.  It takes on the type, length, value, and   replication attributes of the term and it may be referenced elsewhere   in the form.   The replication expression, if specified, causes the unit value of   the term to be generated the number of times indicated by the value   of the replication expression.  The unit value of the term (quantity   to be replicated) is determined from the data type, value expression,   and length expression attributes.  The data type defines the kind of   data being specified.  The value expression specifies a nominal value   that is augmented by the other term attributes.  The length   expression determines the unit length of the term.  (See the IBM SRL   Form C28-6514 for a similar interpretation of the pseudo instruction,   defined constant, after which the descriptor was modeled.)   The replication expression is defined below.         replicationexpression ::= # | arithmeticexpression | <null>         arithmeticexpression ::= primary | primary operator                                  arithmeticexpression         operator ::= + | - | * | /         primary ::= identifier | L(identifier) | V(identifier) |                     INTEGER   The replication expression is a repeat function applied to the   combined data type value, and length expressions.  It expresses the   number of times that the nominal value is to be repeated.   The terminal symbol # means an arbitrary replication factor.  It must   be explicitly terminated by a match or non-match to the input stream.   This termination may result from the same or the following term.Anderson, et al.                                               [Page 13]RFC 166               Data Reconfiguration Service              May 1971   A null replication expression has the value of one.  Arithmetic   expressions are evaluated from left-to-right with no precedence.   The L(identifier) is a length operator that generates a 32-bit binary   integer corresponding to the length of the term named.  The   V(identifier) is a value operator that generates a 32-bit binary   integer corresponding to the value of the term named.  (See   Restrictions and Interpretations of Term Functions.)  The value   operator is intended to convert character strings to their numerical   correspondents.   The data type is defined below.             datatype ::= B | O | X | E | A   The data type describes the kind of data that the term represents.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -