<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
Simple	O
LR	O
or	O
SLR	B-Application
parser	I-Application
is	O
a	O
type	O
of	O
LR	B-Application
parser	I-Application
with	O
small	O
parse	O
tables	O
and	O
a	O
relatively	O
simple	O
parser	O
generator	O
algorithm	O
.	O
</s>
<s>
As	O
with	O
other	O
types	O
of	O
LR(1 )	O
parser	O
,	O
an	O
SLR	B-Application
parser	I-Application
is	O
quite	O
efficient	O
at	O
finding	O
the	O
single	O
correct	O
bottom-up	B-Application
parse	I-Application
in	O
a	O
single	O
left-to-right	O
scan	O
over	O
the	O
input	O
stream	O
,	O
without	O
guesswork	O
or	O
backtracking	O
.	O
</s>
<s>
SLR	O
and	O
the	O
more-general	O
methods	O
LALR	B-Application
parser	I-Application
and	O
Canonical	B-Application
LR	I-Application
parser	I-Application
have	O
identical	O
methods	O
and	O
similar	O
tables	O
at	O
parse	O
time	O
;	O
they	O
differ	O
only	O
in	O
the	O
mathematical	O
grammar	O
analysis	O
algorithms	O
used	O
by	O
the	O
parser	O
generator	O
tool	O
.	O
</s>
<s>
SLR	O
and	O
LALR	B-Application
generators	O
create	O
tables	O
of	O
identical	O
size	O
and	O
identical	O
parser	O
states	O
.	O
</s>
<s>
SLR	O
generators	O
accept	O
fewer	O
grammars	O
than	O
do	O
LALR	B-Application
generators	O
like	O
yacc	B-Application
and	O
Bison	B-Application
.	O
</s>
<s>
So	O
LALR	B-Application
generators	O
have	O
become	O
much	O
more	O
widely	O
used	O
than	O
SLR	O
generators	O
,	O
despite	O
being	O
somewhat	O
more	O
complicated	O
tools	O
.	O
</s>
<s>
SLR	O
and	O
LALR	B-Application
were	O
both	O
developed	O
by	O
Frank	O
DeRemer	O
as	O
the	O
first	O
practical	O
uses	O
of	O
Donald	O
Knuth	O
's	O
LR	B-Application
parser	I-Application
theory	O
.	O
</s>
<s>
The	O
tables	O
created	O
for	O
real	O
grammars	O
by	O
full	O
LR	O
methods	O
were	O
impractically	O
large	O
,	O
larger	O
than	O
most	O
computer	O
memories	O
of	O
that	O
decade	O
,	O
with	O
100	O
times	O
or	O
more	O
parser	O
states	O
than	O
the	O
SLR	O
and	O
LALR	B-Application
methods	O
..	O
</s>
<s>
To	O
understand	O
the	O
differences	O
between	O
SLR	O
and	O
LALR	B-Application
,	O
it	O
is	O
important	O
to	O
understand	O
their	O
many	O
similarities	O
and	O
how	O
they	O
both	O
make	O
shift-reduce	O
decisions	O
.	O
</s>
<s>
(	O
See	O
the	O
article	O
LR	B-Application
parser	I-Application
now	O
for	O
that	O
background	O
,	O
up	O
through	O
the	O
section	O
on	O
reductions	O
 '	O
lookahead	O
sets	O
.	O
)	O
</s>
<s>
The	O
one	O
difference	O
between	O
SLR	O
and	O
LALR	B-Application
is	O
how	O
their	O
generators	O
calculate	O
the	O
lookahead	O
sets	O
of	O
input	O
symbols	O
that	O
should	O
appear	O
next	O
,	O
whenever	O
some	O
completed	O
production	O
rule	O
is	O
found	O
and	O
reduced	O
.	O
</s>
<s>
LALR	B-Application
generators	O
calculate	O
lookahead	O
sets	O
by	O
a	O
more	O
precise	O
method	O
based	O
on	O
exploring	O
the	O
graph	O
of	O
parser	O
states	O
and	O
their	O
transitions	O
.	O
</s>
<s>
It	O
customizes	O
the	O
handling	O
of	O
each	O
grammar	O
occurrence	O
of	O
some	O
nonterminal	O
S	O
.	O
See	O
article	O
LALR	B-Application
parser	I-Application
for	O
further	O
details	O
of	O
this	O
calculation	O
.	O
</s>
<s>
The	O
lookahead	O
sets	O
calculated	O
by	O
LALR	B-Application
generators	O
are	O
a	O
subset	O
of	O
(	O
and	O
hence	O
better	O
than	O
)	O
the	O
approximate	O
sets	O
calculated	O
by	O
SLR	O
generators	O
.	O
</s>
<s>
If	O
a	O
grammar	O
has	O
table	O
conflicts	O
when	O
using	O
SLR	O
follow	O
sets	O
,	O
but	O
is	O
conflict-free	O
when	O
using	O
LALR	B-Application
follow	O
sets	O
,	O
it	O
is	O
called	O
a	O
LALR	B-Application
grammar	O
.	O
</s>
<s>
A	O
grammar	O
that	O
can	O
be	O
parsed	O
by	O
an	O
SLR	B-Application
parser	I-Application
but	O
not	O
by	O
an	O
LR(0 )	O
parser	O
is	O
the	O
following	O
:	O
</s>
