<s>
SNOBOL	B-Application
(	O
"	O
StriNg	O
Oriented	O
and	O
symBOlic	O
Language	O
"	O
)	O
is	O
a	O
series	O
of	O
programming	O
languages	O
developed	O
between	O
1962	O
and	O
1967	O
at	O
AT&T	O
Bell	O
Laboratories	O
by	O
David	O
J	O
.	O
Farber	O
,	O
Ralph	O
E	O
.	O
Griswold	O
and	O
Ivan	O
P	O
.	O
Polonsky	O
,	O
culminating	O
in	O
SNOBOL4	B-Application
.	O
</s>
<s>
It	O
was	O
one	O
of	O
a	O
number	O
of	O
text-string-oriented	O
languages	O
developed	O
during	O
the	O
1950s	O
and	O
1960s	O
;	O
others	O
included	O
COMIT	B-Language
and	O
TRAC	B-Language
.	O
</s>
<s>
SNOBOL4	B-Application
stands	O
apart	O
from	O
most	O
programming	O
languages	O
of	O
its	O
era	O
by	O
having	O
patterns	O
as	O
a	O
first-class	O
data	O
type	O
(	O
i.e.	O
</s>
<s>
a	O
data	O
type	O
whose	O
values	O
can	O
be	O
manipulated	O
in	O
all	O
ways	O
permitted	O
to	O
any	O
other	O
data	O
type	O
in	O
the	O
programming	O
language	O
)	O
and	O
by	O
providing	O
operators	O
for	O
pattern	B-Language
concatenation	O
and	O
alternation	O
.	O
</s>
<s>
SNOBOL4	B-Application
patterns	O
are	O
a	O
type	O
of	O
object	O
and	O
admit	O
various	O
manipulations	O
,	O
much	O
like	O
later	O
object-oriented	B-Language
languages	I-Language
such	O
as	O
JavaScript	B-Language
whose	O
patterns	O
are	O
known	O
as	O
regular	B-Language
expressions	I-Language
.	O
</s>
<s>
In	O
addition	O
SNOBOL4	B-Application
strings	O
generated	O
during	O
execution	O
can	O
be	O
treated	O
as	O
programs	O
and	O
either	O
interpreted	O
or	O
compiled	B-Language
and	O
executed	O
(	O
as	O
in	O
the	O
eval	O
function	O
of	O
other	O
languages	O
)	O
.	O
</s>
<s>
SNOBOL4	B-Application
was	O
quite	O
widely	O
taught	O
in	O
larger	O
U.S.	O
universities	O
in	O
the	O
late	O
1960s	O
and	O
early	O
1970s	O
and	O
was	O
widely	O
used	O
in	O
the	O
1970s	O
and	O
1980s	O
as	O
a	O
text	O
manipulation	O
language	O
in	O
the	O
humanities	O
.	O
</s>
<s>
In	O
the	O
1980s	O
and	O
1990s	O
,	O
its	O
use	O
faded	O
as	O
newer	O
languages	O
such	O
as	O
AWK	B-Application
and	O
Perl	B-Language
made	O
string	O
manipulation	O
by	O
means	O
of	O
regular	B-Language
expressions	I-Language
fashionable	O
.	O
</s>
<s>
SNOBOL4	B-Application
patterns	O
subsume	O
BNF	O
grammars	O
,	O
which	O
are	O
equivalent	O
to	O
context-free	O
grammars	O
and	O
more	O
powerful	O
than	O
regular	B-Language
expressions	I-Language
.	O
</s>
<s>
The	O
"	O
regular	B-Language
expressions	I-Language
"	O
in	O
current	O
versions	O
of	O
AWK	B-Application
and	O
Perl	B-Language
are	O
in	O
fact	O
extensions	O
of	O
regular	B-Language
expressions	I-Language
in	O
the	O
traditional	B-General_Concept
sense	I-General_Concept
,	O
but	O
regular	B-Language
expressions	I-Language
,	O
unlike	O
SNOBOL4	B-Application
patterns	O
,	O
are	O
not	O
recursive	O
,	O
which	O
gives	O
a	O
distinct	O
computational	O
advantage	O
to	O
SNOBOL4	B-Application
patterns	O
.	O
</s>
<s>
(	O
Recursive	O
expressions	O
did	O
appear	O
in	O
Perl	B-Language
5.10	I-Language
,	O
though	O
,	O
released	O
in	O
December	O
2007	O
.	O
)	O
</s>
<s>
The	O
later	O
SL5	O
(	O
1977	O
)	O
and	O
Icon	B-Language
(	O
1978	O
)	O
languages	O
were	O
designed	O
by	O
Griswold	O
to	O
combine	O
the	O
backtracking	O
of	O
SNOBOL4	B-Application
pattern	B-Language
matching	I-Language
with	O
more	O
standard	O
ALGOL-like	B-Language
structuring	O
.	O
</s>
<s>
The	O
initial	O
SNOBOL	B-Application
language	O
was	O
created	O
as	O
a	O
tool	O
to	O
be	O
used	O
by	O
its	O
authors	O
to	O
work	O
with	O
the	O
symbolic	O
manipulation	O
of	O
polynomials	O
.	O
</s>
<s>
It	O
was	O
written	O
in	O
assembly	O
language	O
for	O
the	O
IBM	B-Device
7090	I-Device
.	O
</s>
<s>
SNOBOL	B-Application
was	O
rewritten	O
to	O
add	O
functions	O
,	O
both	O
standard	O
and	O
user-defined	O
,	O
and	O
the	O
result	O
was	O
released	O
as	O
SNOBOL3	O
.	O
</s>
<s>
SNOBOL3	O
became	O
quite	O
popular	O
and	O
was	O
rewritten	O
for	O
other	O
computers	O
than	O
the	O
IBM	B-Device
7090	I-Device
by	O
other	O
programmers	O
.	O
</s>
<s>
To	O
address	O
this	O
and	O
to	O
take	O
advantage	O
of	O
the	O
new	O
computers	O
being	O
introduced	O
in	O
the	O
late	O
1960s	O
,	O
the	O
decision	O
was	O
taken	O
to	O
develop	O
SNOBOL4	B-Application
with	O
many	O
extra	O
datatypes	O
and	O
features	O
but	O
based	O
on	O
a	O
virtual	B-Architecture
machine	I-Architecture
to	O
allow	O
improved	O
portability	O
across	O
computers	O
.	O
</s>
<s>
The	O
SNOBOL4	B-Application
language	O
translator	O
was	O
still	O
written	O
in	O
assembly	O
language	O
.	O
</s>
<s>
However	O
the	O
macro	O
features	O
of	O
the	O
assembler	O
were	O
used	O
to	O
define	O
the	O
virtual	B-Architecture
machine	I-Architecture
instructions	O
of	O
the	O
SNOBOL	B-Application
Implementation	O
Language	O
,	O
the	O
SIL	O
.	O
</s>
<s>
This	O
very	O
much	O
improved	O
the	O
portability	O
of	O
the	O
language	O
by	O
making	O
it	O
relatively	O
easy	O
to	O
port	O
the	O
virtual	B-Architecture
machine	I-Architecture
which	O
hosted	O
the	O
translator	O
by	O
recreating	O
its	O
virtual	O
instructions	O
on	O
any	O
machine	O
which	O
included	O
a	O
macro	O
assembler	O
or	O
indeed	O
a	O
high	O
level	O
language	O
.	O
</s>
<s>
The	O
machine-independent	O
language	O
SIL	O
arose	O
as	O
a	O
generalization	O
of	O
string	O
manipulation	O
macros	O
by	O
Douglas	O
McIlroy	O
,	O
which	O
were	O
used	O
extensively	O
in	O
the	O
initial	O
SNOBOL	B-Application
implementation	O
.	O
</s>
<s>
In	O
1969	O
,	O
McIlroy	O
influenced	O
the	O
language	O
again	O
by	O
insisting	O
on	O
addition	O
of	O
the	O
table	B-Application
type	O
to	O
SNOBOL4	B-Application
.	O
</s>
<s>
SNOBOL	B-Application
is	O
distinctive	O
in	O
format	O
and	O
programming	O
style	O
,	O
which	O
are	O
radically	O
different	O
from	O
contemporary	O
procedural	B-Application
languages	I-Application
such	O
as	O
Fortran	B-Application
and	O
ALGOL	B-Language
.	O
</s>
<s>
SNOBOL4	B-Application
supports	O
a	O
number	O
of	O
built-in	O
data	O
types	O
,	O
such	O
as	O
integers	O
and	O
limited	O
precision	O
real	O
numbers	O
,	O
strings	O
,	O
patterns	O
,	O
arrays	O
,	O
and	O
tables	O
(	O
associative	B-Application
arrays	I-Application
)	O
,	O
and	O
also	O
allows	O
the	O
programmer	O
to	O
define	O
additional	O
data	O
types	O
and	O
new	O
functions	O
.	O
</s>
<s>
SNOBOL4	B-Application
's	O
programmer-defined	O
data	O
type	O
facility	O
was	O
advanced	O
at	O
the	O
timeit	O
is	O
similar	O
to	O
the	O
records	O
of	O
the	O
earlier	O
COBOL	B-Application
and	O
the	O
later	O
Pascal	B-Application
programming	I-Application
languages	I-Application
.	O
</s>
<s>
In	O
general	O
,	O
the	O
subject	O
is	O
matched	O
against	O
the	O
pattern	B-Language
.	O
</s>
<s>
The	O
transfer	O
can	O
be	O
an	O
absolute	O
branch	O
or	O
a	O
conditional	O
branch	O
dependent	O
upon	O
the	O
success	O
or	O
failure	O
of	O
the	O
subject	O
evaluation	O
,	O
the	O
pattern	B-Language
evaluation	O
,	O
the	O
pattern	B-Language
match	I-Language
,	O
the	O
object	O
evaluation	O
or	O
the	O
final	O
assignment	O
.	O
</s>
<s>
It	O
can	O
also	O
be	O
a	O
transfer	O
to	O
code	O
created	O
and	O
compiled	B-Language
by	O
the	O
program	O
itself	O
during	O
a	O
run	O
.	O
</s>
<s>
A	O
SNOBOL	B-Application
pattern	B-Language
can	O
be	O
very	O
simple	O
or	O
extremely	O
complex	O
.	O
</s>
<s>
A	O
simple	O
pattern	B-Language
is	O
just	O
a	O
text	O
string	O
(	O
e.g.	O
</s>
<s>
"	O
ABCD	O
"	O
)	O
,	O
but	O
a	O
complex	O
pattern	B-Language
may	O
be	O
a	O
large	O
structure	O
describing	O
,	O
for	O
example	O
,	O
the	O
complete	O
grammar	O
of	O
a	O
computer	O
language	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
implement	O
a	O
language	O
interpreter	B-Application
in	O
SNOBOL	B-Application
almost	O
directly	O
from	O
a	O
Backus	O
–	O
Naur	O
form	O
expression	O
of	O
it	O
,	O
with	O
few	O
changes	O
.	O
</s>
<s>
Creating	O
a	O
macro	O
assembler	O
and	O
an	O
interpreter	B-Application
for	O
a	O
completely	O
theoretical	O
piece	O
of	O
hardware	O
could	O
take	O
as	O
little	O
as	O
a	O
few	O
hundred	O
lines	O
,	O
with	O
a	O
new	O
instruction	O
being	O
added	O
with	O
a	O
single	O
line	O
.	O
</s>
<s>
Complex	O
SNOBOL	B-Application
patterns	O
can	O
do	O
things	O
that	O
would	O
be	O
impractical	O
or	O
impossible	O
using	O
the	O
more	O
primitive	O
regular	B-Language
expressions	I-Language
used	O
in	O
most	O
other	O
pattern-matching	B-Language
languages	O
.	O
</s>
<s>
Some	O
of	O
this	O
power	O
derives	O
from	O
the	O
so-called	O
"	O
SPITBOL	B-Application
extensions	O
"	O
(	O
which	O
have	O
since	O
been	O
incorporated	O
in	O
basically	O
all	O
modern	O
implementations	O
of	O
the	O
original	O
SNOBOL	B-Application
4	I-Application
language	O
too	O
)	O
,	O
although	O
it	O
is	O
possible	O
to	O
achieve	O
the	O
same	O
power	O
without	O
them	O
.	O
</s>
<s>
Part	O
of	O
this	O
power	O
comes	O
from	O
the	O
side	O
effects	O
that	O
it	O
is	O
possible	O
to	O
produce	O
during	O
the	O
pattern	B-Language
matching	I-Language
operation	O
,	O
including	O
saving	O
numerous	O
intermediate/tentative	O
matching	O
results	O
and	O
the	O
ability	O
to	O
invoke	O
user-written	O
functions	O
during	O
the	O
pattern	B-Language
match	I-Language
which	O
can	O
perform	O
nearly	O
any	O
desired	O
processing	O
,	O
and	O
then	O
influence	O
the	O
ongoing	O
direction	O
the	O
interrupted	O
pattern	B-Language
match	I-Language
takes	O
,	O
or	O
even	O
to	O
indeed	O
change	O
the	O
pattern	B-Language
itself	O
during	O
the	O
matching	O
operation	O
.	O
</s>
<s>
Patterns	O
can	O
be	O
saved	O
like	O
any	O
other	O
first-class	O
data	O
item	O
,	O
and	O
can	O
be	O
concatenated	O
,	O
used	O
within	O
other	O
patterns	O
,	O
and	O
used	O
to	O
create	O
very	O
complex	O
and	O
sophisticated	O
pattern	B-Language
expressions	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
write	O
,	O
for	O
example	O
,	O
a	O
SNOBOL4	B-Application
pattern	B-Language
which	O
matches	O
"	O
a	O
complete	O
name	O
and	O
international	O
postal	O
mailing	O
address	O
"	O
,	O
which	O
is	O
well	O
beyond	O
anything	O
that	O
is	O
practical	O
to	O
even	O
attempt	O
using	O
regular	B-Language
expressions	I-Language
.	O
</s>
<s>
SNOBOL4	B-Application
pattern-matching	B-Language
uses	O
a	O
backtracking	O
algorithm	O
similar	O
to	O
that	O
used	O
in	O
the	O
logic	B-Language
programming	I-Language
language	I-Language
Prolog	B-Language
,	O
which	O
provides	O
pattern-like	O
constructs	O
via	O
DCGs	O
.	O
</s>
<s>
This	O
algorithm	O
makes	O
it	O
easier	O
to	O
use	O
SNOBOL	B-Application
as	O
a	O
logic	B-Language
programming	I-Language
language	I-Language
than	O
is	O
the	O
case	O
for	O
most	O
languages	O
.	O
</s>
<s>
SNOBOL	B-Application
stores	O
variables	O
,	O
strings	O
and	O
data	O
structures	O
in	O
a	O
single	O
garbage-collected	B-General_Concept
heap	O
.	O
</s>
<s>
The	O
classic	O
implementation	O
was	O
on	O
the	O
PDP-10	B-Device
;	O
it	O
has	O
been	O
used	O
to	O
study	O
compilers	B-Language
,	O
formal	O
grammars	O
,	O
and	O
artificial	B-Application
intelligence	I-Application
,	O
especially	O
machine	B-Application
translation	I-Application
and	O
machine	O
comprehension	O
of	O
natural	O
languages	O
.	O
</s>
<s>
The	O
original	O
implementation	O
was	O
on	O
an	O
IBM	B-Device
7090	I-Device
at	O
Bell	O
Labs	O
,	O
Holmdel	O
,	O
N.J.	O
SNOBOL4	B-Application
was	O
specifically	O
designed	O
for	O
portability	O
;	O
the	O
first	O
implementation	O
was	O
started	O
on	O
an	O
IBM	O
7094	O
in	O
1966	O
but	O
completed	O
on	O
an	O
IBM	O
360	O
in	O
1967	O
.	O
</s>
<s>
It	O
is	O
normally	O
implemented	O
as	O
an	O
interpreter	B-Application
because	O
of	O
the	O
difficulty	O
in	O
implementing	O
some	O
of	O
its	O
very	O
high-level	O
features	O
,	O
but	O
there	O
is	O
a	O
compiler	B-Language
,	O
the	O
SPITBOL	B-Application
compiler	I-Application
,	O
which	O
provides	O
nearly	O
all	O
the	O
facilities	O
that	O
the	O
interpreter	B-Application
provides	O
.	O
</s>
<s>
The	O
classic	O
implementation	O
on	O
the	O
PDP-10	B-Device
was	O
quite	O
slow	O
,	O
and	O
in	O
1972	O
James	O
Gimpel	O
of	O
Bell	O
Labs	O
,	O
Holmdel	O
,	O
N.J.	O
designed	O
a	O
native	O
implementation	O
of	O
SNOBOL4	B-Application
for	O
the	O
PDP-10	B-Device
that	O
he	O
named	O
SITBOL	O
.	O
</s>
<s>
Students	O
were	O
given	O
sections	O
to	O
implement	O
(	O
in	O
PDP-10	B-Device
assembler	O
)	O
and	O
the	O
entire	O
semester	O
was	O
focused	O
on	O
implementing	O
SITBOL	O
.	O
</s>
<s>
SITBOL	O
was	O
a	O
full-featured	O
,	O
high-performance	O
SNOBOL4	B-Application
interpreter	B-Application
.	O
</s>
<s>
The	O
Gnat	B-Language
Ada	B-Language
Compiler	B-Language
comes	O
with	O
a	O
package	O
(	O
GNAT.Spitbol	O
)	O
that	O
implements	O
all	O
of	O
the	O
Spitbol	B-Application
string	O
manipulation	O
semantics	O
.	O
</s>
<s>
This	O
can	O
be	O
called	O
from	O
within	O
an	O
Ada	B-Language
program	O
.	O
</s>
<s>
The	O
file	O
editor	O
for	O
the	O
Michigan	B-Application
Terminal	I-Application
System	I-Application
(	O
MTS	O
)	O
provided	O
pattern	B-Language
matching	I-Language
based	O
on	O
SNOBOL4	B-Application
patterns	O
.	O
</s>
<s>
Macro	O
SNOBOL4	B-Application
in	O
C	O
written	O
by	O
Phil	O
Budne	O
is	O
a	O
free	O
,	O
open	O
source	O
implementation	O
,	O
capable	O
of	O
running	O
on	O
almost	O
any	O
platform	O
.	O
</s>
<s>
Catspaw	O
,	O
Inc	O
provided	O
a	O
commercial	O
implementation	O
of	O
the	O
SNOBOL4	B-Application
language	O
for	O
many	O
different	O
computer	O
platforms	O
,	O
including	O
DOS	O
,	O
Macintosh	O
,	O
Sun	O
,	O
RS/6000	O
,	O
and	O
others	O
,	O
and	O
these	O
implementations	O
are	O
now	O
available	O
free	O
from	O
Catspaw	O
.	O
</s>
<s>
Minnesota	O
SNOBOL4	B-Application
,	O
by	O
Viktors	O
Berstis	O
,	O
the	O
closest	O
PC	O
implementation	O
to	O
the	O
original	O
IBM	O
mainframe	O
version	O
(	O
even	O
including	O
Fortran-like	O
FORMAT	O
statement	O
support	O
)	O
is	O
also	O
free	O
.	O
</s>
<s>
Although	O
SNOBOL	B-Application
itself	O
has	O
no	O
structured	B-Language
programming	I-Language
features	O
,	O
a	O
SNOBOL	B-Application
preprocessor	O
called	O
Snostorm	B-Language
was	O
designed	O
and	O
implemented	O
during	O
the	O
1970s	O
by	O
Fred	O
G	O
.	O
Swartz	O
for	O
use	O
under	O
the	O
Michigan	B-Application
Terminal	I-Application
System	I-Application
(	O
MTS	O
)	O
at	O
the	O
University	O
of	O
Michigan	O
.	O
</s>
<s>
Snostorm	B-Language
was	O
used	O
at	O
the	O
eight	O
to	O
fifteen	O
sites	O
that	O
ran	O
MTS	O
.	O
</s>
<s>
Snocone	O
by	O
Andrew	O
Koenig	O
adds	O
block-structured	O
constructs	O
to	O
the	O
SNOBOL4	B-Application
language	O
.	O
</s>
<s>
Snocone	O
is	O
a	O
self-contained	O
programming	O
language	O
,	O
rather	O
than	O
a	O
proper	O
superset	O
of	O
SNOBOL4	B-Application
.	O
</s>
<s>
The	O
SPITBOL	B-Application
implementation	O
also	O
introduced	O
a	O
number	O
of	O
features	O
which	O
,	O
while	O
not	O
using	O
traditional	O
structured	B-Language
programming	I-Language
keywords	O
,	O
nevertheless	O
can	O
be	O
used	O
to	O
provide	O
many	O
of	O
the	O
equivalent	O
capabilities	O
normally	O
thought	O
of	O
as	O
"	O
structured	B-Language
programming	I-Language
"	O
,	O
most	O
notably	O
nested	O
if/then/else	O
type	O
constructs	O
.	O
</s>
<s>
These	O
features	O
have	O
since	O
been	O
added	O
to	O
most	O
recent	O
SNOBOL4	B-Application
implementations	O
.	O
</s>
<s>
After	O
many	O
years	O
as	O
a	O
commercial	O
product	O
,	O
in	O
April	O
2009	O
SPITBOL	B-Application
was	O
released	O
as	O
free	O
software	O
under	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
.	O
</s>
<s>
According	O
to	O
Dave	O
Farber	O
,	O
he	O
,	O
Griswold	O
and	O
Polonsky	O
"	O
finally	O
arrived	O
at	O
the	O
name	O
Symbolic	O
EXpression	O
Interpreter	B-Application
SEXI.	O
"	O
</s>
<s>
Common	O
backronyms	O
of	O
"	O
SNOBOL	B-Application
"	O
are	O
'	O
String	B-Application
Oriented	I-Application
Symbolic	I-Application
Language	I-Application
 '	O
or	O
(	O
as	O
a	O
quasi-initialism	O
)	O
'	O
StriNg	B-Application
Oriented	I-Application
symBOlic	I-Application
Language	I-Application
 '	O
.	O
</s>
