Skip to main content

Appendix A

Note 1 to the DRS Working Group​

As you recall, we spent considerable time in discussing the use and meaning of the arbitrary symbol, #. To summarize, it was clear that inclusion of the # in both replication and length expressions led to ambiguities. We settled on its restricted use in the length expression of an input term, although no one was entirely satisfied with this definition.

Recently, Jim White has again commented on the #. Jim feels that it is curious that one can pick up an arbitrary number of EBCDIC characters, for example, but can't pick up an arbitrary number of specific EBCDIC characters such as EBCDIC A's. Jim feels that a more natural way to interpret the length, value, and replication expressions would be as the IBM OS assembler interprets the attributes of the pseudo instruction, define constant (DC).

The IBM OS assembler uses the following format.

     1             2              3           4
duplication type modifiers nominal value
factor

The duplication factor, if specified, causes the constant to be generated the number of times indicated by the factor. The type defines the type of constant being specified. Modifiers describe the length, scaling, and exponent of the constant. Nominal value supplies the constant described by the subfields that precede it.

Assume that we use the # only as a duplication factor (replication expression). Hence, in the example of the form to pack EBCDIC characters, the counter and looping can be eliminated.

CHAR(,E,,1) ;
LEN(#,#,CHAR,1) : (,B,L(LEN)+1,*) , CHAR ;

The interpretation is that the data type, length expression, and value expression make up the unit value. This quantity can then be replicated. As our document now stands, only the data type and value expression make up the unit value.

The application of a term according to Jim's suggestion is as follows.

  1. The data type, value expression, and length expression together specify a unit value, call it x.
  2. The replication expression specifies the number of times x is to be repeated. The value of the concatenated xs becomes y of length L.
  3. If the term is an input stream term then the value beginning at the current input pointer position.
  4. If the input value satisfies the constraints of y over length L then the input value of length L becomes the value of the term.

Note 2 to the DRS Working Group​

There has been recent debate of whether the input pointer should be advanced upon successful completion of a rule (as it now is defined) or upon successful completion of each term. See the example on page 22. If the input pointer is advanced upon successful completion of a term, then rules become equivalent to terms.

I would like to for us to discuss at the SJCC both the term attributes and the input pointer advance issues.

John


[ This RFC was put into machine readable form for entry ] [ into the online RFC archives by Katsunori Tanaka 4/99 ]