SNOBOL X(ID:4370/sno009)

Generalised Snobol 

theorised SNOBOL (X=1to4) for hypothesising modifications to SNOBOL (chiefly SNOBOL 4)

Related languages
SNOBOL4 => SNOBOL X   Augmentation of
SNOBOL X => SNOBOLY   antipathy Influence

  • Griswold, R. E. "New Control Mechanisms and Syntax for SNOBOL4" The University of Arizona. October 1, 1973. 24 pages. view details Abstract: Description of control functions and new patternmatching
    operations, comprising "SNOBOLX". Includes listing of SIL code to
    incorporate new features in the macro implementation of SNOBOL4.
  • Griswold, Ralph E. "Suggested Revisions and Additions to the Syntax and Control Mechanisms of SNOBOL 4" ACM SIGPLAN Notices 9(2) February 1974 view details Extract: New control structures for SnobolX
    The control functions that follow are designed to provide many of the facilities typically associated with static block structures; they retain the execution-time flexibility of SNOBOL4 and its failure-exit facility . None of the functions described below is novel or esoteric. Instead, they are chosen to fit comfortably with conventional techniques and the syntax of SNOBOLX. There are four control functions: EXEC, D0, REPEAT, and IF. All of these functions may be used anywhere in a statement where any other function may be used. Extract: Introduction to and rationale for SNOBOLX
    The problems described above have been recognized for som e time. Partial solutions have been proposed (91 and, in some cases, implemented. This report proposes general solutions to the problems described above. The result is a language that is similar in philosophy to SNOBOL4, yet is more uniform in its syntactic structure. For the sake of discussion, the language in the new syntax is referred to as SNOBOLX to differentiate it from SNOBOL4. This does not imply a new programming language, but rather a modification of SNOBOL4. The purpose of this terminology is to provide a mechanism for distinguishing between the standard version of SNOBOL4 and the proposed modified form. The syntax of SNOBOLX is described in Section 2. As a consequence of the more uniform structure, new control mechanisms are introduced, permitting the use of more conventional programming techniques. These matters are discussed in Section 3. Casting the operations of pattern matching and replacement in a conventional expression format is discussed in Section 4. The approach taken leads to a new view of strings in the SNOBOL languages and has potentially far-reaching implications, which are discussed in Section 5 . A brief description of the implementation of SNOBOLX and other reference material are contained in appendices. Extract: THe Implementation of SNOBOLX
    SNOBOLX has been implemented by modifications to the macro implementation of SNOBOL4. For the most part, the modifications are straightforward.
    The translator is actually simplified somewhat by the introduction of the expression syntax and the removal of the corresponding different statement types . Handling of expression sequences as primary elements, which are treated Internally as functions, requires some extra code . Three modifications to the syntax tables are necessary to make = a binary operator and to include *= as a new binary operator.
    The control functions are easily implemented, although care is necessary to assure that the interpreter is properly positioned in the prefix code after exiting from the control functions.
    Sectioned strings require minor modifications to the pattern-matching and replacement procedures ; the problems there are technical ones, not conceptual.
    A SECTION is represented as a block of three descriptors. The first descriptor points to the subject string from which the SECTION results.
    The other two descriptors give the cursor positions at the end of the head section and at the end of the mid section, respectively. Extraction and insertion are straightforward. SIL code for SNOBOLX in the form of alters to the source file for Version 3 of SNOBOL4 is available from the author. Extract: Conclusions
    The effort to make the syntax of SNOBOL4 more uniform has led to two quite separate areas . The use of an expression syntax within a statement provides uniformity and allows the introduction of control functions in a natural way. Casting the replacement operation in this context opens the way to much more significant changes.
    The crucial decision is whether or not to carry replacement beyond a function such as REPL.
    On the one hand, there is the minor concession of allowing functions to modify their arguments . On the other hand, there Is a new view of strings and string manipulation that may lead to valuable new facilities, or may simply lead to more complexity and confusion. That matter is unresolved at the moment.
    The features of SNOBOLX as described in this report have been implemented and are in use on an experimental basis.
    Generally speaking, the new syntax and control functions have been favorably received, and SNOBOLX is preferred to SNOBOL4 in most cases.
    Programs are easier to write, are smaller, and require somewhat less time to execute. These improvements are partly due to a reduction in The number of statements, which is a natural consequence of the new features.
    The new control functions also eliminate many gotos and some of the redundant code that is necessary in SNOBOL4. Programs tend to abound in parentheses, and hence have a somewhat LISPy flavor. The SNOBOL4 statement termination and continuation conventions are clearly inappropriate to SNOBOLX, and should be replaced by a syntax that requires semicolons to terminate statements. The syntax of labels would have to be changed accordingly.
    An explicit operator to represent concatenation is probably desirable also. There is less experience with the new pattern-matching facilities and SECTIONS. The more elaborate notation required to achieve the effect of SN0B0L4 replacement is definitely cumbersome.
    This problem simply may be a result of carrying over to SNOBOLX programming techniques that are no longer appropriate. More time is necessary to evaluate these changes because programmers have yet to discover the applications of the greater generality of SNOBOLX.
  • Lindsay, J.H. "SNOBOLY - A proposal for extensions to SnobolX in the lights of Snobol X", Queens University Tech Report 1974-27 view details
  • Lindsay, J. H. "SNOBOLY; A Counter-Proposal to SNOBOLX" (Unpublished technical report.) Kingston, Ontario: Queen's University, Department of Computing and Information Science. 1975. view details