BTL SNOBOL4(ID:5511/btl001)

Bell Labs SNOBOL4  


The name for the original SNOBOL4 from Bell Telephone Labs (coined after Griswold went to Arizona)


Related languages
SNOBOL4 => BTL SNOBOL4   Renaming

References:
  • Farber, David J. "A survey of the systematic use of macros in systems building" view details Abstract: Assemblers with macro capabilities have been available for over ten years. There has been a limited number of mainly unpublished systematic uses of such capabilities in the construction of a variety of systems. This paper will cover a number of these cases. We will examine the features of the macro systems which allowed their usage as well as the method used in the system implementation. We will comment on the effect on efficiency and flexibility that the use of this facility has produced. Extract: SNOBOL 4
    SNOBOL4
    I have placed SNOBOL4 (18) as a separate section because I feel that it is a fine illustration of the usefulness of a macro system even in the face of a large number of excellent systems languages. I would first like to look briefly at the history of SNOBOL4. From the very early versions, extensive use was made of macros in a systematic fashion to help in the thought process and in the coding task. The string macros and extensive control and debugging macro systems were defined and used. The appearance of a machine instruction was, while not rare, viewed with suspicion. When SNOBOL4 was undertaken, there were a number of implicit goals as far as the choice of programming language was concerned. It was desired to produce a system which could be debugged on a 7090 but which would, without change, run on a 360. It was also clear that transferability to other machines would be valuable. PL/I was looked at and after much soul-searching it was felt that the representation inefficiencies and the serious problem of pro- cedure argument restrictions would handicap the effort and the resultant product. The choice made was the path of defining a programming language using a carefully selected and designed set of data definitional and manipulation macros together with a set of control (subroutine call, return, argument passing, etc.) macros that would fit the demands of the Job. Care was taken that the resultant macros were capable of being defined on other known assemblers operating on non-IBM machines. The resulting macro system contained 130 macros and has been successfully transferred to almost every commercial machine in periods of from one month to six months.
    There are a few basic data items used in SNOBOL4. These are:
    1) Descriptors
    2) Specifiers
    3) Character Strings
    4) Syntax Table Entries
    A descriptor is used to represent all pointers, integers, and real numbers. It is the "word" of the SNOBOL4 system. Descriptors consist of three fields:
    1) Address
    2) Flag
    3) Value
    The size and position of these fields ~s determined from the data they re~resent. Each field must be large enough to serve the function it is to perform. For example, the address field of a descriptor is large enough to address any descriptor, specifier or program instruction in the system. It must also be large enough to contain any integer or real number that can be represented by the system. Similar restrictions apply to the other fields of a descriptor and a specifier. Other than these restrictions the particular implementor can choose his own sizes and arrangements.
    Each operation (macro) is described in a fashion similar to that of a machine manual along with programming notes.
    Experience with the use of a macro system such as this indicates that good generated code efficiency results. Any inefficiency in the system is due to its interpretive mode of operation, not the use of macros.
          in [ACM] SIGPLAN Notices 6(10) October 1971 Proceedings of the SIGPLAN symposium on Languages for system implementation 1971, Lafayette, Indiana, United States; October, 1971 view details