Annotation of 43BSD/contrib/dipress/doc/intertext.me, revision 1.1.1.1

1.1       root        1: .bp
                      2: .sh 1 "Introduction to the syntax of Intertext"
                      3: .sh 2 Introduction
                      4: .lp
                      5: This section describes a language used to represent an Interpress master,
                      6: called \fIIntertext\fP.  In order to make an Interpress master compact,
                      7: an encoding scheme is used to represent the operators and the values.  
                      8: Although this encoding uses less disk space and results in shorter
                      9: transmission times, it is practically impossible to examine or edit an
                     10: Interpress master.  For this reason, the utilities \fIiptotext\fP and
                     11: \fItexttoip\fP represent the master in a language called \fIIntertext\fP.
                     12: For someone to completely use the Interpress utilities and understand the
                     13: output, an understanding of this language is necessary.  It is recommended
                     14: that the reader of this section have a working knowledge of Interpress.
                     15: .sh 2 Tokens
                     16: .sh 3 "Keywords"
                     17: .lp
                     18: The keyword \*(lqHeader\*(rq indicates that the following string is the
                     19: header that appears at the front of the Interpress file.  This keyword can
                     20: only be used once at the top of the file.  It is not checked for validity.
                     21: .sh 2 "Integers"
                     22: .lp
                     23: A series of digits optionally preceded by a plus or minus sign is an integer.
                     24: .sh 2 "Short numbers"
                     25: .lp
                     26: Any integer that starts in the first column is translated into an Interpress 
                     27: \fIshort number\fP.  This number must be in the range \(mi4000..28767.
                     28: .sh 2 "Operators"
                     29: .lp
                     30: Any word that starts in the first column
                     31: is translated into an operator, with the exceptions noted in \fIkeywords\fP.
                     32: The \*(lqpseudo\*(rq operators are handled as follows.
                     33: The word \*(lqBEGIN\*(rq marks
                     34: the beginning of a block.  The word \*(lqEND\*(rq indicates the
                     35: end of a block.  The character \*(lq{\*(rq indicates the beginning
                     36: of a body and the character \*(lq}\*(rq indicates the end of a
                     37: body.  All other words refer to an Interpress operator.  The names found in
                     38: Appendix B of the \fIInterpress Electronic printing Standard\fP
                     39: are recognized.  The case of the letters is insignificant.
                     40: .sh 2 "Comments"
                     41: .lp
                     42: Anything that appears in parentheses is assumed to be a
                     43: comment and is ignored.  These comments should not be confused with a
                     44: comment sequence.
                     45: .sh 2 "Sequences"
                     46: .lp
                     47: If the first
                     48: character on the line is \*(lq>\*(rq then the remainder of the line
                     49: describes a \fIsequence\fP.
                     50: If the second character is also \*(lq>\*(rq then the
                     51: sequence described is \fIlong\fP, otherwise it is \fIshort\fP.
                     52: The keyword that starts
                     53: in the third column describes the type of sequence.  The value of the
                     54: sequence appears after the colon.  The following names are valid sequence
                     55: names:  Comment, Identifier, Insert file, Integer, Rational, String.
                     56: .sh 2 "Strings"
                     57: .lp
                     58: Strings are represented in the same way they are in C.
                     59: A double quote is used to mark each end of the string
                     60: and a backslash is used to indicate the start of a special
                     61: character.  If a digit follows a backslash, it starts an octal number that
                     62: does not exceed three digits.  This number is the octal value of the
                     63: character represented.  For example, the string "a\e244b" consists of an
                     64: ascii \*(lqa\*(rq followed by the octal value 244 and ending with an ascii
                     65: \*(lqb\*(rq.  Two successive backslashes represents a single backslash and a
                     66: backslash followed by a double quote represents a double quote.  It will not
                     67: be uncommon in program listings to use strings like:
                     68: "#include\ \e"file.h\e"".
                     69: .sh 2 "Rationals"
                     70: .lp
                     71: A rational number is represented as a fraction with a slash separating the
                     72: numerator and the denominator.
                     73: For example:  \*(lq1/2\*(rq represents the rational 1 over 2.
                     74: .sh 2 Format
                     75: .sp
                     76: Here is a Backus-Naur style grammar that describes the Intertext format
                     77: (tokens are in italics, literals are contained in double quotes):
                     78: .sp
                     79: .(l
                     80: Intertext ::= prelim body | body
                     81: 
                     82: prelim ::= file header | file | header
                     83: 
                     84: file ::= "File: " \fIstring\fP \fInl\fP
                     85: 
                     86: header ::= "Header: " \fIstring\fP \fInl\fP
                     87: 
                     88: body ::= line \fInl\fP\^ body | line \fInl\fP
                     89: 
                     90: line ::= \fIinteger\fP | \fIoperator\fP | short-long sequence
                     91: 
                     92: .ta \w'sequence ::= 'u
                     93: sequence ::= "Comment: " \fIstring\fP |
                     94:        "Identifier: " \fIidentifier\fP |
                     95:        "Insert file: " \fIstring\fP |
                     96:        "Integer: " \fIinteger\fP |
                     97:        "Rational: " \fIinteger\fP\^ "/" \fIinteger\fP |
                     98:        "String: " \fIstring\fP
                     99: 
                    100: short-long ::= "> " | ">>"
                    101: .)l
                    102: .sp
                    103: The token \fInl\fP\^ is a newline or line terminator.
                    104: The other italicized tokens are explained in the previous section.
                    105: .sh 2 Omissions
                    106: .lp
                    107: There is currently no way to express large vectors or any
                    108: of the pixel vectors.  There is also no way to specify a continued
                    109: sequence.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.