Simple


LALR States


LALR State 0
Configuration Lookahead
<S'> ::= · <Statements> (EOF)  
<Statements> ::= · <Statements> <Statement> EOF assign display if while
<Statements> ::= · <Statement> EOF assign display if while
<Statement> ::= · display <Expression> EOF assign display if while
<Statement> ::= · display <Expression> read Id EOF assign display if while
<Statement> ::= · assign Id = <Expression> EOF assign display if while
<Statement> ::= · while <Expression> do <Statements> end EOF assign display if while
<Statement> ::= · if <Expression> then <Statements> end EOF assign display if while
<Statement> ::= · if <Expression> then <Statements> else <Statements> end EOF assign display if while
Actions
assign Shift 1
display Shift 2
if Shift 3
while Shift 4
<Statement> Goto 5
<Statements> Goto 6

LALR State 1
Configuration Lookahead
<Statement> ::= assign · Id = <Expression> EOF assign display else end if while
Actions
Id Shift 7

LALR State 2
Configuration Lookahead
<Statement> ::= display · <Expression> EOF assign display else end if while
<Statement> ::= display · <Expression> read Id EOF assign display else end if while
<Expression> ::= · <Expression> > <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= · <Expression> < <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= · <Expression> <= <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= · <Expression> >= <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= · <Expression> == <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= · <Expression> <> <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= · <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Add Exp> ::= · <Add Exp> + <Mult Exp> EOF - & + < <= <> == > >= assign display else end if read while
<Add Exp> ::= · <Add Exp> - <Mult Exp> EOF - & + < <= <> == > >= assign display else end if read while
<Add Exp> ::= · <Add Exp> & <Mult Exp> EOF - & + < <= <> == > >= assign display else end if read while
<Add Exp> ::= · <Mult Exp> EOF - & + < <= <> == > >= assign display else end if read while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & * / + < <= <> == > >= assign display else end if read while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & * / + < <= <> == > >= assign display else end if read while
<Mult Exp> ::= · <Negate Exp> EOF - & * / + < <= <> == > >= assign display else end if read while
<Negate Exp> ::= · - <Value> EOF - & * / + < <= <> == > >= assign display else end if read while
<Negate Exp> ::= · <Value> EOF - & * / + < <= <> == > >= assign display else end if read while
<Value> ::= · Id EOF - & * / + < <= <> == > >= assign display else end if read while
<Value> ::= · StringLiteral EOF - & * / + < <= <> == > >= assign display else end if read while
<Value> ::= · NumberLiteral EOF - & * / + < <= <> == > >= assign display else end if read while
<Value> ::= · ( <Expression> ) EOF - & * / + < <= <> == > >= assign display else end if read while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 13
<Expression> Goto 14
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 3
Configuration Lookahead
<Statement> ::= if · <Expression> then <Statements> end EOF assign display else end if while
<Statement> ::= if · <Expression> then <Statements> else <Statements> end EOF assign display else end if while
<Expression> ::= · <Expression> > <Add Exp> < <= <> == > >= then
<Expression> ::= · <Expression> < <Add Exp> < <= <> == > >= then
<Expression> ::= · <Expression> <= <Add Exp> < <= <> == > >= then
<Expression> ::= · <Expression> >= <Add Exp> < <= <> == > >= then
<Expression> ::= · <Expression> == <Add Exp> < <= <> == > >= then
<Expression> ::= · <Expression> <> <Add Exp> < <= <> == > >= then
<Expression> ::= · <Add Exp> < <= <> == > >= then
<Add Exp> ::= · <Add Exp> + <Mult Exp> - & + < <= <> == > >= then
<Add Exp> ::= · <Add Exp> - <Mult Exp> - & + < <= <> == > >= then
<Add Exp> ::= · <Add Exp> & <Mult Exp> - & + < <= <> == > >= then
<Add Exp> ::= · <Mult Exp> - & + < <= <> == > >= then
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> - & * / + < <= <> == > >= then
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> - & * / + < <= <> == > >= then
<Mult Exp> ::= · <Negate Exp> - & * / + < <= <> == > >= then
<Negate Exp> ::= · - <Value> - & * / + < <= <> == > >= then
<Negate Exp> ::= · <Value> - & * / + < <= <> == > >= then
<Value> ::= · Id - & * / + < <= <> == > >= then
<Value> ::= · StringLiteral - & * / + < <= <> == > >= then
<Value> ::= · NumberLiteral - & * / + < <= <> == > >= then
<Value> ::= · ( <Expression> ) - & * / + < <= <> == > >= then
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 13
<Expression> Goto 18
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 4
Configuration Lookahead
<Statement> ::= while · <Expression> do <Statements> end EOF assign display else end if while
<Expression> ::= · <Expression> > <Add Exp> < <= <> == > >= do
<Expression> ::= · <Expression> < <Add Exp> < <= <> == > >= do
<Expression> ::= · <Expression> <= <Add Exp> < <= <> == > >= do
<Expression> ::= · <Expression> >= <Add Exp> < <= <> == > >= do
<Expression> ::= · <Expression> == <Add Exp> < <= <> == > >= do
<Expression> ::= · <Expression> <> <Add Exp> < <= <> == > >= do
<Expression> ::= · <Add Exp> < <= <> == > >= do
<Add Exp> ::= · <Add Exp> + <Mult Exp> - & + < <= <> == > >= do
<Add Exp> ::= · <Add Exp> - <Mult Exp> - & + < <= <> == > >= do
<Add Exp> ::= · <Add Exp> & <Mult Exp> - & + < <= <> == > >= do
<Add Exp> ::= · <Mult Exp> - & + < <= <> == > >= do
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> - & * / + < <= <> == > >= do
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> - & * / + < <= <> == > >= do
<Mult Exp> ::= · <Negate Exp> - & * / + < <= <> == > >= do
<Negate Exp> ::= · - <Value> - & * / + < <= <> == > >= do
<Negate Exp> ::= · <Value> - & * / + < <= <> == > >= do
<Value> ::= · Id - & * / + < <= <> == > >= do
<Value> ::= · StringLiteral - & * / + < <= <> == > >= do
<Value> ::= · NumberLiteral - & * / + < <= <> == > >= do
<Value> ::= · ( <Expression> ) - & * / + < <= <> == > >= do
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 13
<Expression> Goto 19
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 5
Configuration Lookahead
<Statements> ::= <Statement> · EOF assign display else end if while
Actions
(EOF) Reduce Rule 1
assign Reduce Rule 1
display Reduce Rule 1
else Reduce Rule 1
end Reduce Rule 1
if Reduce Rule 1
while Reduce Rule 1

LALR State 6
Configuration Lookahead
<S'> ::= <Statements> · (EOF)  
<Statements> ::= <Statements> · <Statement> EOF assign display if while
<Statement> ::= · display <Expression> EOF assign display if while
<Statement> ::= · display <Expression> read Id EOF assign display if while
<Statement> ::= · assign Id = <Expression> EOF assign display if while
<Statement> ::= · while <Expression> do <Statements> end EOF assign display if while
<Statement> ::= · if <Expression> then <Statements> end EOF assign display if while
<Statement> ::= · if <Expression> then <Statements> else <Statements> end EOF assign display if while
Actions
(EOF) Accept
assign Shift 1
display Shift 2
if Shift 3
while Shift 4
<Statement> Goto 20

LALR State 7
Configuration Lookahead
<Statement> ::= assign Id · = <Expression> EOF assign display else end if while
Actions
= Shift 21

LALR State 8
Configuration Lookahead
<Negate Exp> ::= - · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Value> Goto 22

LALR State 9
Configuration Lookahead
<Value> ::= ( · <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Expression> ::= · <Expression> > <Add Exp> ) < <= <> == > >=
<Expression> ::= · <Expression> < <Add Exp> ) < <= <> == > >=
<Expression> ::= · <Expression> <= <Add Exp> ) < <= <> == > >=
<Expression> ::= · <Expression> >= <Add Exp> ) < <= <> == > >=
<Expression> ::= · <Expression> == <Add Exp> ) < <= <> == > >=
<Expression> ::= · <Expression> <> <Add Exp> ) < <= <> == > >=
<Expression> ::= · <Add Exp> ) < <= <> == > >=
<Add Exp> ::= · <Add Exp> + <Mult Exp> - & ) + < <= <> == > >=
<Add Exp> ::= · <Add Exp> - <Mult Exp> - & ) + < <= <> == > >=
<Add Exp> ::= · <Add Exp> & <Mult Exp> - & ) + < <= <> == > >=
<Add Exp> ::= · <Mult Exp> - & ) + < <= <> == > >=
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> - & ) * / + < <= <> == > >=
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> - & ) * / + < <= <> == > >=
<Mult Exp> ::= · <Negate Exp> - & ) * / + < <= <> == > >=
<Negate Exp> ::= · - <Value> - & ) * / + < <= <> == > >=
<Negate Exp> ::= · <Value> - & ) * / + < <= <> == > >=
<Value> ::= · Id - & ) * / + < <= <> == > >=
<Value> ::= · StringLiteral - & ) * / + < <= <> == > >=
<Value> ::= · NumberLiteral - & ) * / + < <= <> == > >=
<Value> ::= · ( <Expression> ) - & ) * / + < <= <> == > >=
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 13
<Expression> Goto 23
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 10
Configuration Lookahead
<Value> ::= Id · EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
(EOF) Reduce Rule 24
- Reduce Rule 24
& Reduce Rule 24
) Reduce Rule 24
* Reduce Rule 24
/ Reduce Rule 24
+ Reduce Rule 24
< Reduce Rule 24
<= Reduce Rule 24
<> Reduce Rule 24
== Reduce Rule 24
> Reduce Rule 24
>= Reduce Rule 24
assign Reduce Rule 24
display Reduce Rule 24
do Reduce Rule 24
else Reduce Rule 24
end Reduce Rule 24
if Reduce Rule 24
read Reduce Rule 24
then Reduce Rule 24
while Reduce Rule 24

LALR State 11
Configuration Lookahead
<Value> ::= NumberLiteral · EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
(EOF) Reduce Rule 26
- Reduce Rule 26
& Reduce Rule 26
) Reduce Rule 26
* Reduce Rule 26
/ Reduce Rule 26
+ Reduce Rule 26
< Reduce Rule 26
<= Reduce Rule 26
<> Reduce Rule 26
== Reduce Rule 26
> Reduce Rule 26
>= Reduce Rule 26
assign Reduce Rule 26
display Reduce Rule 26
do Reduce Rule 26
else Reduce Rule 26
end Reduce Rule 26
if Reduce Rule 26
read Reduce Rule 26
then Reduce Rule 26
while Reduce Rule 26

LALR State 12
Configuration Lookahead
<Value> ::= StringLiteral · EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
(EOF) Reduce Rule 25
- Reduce Rule 25
& Reduce Rule 25
) Reduce Rule 25
* Reduce Rule 25
/ Reduce Rule 25
+ Reduce Rule 25
< Reduce Rule 25
<= Reduce Rule 25
<> Reduce Rule 25
== Reduce Rule 25
> Reduce Rule 25
>= Reduce Rule 25
assign Reduce Rule 25
display Reduce Rule 25
do Reduce Rule 25
else Reduce Rule 25
end Reduce Rule 25
if Reduce Rule 25
read Reduce Rule 25
then Reduce Rule 25
while Reduce Rule 25

LALR State 13
Configuration Lookahead
<Expression> ::= <Add Exp> · EOF ) < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= <Add Exp> · + <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= <Add Exp> · - <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= <Add Exp> · & <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 24
& Shift 25
+ Shift 26
(EOF) Reduce Rule 14
) Reduce Rule 14
< Reduce Rule 14
<= Reduce Rule 14
<> Reduce Rule 14
== Reduce Rule 14
> Reduce Rule 14
>= Reduce Rule 14
assign Reduce Rule 14
display Reduce Rule 14
do Reduce Rule 14
else Reduce Rule 14
end Reduce Rule 14
if Reduce Rule 14
read Reduce Rule 14
then Reduce Rule 14
while Reduce Rule 14

LALR State 14
Configuration Lookahead
<Statement> ::= display <Expression> · EOF assign display else end if while
<Statement> ::= display <Expression> · read Id EOF assign display else end if while
<Expression> ::= <Expression> · > <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= <Expression> · < <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= <Expression> · <= <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= <Expression> · >= <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= <Expression> · == <Add Exp> EOF < <= <> == > >= assign display else end if read while
<Expression> ::= <Expression> · <> <Add Exp> EOF < <= <> == > >= assign display else end if read while
Actions
< Shift 27
<= Shift 28
<> Shift 29
== Shift 30
> Shift 31
>= Shift 32
read Shift 33
(EOF) Reduce Rule 2
assign Reduce Rule 2
display Reduce Rule 2
else Reduce Rule 2
end Reduce Rule 2
if Reduce Rule 2
while Reduce Rule 2

LALR State 15
Configuration Lookahead
<Add Exp> ::= <Mult Exp> · EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= <Mult Exp> · * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= <Mult Exp> · / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
* Shift 34
/ Shift 35
(EOF) Reduce Rule 18
- Reduce Rule 18
& Reduce Rule 18
) Reduce Rule 18
+ Reduce Rule 18
< Reduce Rule 18
<= Reduce Rule 18
<> Reduce Rule 18
== Reduce Rule 18
> Reduce Rule 18
>= Reduce Rule 18
assign Reduce Rule 18
display Reduce Rule 18
do Reduce Rule 18
else Reduce Rule 18
end Reduce Rule 18
if Reduce Rule 18
read Reduce Rule 18
then Reduce Rule 18
while Reduce Rule 18

LALR State 16
Configuration Lookahead
<Mult Exp> ::= <Negate Exp> · EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
(EOF) Reduce Rule 21
- Reduce Rule 21
& Reduce Rule 21
) Reduce Rule 21
* Reduce Rule 21
/ Reduce Rule 21
+ Reduce Rule 21
< Reduce Rule 21
<= Reduce Rule 21
<> Reduce Rule 21
== Reduce Rule 21
> Reduce Rule 21
>= Reduce Rule 21
assign Reduce Rule 21
display Reduce Rule 21
do Reduce Rule 21
else Reduce Rule 21
end Reduce Rule 21
if Reduce Rule 21
read Reduce Rule 21
then Reduce Rule 21
while Reduce Rule 21

LALR State 17
Configuration Lookahead
<Negate Exp> ::= <Value> · EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
(EOF) Reduce Rule 23
- Reduce Rule 23
& Reduce Rule 23
) Reduce Rule 23
* Reduce Rule 23
/ Reduce Rule 23
+ Reduce Rule 23
< Reduce Rule 23
<= Reduce Rule 23
<> Reduce Rule 23
== Reduce Rule 23
> Reduce Rule 23
>= Reduce Rule 23
assign Reduce Rule 23
display Reduce Rule 23
do Reduce Rule 23
else Reduce Rule 23
end Reduce Rule 23
if Reduce Rule 23
read Reduce Rule 23
then Reduce Rule 23
while Reduce Rule 23

LALR State 18
Configuration Lookahead
<Statement> ::= if <Expression> · then <Statements> end EOF assign display else end if while
<Statement> ::= if <Expression> · then <Statements> else <Statements> end EOF assign display else end if while
<Expression> ::= <Expression> · > <Add Exp> < <= <> == > >= then
<Expression> ::= <Expression> · < <Add Exp> < <= <> == > >= then
<Expression> ::= <Expression> · <= <Add Exp> < <= <> == > >= then
<Expression> ::= <Expression> · >= <Add Exp> < <= <> == > >= then
<Expression> ::= <Expression> · == <Add Exp> < <= <> == > >= then
<Expression> ::= <Expression> · <> <Add Exp> < <= <> == > >= then
Actions
< Shift 27
<= Shift 28
<> Shift 29
== Shift 30
> Shift 31
>= Shift 32
then Shift 36

LALR State 19
Configuration Lookahead
<Statement> ::= while <Expression> · do <Statements> end EOF assign display else end if while
<Expression> ::= <Expression> · > <Add Exp> < <= <> == > >= do
<Expression> ::= <Expression> · < <Add Exp> < <= <> == > >= do
<Expression> ::= <Expression> · <= <Add Exp> < <= <> == > >= do
<Expression> ::= <Expression> · >= <Add Exp> < <= <> == > >= do
<Expression> ::= <Expression> · == <Add Exp> < <= <> == > >= do
<Expression> ::= <Expression> · <> <Add Exp> < <= <> == > >= do
Actions
< Shift 27
<= Shift 28
<> Shift 29
== Shift 30
> Shift 31
>= Shift 32
do Shift 37

LALR State 20
Configuration Lookahead
<Statements> ::= <Statements> <Statement> · EOF assign display else end if while
Actions
(EOF) Reduce Rule 0
assign Reduce Rule 0
display Reduce Rule 0
else Reduce Rule 0
end Reduce Rule 0
if Reduce Rule 0
while Reduce Rule 0

LALR State 21
Configuration Lookahead
<Statement> ::= assign Id = · <Expression> EOF assign display else end if while
<Expression> ::= · <Expression> > <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= · <Expression> < <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= · <Expression> <= <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= · <Expression> >= <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= · <Expression> == <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= · <Expression> <> <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= · <Add Exp> EOF < <= <> == > >= assign display else end if while
<Add Exp> ::= · <Add Exp> + <Mult Exp> EOF - & + < <= <> == > >= assign display else end if while
<Add Exp> ::= · <Add Exp> - <Mult Exp> EOF - & + < <= <> == > >= assign display else end if while
<Add Exp> ::= · <Add Exp> & <Mult Exp> EOF - & + < <= <> == > >= assign display else end if while
<Add Exp> ::= · <Mult Exp> EOF - & + < <= <> == > >= assign display else end if while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & * / + < <= <> == > >= assign display else end if while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & * / + < <= <> == > >= assign display else end if while
<Mult Exp> ::= · <Negate Exp> EOF - & * / + < <= <> == > >= assign display else end if while
<Negate Exp> ::= · - <Value> EOF - & * / + < <= <> == > >= assign display else end if while
<Negate Exp> ::= · <Value> EOF - & * / + < <= <> == > >= assign display else end if while
<Value> ::= · Id EOF - & * / + < <= <> == > >= assign display else end if while
<Value> ::= · StringLiteral EOF - & * / + < <= <> == > >= assign display else end if while
<Value> ::= · NumberLiteral EOF - & * / + < <= <> == > >= assign display else end if while
<Value> ::= · ( <Expression> ) EOF - & * / + < <= <> == > >= assign display else end if while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 13
<Expression> Goto 38
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 22
Configuration Lookahead
<Negate Exp> ::= - <Value> · EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
(EOF) Reduce Rule 22
- Reduce Rule 22
& Reduce Rule 22
) Reduce Rule 22
* Reduce Rule 22
/ Reduce Rule 22
+ Reduce Rule 22
< Reduce Rule 22
<= Reduce Rule 22
<> Reduce Rule 22
== Reduce Rule 22
> Reduce Rule 22
>= Reduce Rule 22
assign Reduce Rule 22
display Reduce Rule 22
do Reduce Rule 22
else Reduce Rule 22
end Reduce Rule 22
if Reduce Rule 22
read Reduce Rule 22
then Reduce Rule 22
while Reduce Rule 22

LALR State 23
Configuration Lookahead
<Value> ::= ( <Expression> · ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Expression> ::= <Expression> · > <Add Exp> ) < <= <> == > >=
<Expression> ::= <Expression> · < <Add Exp> ) < <= <> == > >=
<Expression> ::= <Expression> · <= <Add Exp> ) < <= <> == > >=
<Expression> ::= <Expression> · >= <Add Exp> ) < <= <> == > >=
<Expression> ::= <Expression> · == <Add Exp> ) < <= <> == > >=
<Expression> ::= <Expression> · <> <Add Exp> ) < <= <> == > >=
Actions
) Shift 39
< Shift 27
<= Shift 28
<> Shift 29
== Shift 30
> Shift 31
>= Shift 32

LALR State 24
Configuration Lookahead
<Add Exp> ::= <Add Exp> - · <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Mult Exp> Goto 40
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 25
Configuration Lookahead
<Add Exp> ::= <Add Exp> & · <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Mult Exp> Goto 41
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 26
Configuration Lookahead
<Add Exp> ::= <Add Exp> + · <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Mult Exp> Goto 42
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 27
Configuration Lookahead
<Expression> ::= <Expression> < · <Add Exp> EOF ) < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> + <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> - <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> & <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 43
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 28
Configuration Lookahead
<Expression> ::= <Expression> <= · <Add Exp> EOF ) < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> + <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> - <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> & <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 44
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 29
Configuration Lookahead
<Expression> ::= <Expression> <> · <Add Exp> EOF ) < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> + <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> - <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> & <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 45
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 30
Configuration Lookahead
<Expression> ::= <Expression> == · <Add Exp> EOF ) < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> + <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> - <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> & <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 46
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 31
Configuration Lookahead
<Expression> ::= <Expression> > · <Add Exp> EOF ) < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> + <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> - <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> & <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 47
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 32
Configuration Lookahead
<Expression> ::= <Expression> >= · <Add Exp> EOF ) < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> + <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> - <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Add Exp> & <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Add Exp> ::= · <Mult Exp> EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Mult Exp> / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Add Exp> Goto 48
<Mult Exp> Goto 15
<Negate Exp> Goto 16
<Value> Goto 17

LALR State 33
Configuration Lookahead
<Statement> ::= display <Expression> read · Id EOF assign display else end if while
Actions
Id Shift 49

LALR State 34
Configuration Lookahead
<Mult Exp> ::= <Mult Exp> * · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Negate Exp> Goto 50
<Value> Goto 17

LALR State 35
Configuration Lookahead
<Mult Exp> ::= <Mult Exp> / · <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · - <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Negate Exp> ::= · <Value> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · Id EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · StringLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · NumberLiteral EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Value> ::= · ( <Expression> ) EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
- Shift 8
( Shift 9
Id Shift 10
NumberLiteral Shift 11
StringLiteral Shift 12
<Negate Exp> Goto 51
<Value> Goto 17

LALR State 36
Configuration Lookahead
<Statement> ::= if <Expression> then · <Statements> end EOF assign display else end if while
<Statement> ::= if <Expression> then · <Statements> else <Statements> end EOF assign display else end if while
<Statements> ::= · <Statements> <Statement> assign display else end if while
<Statements> ::= · <Statement> assign display else end if while
<Statement> ::= · display <Expression> assign display else end if while
<Statement> ::= · display <Expression> read Id assign display else end if while
<Statement> ::= · assign Id = <Expression> assign display else end if while
<Statement> ::= · while <Expression> do <Statements> end assign display else end if while
<Statement> ::= · if <Expression> then <Statements> end assign display else end if while
<Statement> ::= · if <Expression> then <Statements> else <Statements> end assign display else end if while
Actions
assign Shift 1
display Shift 2
if Shift 3
while Shift 4
<Statement> Goto 5
<Statements> Goto 52

LALR State 37
Configuration Lookahead
<Statement> ::= while <Expression> do · <Statements> end EOF assign display else end if while
<Statements> ::= · <Statements> <Statement> assign display end if while
<Statements> ::= · <Statement> assign display end if while
<Statement> ::= · display <Expression> assign display end if while
<Statement> ::= · display <Expression> read Id assign display end if while
<Statement> ::= · assign Id = <Expression> assign display end if while
<Statement> ::= · while <Expression> do <Statements> end assign display end if while
<Statement> ::= · if <Expression> then <Statements> end assign display end if while
<Statement> ::= · if <Expression> then <Statements> else <Statements> end assign display end if while
Actions
assign Shift 1
display Shift 2
if Shift 3
while Shift 4
<Statement> Goto 5
<Statements> Goto 53

LALR State 38
Configuration Lookahead
<Statement> ::= assign Id = <Expression> · EOF assign display else end if while
<Expression> ::= <Expression> · > <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= <Expression> · < <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= <Expression> · <= <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= <Expression> · >= <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= <Expression> · == <Add Exp> EOF < <= <> == > >= assign display else end if while
<Expression> ::= <Expression> · <> <Add Exp> EOF < <= <> == > >= assign display else end if while
Actions
< Shift 27
<= Shift 28
<> Shift 29
== Shift 30
> Shift 31
>= Shift 32
(EOF) Reduce Rule 4
assign Reduce Rule 4
display Reduce Rule 4
else Reduce Rule 4
end Reduce Rule 4
if Reduce Rule 4
while Reduce Rule 4

LALR State 39
Configuration Lookahead
<Value> ::= ( <Expression> ) · EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
(EOF) Reduce Rule 27
- Reduce Rule 27
& Reduce Rule 27
) Reduce Rule 27
* Reduce Rule 27
/ Reduce Rule 27
+ Reduce Rule 27
< Reduce Rule 27
<= Reduce Rule 27
<> Reduce Rule 27
== Reduce Rule 27
> Reduce Rule 27
>= Reduce Rule 27
assign Reduce Rule 27
display Reduce Rule 27
do Reduce Rule 27
else Reduce Rule 27
end Reduce Rule 27
if Reduce Rule 27
read Reduce Rule 27
then Reduce Rule 27
while Reduce Rule 27

LALR State 40
Configuration Lookahead
<Add Exp> ::= <Add Exp> - <Mult Exp> · EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= <Mult Exp> · * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= <Mult Exp> · / <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while
Actions
* Shift 34
/ Shift 35
(EOF) Reduce Rule 16
- Reduce Rule 16
& Reduce Rule 16
) Reduce Rule 16
+ Reduce Rule 16
< Reduce Rule 16
<= Reduce Rule 16
<> Reduce Rule 16
== Reduce Rule 16
> Reduce Rule 16
>= Reduce Rule 16
assign Reduce Rule 16
display Reduce Rule 16
do Reduce Rule 16
else Reduce Rule 16
end Reduce Rule 16
if Reduce Rule 16
read Reduce Rule 16
then Reduce Rule 16
while Reduce Rule 16

LALR State 41
Configuration Lookahead
<Add Exp> ::= <Add Exp> & <Mult Exp> · EOF - & ) + < <= <> == > >= assign display do else end if read then while
<Mult Exp> ::= <Mult Exp> · * <Negate Exp> EOF - & ) * / + < <= <> == > >= assign display do else end if read then while