SNOBOL

SNOBOL
ParadigmImperative, procedural, unstructured
Designed byDavid J. Farber, Ralph Griswold and Ivan P. Polonsky
DeveloperDavid J. Farber, Ralph E. Griswold, Ivan P. Polonsky, and Bell Labs
First appeared1962; 62 years ago (1962)
Stable release
SNOBOL4 / 1967; 57 years ago (1967)
Websitehttps://www.regressive.org/snobol4/
Major implementations
SNOBOL, SPITBOL
Influenced by
COMIT
Influenced
AWK, SL5, Icon, bs, Lua[1]

SNOBOL ("StriNg Oriented and symBOlic Language") is a series of programming languages developed between 1962 and 1967 at AT&T Bell Laboratories by David J. Farber, Ralph Griswold and Ivan P. Polonsky, culminating in SNOBOL4. It was one of a number of text-string-oriented languages developed during the 1950s and 1960s; others included COMIT and TRAC.

SNOBOL4 stands apart from most programming languages of its era by having patterns as a first-class data type (i.e. a data type whose values can be manipulated in all ways permitted to any other data type in the programming language) and by providing operators for pattern concatenation and alternation. SNOBOL4 patterns are a type of object and admit various manipulations, much like later object-oriented languages such as JavaScript whose patterns are known as regular expressions. In addition SNOBOL4 strings generated during execution can be treated as programs and either interpreted or compiled and executed (as in the eval function of other languages).

SNOBOL4 was quite widely taught in larger U.S. universities in the late 1960s and early 1970s and was widely used in the 1970s and 1980s as a text manipulation language in the humanities.

In the 1980s and 1990s, its use faded as newer languages such as AWK and Perl made string manipulation by means of regular expressions fashionable. SNOBOL4 patterns include a way to express BNF grammars, which are equivalent to context-free grammars and more powerful than regular expressions.[2] The "regular expressions" in current versions of AWK and Perl are in fact extensions of regular expressions in the traditional sense, but regular expressions, unlike SNOBOL4 patterns, are not recursive, which gives a distinct computational advantage to SNOBOL4 patterns.[3] (Recursive expressions did appear in Perl 5.10, though, released in December 2007.[4][5])

The later SL5 (1977)[6] and Icon (1978) languages were designed by Griswold to combine the backtracking of SNOBOL4 pattern matching with more standard ALGOL-like structuring.

  1. ^ Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar (2007), "The evolution of Lua", Proceedings of the third ACM SIGPLAN conference on History of programming languages (PDF), p. 26, doi:10.1145/1238844.1238846, ISBN 9781595937667, S2CID 475143
  2. ^ Gimpel, J. F. (February 1973). "A theory of discrete patterns and their implementation in SNOBOL4". Communications of the ACM. 16 (2): 91–100. doi:10.1145/361952.361960. S2CID 17059429.
  3. ^ "Dr. Dobb's: Programs That Transform Their Own Source Code; or: the Snobol Foot Joke". Dobbscodetalk.com. Retrieved 2011-12-04.
  4. ^ Contact details. "perlre". perldoc.perl.org. Retrieved 2011-12-04.
  5. ^ "Recursive Regex Tutorial". Retrieved 2017-03-19.
  6. ^ Griswold, Ralph E.; Hanson, David R. (April 1977). "An Overview of SL5". ACM SIGPLAN Notices. 12 (4): 40–50. doi:10.1145/954654.954658. S2CID 38692673.