

Terminals which are not used:

   ARRAY
   OF
   POINTER
   TO
   RECORD
   PROCEDURE



Grammar
rule 1    program -> MODULE IDENTIFIER ';' declarations BEGIN statementlist END IDENTIFIER '.'
rule 2    declarations -> declarations ';' declaration
rule 3    declarations -> declaration
rule 4    declaration -> type_decl
rule 5    declaration -> var_decl
rule 6    declaration -> proc_decl
rule 7    type_decl -> TYPE type_tail
rule 8    type_tail -> type_tail IDENTIFIER '=' typedenoter ';'
rule 9    type_tail -> IDENTIFIER '=' typedenoter ';'
rule 10   var_decl -> VAR var_tail
rule 11   var_tail -> var_tail var_id_list ':' typedenoter ';'
rule 12   var_tail -> var_id_list ':' typedenoter ';'
rule 13   var_id_list -> var_id_list ',' IDENTIFIER
rule 14   var_id_list -> IDENTIFIER
rule 15   proc_decl -> IDENTIFIER '(' ')' proc_type ';' declarations BEGIN statementlist END IDENTIFIER ';'
rule 16   proc_type -> ':' typedenoter
rule 17   proc_type ->		/* empty */
rule 18   typedenoter -> IDENTIFIER
rule 19   typedenoter -> INTEGER
rule 20   typedenoter -> BOOLEAN
rule 21   statementlist -> statementlist ';' statement
rule 22   statementlist -> statement
rule 23   statement -> assign_statement
rule 24   statement -> if_then_else_statement
rule 25   statement -> while_do_statement
rule 26   statement -> proc_statement
rule 27   statement -> return_statement
rule 28   assign_statement -> IDENTIFIER ':' '=' expression
rule 29   if_then_else_statement -> IF expression THEN statementlist else_part END
rule 30   else_part -> ELSE statementlist
rule 31   else_part ->		/* empty */
rule 32   while_do_statement -> WHILE expression DO statementlist END
rule 33   proc_statement -> IDENTIFIER '(' ')'
rule 34   return_statement -> RETURN return_tail
rule 35   return_tail -> expression
rule 36   return_tail ->		/* empty */
rule 37   expression -> expression rel_op sign_part exp_rest
rule 38   expression -> sign_part exp_rest
rule 39   rel_op -> '<'
rule 40   rel_op -> '='
rule 41   rel_op -> '>'
rule 42   sign_part -> '+'
rule 43   sign_part -> '-'
rule 44   sign_part ->		/* empty */
rule 45   exp_rest -> exp_rest bin_op not_list term
rule 46   exp_rest -> not_list term
rule 47   bin_op -> '*'
rule 48   bin_op -> '+'
rule 49   bin_op -> '-'
rule 50   bin_op -> OR
rule 51   bin_op -> AND
rule 52   not_list -> not_list NOT
rule 53   not_list -> NOT
rule 54   term -> TRUE
rule 55   term -> FALSE
rule 56   term -> NUMBER
rule 57   term -> IDENTIFIER
rule 58   term -> IDENTIFIER '(' ')'
rule 59   term -> '(' expression ')'

Terminals, with rules where they appear

$ (-1)
'(' (40) 15 33 58 59
')' (41) 15 33 58 59
'*' (42) 47
'+' (43) 42 48
',' (44) 13
'-' (45) 43 49
'.' (46) 1
':' (58) 11 12 16 28
';' (59) 1 2 8 9 11 12 15 21
'<' (60) 39
'=' (61) 8 9 28 40
'>' (62) 41
error (256)
IDENTIFIER (258) 1 8 9 13 14 15 18 28 33 57 58
NUMBER (259) 56
MODULE (260) 1
BEGIN (261) 1 15
END (262) 1 15 29 32
ARRAY (263)
OF (264)
POINTER (265)
TO (266)
RECORD (267)
TRUE (268) 54
FALSE (269) 55
IF (270) 29
THEN (271) 29
ELSE (272) 30
WHILE (273) 32
DO (274) 32
RETURN (275) 34
INTEGER (276) 19
BOOLEAN (277) 20
TYPE (278) 7
VAR (279) 10
PROCEDURE (280)
OR (281) 50
AND (282) 51
NOT (283) 52 53

Nonterminals, with rules where they appear

program (41)
    on left: 1
declarations (42)
    on left: 2 3, on right: 1 2 15
declaration (43)
    on left: 4 5 6, on right: 2 3
type_decl (44)
    on left: 7, on right: 4
type_tail (45)
    on left: 8 9, on right: 7 8
var_decl (46)
    on left: 10, on right: 5
var_tail (47)
    on left: 11 12, on right: 10 11
var_id_list (48)
    on left: 13 14, on right: 11 12 13
proc_decl (49)
    on left: 15, on right: 6
proc_type (50)
    on left: 16 17, on right: 15
typedenoter (51)
    on left: 18 19 20, on right: 8 9 11 12 16
statementlist (52)
    on left: 21 22, on right: 1 15 21 29 30 32
statement (53)
    on left: 23 24 25 26 27, on right: 21 22
assign_statement (54)
    on left: 28, on right: 23
if_then_else_statement (55)
    on left: 29, on right: 24
else_part (56)
    on left: 30 31, on right: 29
while_do_statement (57)
    on left: 32, on right: 25
proc_statement (58)
    on left: 33, on right: 26
return_statement (59)
    on left: 34, on right: 27
return_tail (60)
    on left: 35 36, on right: 34
expression (61)
    on left: 37 38, on right: 28 29 32 35 37 59
rel_op (62)
    on left: 39 40 41, on right: 37
sign_part (63)
    on left: 42 43 44, on right: 37 38
exp_rest (64)
    on left: 45 46, on right: 37 38 45
bin_op (65)
    on left: 47 48 49 50 51, on right: 45
not_list (66)
    on left: 52 53, on right: 45 46 52
term (67)
    on left: 54 55 56 57 58 59, on right: 45 46


state 0

    MODULE	shift, and go to state 1

    program	go to state 116



state 1

    program  ->  MODULE . IDENTIFIER ';' declarations BEGIN statementlist END IDENTIFIER '.'   (rule 1)

    IDENTIFIER	shift, and go to state 2



state 2

    program  ->  MODULE IDENTIFIER . ';' declarations BEGIN statementlist END IDENTIFIER '.'   (rule 1)

    ';' 	shift, and go to state 3



state 3

    program  ->  MODULE IDENTIFIER ';' . declarations BEGIN statementlist END IDENTIFIER '.'   (rule 1)

    IDENTIFIER	shift, and go to state 4
    TYPE	shift, and go to state 5
    VAR 	shift, and go to state 6

    declarations	go to state 7
    declaration	go to state 8
    type_decl	go to state 9
    var_decl	go to state 10
    proc_decl	go to state 11



state 4

    proc_decl  ->  IDENTIFIER . '(' ')' proc_type ';' declarations BEGIN statementlist END IDENTIFIER ';'   (rule 15)

    '(' 	shift, and go to state 12



state 5

    type_decl  ->  TYPE . type_tail   (rule 7)

    IDENTIFIER	shift, and go to state 13

    type_tail	go to state 14



state 6

    var_decl  ->  VAR . var_tail   (rule 10)

    IDENTIFIER	shift, and go to state 15

    var_tail	go to state 16
    var_id_list	go to state 17



state 7

    program  ->  MODULE IDENTIFIER ';' declarations . BEGIN statementlist END IDENTIFIER '.'   (rule 1)
    declarations  ->  declarations . ';' declaration   (rule 2)

    BEGIN	shift, and go to state 18
    ';' 	shift, and go to state 19



state 8

    declarations  ->  declaration .   (rule 3)

    $default	reduce using rule 3 (declarations)



state 9

    declaration  ->  type_decl .   (rule 4)

    $default	reduce using rule 4 (declaration)



state 10

    declaration  ->  var_decl .   (rule 5)

    $default	reduce using rule 5 (declaration)



state 11

    declaration  ->  proc_decl .   (rule 6)

    $default	reduce using rule 6 (declaration)



state 12

    proc_decl  ->  IDENTIFIER '(' . ')' proc_type ';' declarations BEGIN statementlist END IDENTIFIER ';'   (rule 15)

    ')' 	shift, and go to state 20



state 13

    type_tail  ->  IDENTIFIER . '=' typedenoter ';'   (rule 9)

    '=' 	shift, and go to state 21



state 14

    type_decl  ->  TYPE type_tail .   (rule 7)
    type_tail  ->  type_tail . IDENTIFIER '=' typedenoter ';'   (rule 8)

    IDENTIFIER	shift, and go to state 22

    $default	reduce using rule 7 (type_decl)



state 15

    var_id_list  ->  IDENTIFIER .   (rule 14)

    $default	reduce using rule 14 (var_id_list)



state 16

    var_decl  ->  VAR var_tail .   (rule 10)
    var_tail  ->  var_tail . var_id_list ':' typedenoter ';'   (rule 11)

    IDENTIFIER	shift, and go to state 15

    $default	reduce using rule 10 (var_decl)

    var_id_list	go to state 23



state 17

    var_tail  ->  var_id_list . ':' typedenoter ';'   (rule 12)
    var_id_list  ->  var_id_list . ',' IDENTIFIER   (rule 13)

    ':' 	shift, and go to state 24
    ',' 	shift, and go to state 25



state 18

    program  ->  MODULE IDENTIFIER ';' declarations BEGIN . statementlist END IDENTIFIER '.'   (rule 1)

    IDENTIFIER	shift, and go to state 26
    IF  	shift, and go to state 27
    WHILE	shift, and go to state 28
    RETURN	shift, and go to state 29

    statementlist	go to state 30
    statement	go to state 31
    assign_statement	go to state 32
    if_then_else_statement	go to state 33
    while_do_statement	go to state 34
    proc_statement	go to state 35
    return_statement	go to state 36



state 19

    declarations  ->  declarations ';' . declaration   (rule 2)

    IDENTIFIER	shift, and go to state 4
    TYPE	shift, and go to state 5
    VAR 	shift, and go to state 6

    declaration	go to state 37
    type_decl	go to state 9
    var_decl	go to state 10
    proc_decl	go to state 11



state 20

    proc_decl  ->  IDENTIFIER '(' ')' . proc_type ';' declarations BEGIN statementlist END IDENTIFIER ';'   (rule 15)

    ':' 	shift, and go to state 38

    $default	reduce using rule 17 (proc_type)

    proc_type	go to state 39



state 21

    type_tail  ->  IDENTIFIER '=' . typedenoter ';'   (rule 9)

    IDENTIFIER	shift, and go to state 40
    INTEGER	shift, and go to state 41
    BOOLEAN	shift, and go to state 42

    typedenoter	go to state 43



state 22

    type_tail  ->  type_tail IDENTIFIER . '=' typedenoter ';'   (rule 8)

    '=' 	shift, and go to state 44



state 23

    var_tail  ->  var_tail var_id_list . ':' typedenoter ';'   (rule 11)
    var_id_list  ->  var_id_list . ',' IDENTIFIER   (rule 13)

    ':' 	shift, and go to state 45
    ',' 	shift, and go to state 25



state 24

    var_tail  ->  var_id_list ':' . typedenoter ';'   (rule 12)

    IDENTIFIER	shift, and go to state 40
    INTEGER	shift, and go to state 41
    BOOLEAN	shift, and go to state 42

    typedenoter	go to state 46



state 25

    var_id_list  ->  var_id_list ',' . IDENTIFIER   (rule 13)

    IDENTIFIER	shift, and go to state 47



state 26

    assign_statement  ->  IDENTIFIER . ':' '=' expression   (rule 28)
    proc_statement  ->  IDENTIFIER . '(' ')'   (rule 33)

    '(' 	shift, and go to state 48
    ':' 	shift, and go to state 49



state 27

    if_then_else_statement  ->  IF . expression THEN statementlist else_part END   (rule 29)

    '+' 	shift, and go to state 50
    '-' 	shift, and go to state 51

    $default	reduce using rule 44 (sign_part)

    expression	go to state 52
    sign_part	go to state 53



state 28

    while_do_statement  ->  WHILE . expression DO statementlist END   (rule 32)

    '+' 	shift, and go to state 50
    '-' 	shift, and go to state 51

    $default	reduce using rule 44 (sign_part)

    expression	go to state 54
    sign_part	go to state 53



state 29

    return_statement  ->  RETURN . return_tail   (rule 34)

    '+' 	shift, and go to state 50
    '-' 	shift, and go to state 51

    $default	reduce using rule 36 (return_tail)

    return_tail	go to state 55
    expression	go to state 56
    sign_part	go to state 53



state 30

    program  ->  MODULE IDENTIFIER ';' declarations BEGIN statementlist . END IDENTIFIER '.'   (rule 1)
    statementlist  ->  statementlist . ';' statement   (rule 21)

    END 	shift, and go to state 57
    ';' 	shift, and go to state 58



state 31

    statementlist  ->  statement .   (rule 22)

    $default	reduce using rule 22 (statementlist)



state 32

    statement  ->  assign_statement .   (rule 23)

    $default	reduce using rule 23 (statement)



state 33

    statement  ->  if_then_else_statement .   (rule 24)

    $default	reduce using rule 24 (statement)



state 34

    statement  ->  while_do_statement .   (rule 25)

    $default	reduce using rule 25 (statement)



state 35

    statement  ->  proc_statement .   (rule 26)

    $default	reduce using rule 26 (statement)



state 36

    statement  ->  return_statement .   (rule 27)

    $default	reduce using rule 27 (statement)



state 37

    declarations  ->  declarations ';' declaration .   (rule 2)

    $default	reduce using rule 2 (declarations)



state 38

    proc_type  ->  ':' . typedenoter   (rule 16)

    IDENTIFIER	shift, and go to state 40
    INTEGER	shift, and go to state 41
    BOOLEAN	shift, and go to state 42

    typedenoter	go to state 59



state 39

    proc_decl  ->  IDENTIFIER '(' ')' proc_type . ';' declarations BEGIN statementlist END IDENTIFIER ';'   (rule 15)

    ';' 	shift, and go to state 60



state 40

    typedenoter  ->  IDENTIFIER .   (rule 18)

    $default	reduce using rule 18 (typedenoter)



state 41

    typedenoter  ->  INTEGER .   (rule 19)

    $default	reduce using rule 19 (typedenoter)



state 42

    typedenoter  ->  BOOLEAN .   (rule 20)

    $default	reduce using rule 20 (typedenoter)



state 43

    type_tail  ->  IDENTIFIER '=' typedenoter . ';'   (rule 9)

    ';' 	shift, and go to state 61



state 44

    type_tail  ->  type_tail IDENTIFIER '=' . typedenoter ';'   (rule 8)

    IDENTIFIER	shift, and go to state 40
    INTEGER	shift, and go to state 41
    BOOLEAN	shift, and go to state 42

    typedenoter	go to state 62



state 45

    var_tail  ->  var_tail var_id_list ':' . typedenoter ';'   (rule 11)

    IDENTIFIER	shift, and go to state 40
    INTEGER	shift, and go to state 41
    BOOLEAN	shift, and go to state 42

    typedenoter	go to state 63



state 46

    var_tail  ->  var_id_list ':' typedenoter . ';'   (rule 12)

    ';' 	shift, and go to state 64



state 47

    var_id_list  ->  var_id_list ',' IDENTIFIER .   (rule 13)

    $default	reduce using rule 13 (var_id_list)



state 48

    proc_statement  ->  IDENTIFIER '(' . ')'   (rule 33)

    ')' 	shift, and go to state 65



state 49

    assign_statement  ->  IDENTIFIER ':' . '=' expression   (rule 28)

    '=' 	shift, and go to state 66



state 50

    sign_part  ->  '+' .   (rule 42)

    $default	reduce using rule 42 (sign_part)



state 51

    sign_part  ->  '-' .   (rule 43)

    $default	reduce using rule 43 (sign_part)



state 52

    if_then_else_statement  ->  IF expression . THEN statementlist else_part END   (rule 29)
    expression  ->  expression . rel_op sign_part exp_rest   (rule 37)

    THEN	shift, and go to state 67
    '<' 	shift, and go to state 68
    '=' 	shift, and go to state 69
    '>' 	shift, and go to state 70

    rel_op	go to state 71



state 53

    expression  ->  sign_part . exp_rest   (rule 38)

    NOT 	shift, and go to state 72

    exp_rest	go to state 73
    not_list	go to state 74



state 54

    while_do_statement  ->  WHILE expression . DO statementlist END   (rule 32)
    expression  ->  expression . rel_op sign_part exp_rest   (rule 37)

    DO  	shift, and go to state 75
    '<' 	shift, and go to state 68
    '=' 	shift, and go to state 69
    '>' 	shift, and go to state 70

    rel_op	go to state 71



state 55

    return_statement  ->  RETURN return_tail .   (rule 34)

    $default	reduce using rule 34 (return_statement)



state 56

    return_tail  ->  expression .   (rule 35)
    expression  ->  expression . rel_op sign_part exp_rest   (rule 37)

    '<' 	shift, and go to state 68
    '=' 	shift, and go to state 69
    '>' 	shift, and go to state 70

    $default	reduce using rule 35 (return_tail)

    rel_op	go to state 71



state 57

    program  ->  MODULE IDENTIFIER ';' declarations BEGIN statementlist END . IDENTIFIER '.'   (rule 1)

    IDENTIFIER	shift, and go to state 76



state 58

    statementlist  ->  statementlist ';' . statement   (rule 21)

    IDENTIFIER	shift, and go to state 26
    IF  	shift, and go to state 27
    WHILE	shift, and go to state 28
    RETURN	shift, and go to state 29

    statement	go to state 77
    assign_statement	go to state 32
    if_then_else_statement	go to state 33
    while_do_statement	go to state 34
    proc_statement	go to state 35
    return_statement	go to state 36



state 59

    proc_type  ->  ':' typedenoter .   (rule 16)

    $default	reduce using rule 16 (proc_type)



state 60

    proc_decl  ->  IDENTIFIER '(' ')' proc_type ';' . declarations BEGIN statementlist END IDENTIFIER ';'   (rule 15)

    IDENTIFIER	shift, and go to state 4
    TYPE	shift, and go to state 5
    VAR 	shift, and go to state 6

    declarations	go to state 78
    declaration	go to state 8
    type_decl	go to state 9
    var_decl	go to state 10
    proc_decl	go to state 11



state 61

    type_tail  ->  IDENTIFIER '=' typedenoter ';' .   (rule 9)

    $default	reduce using rule 9 (type_tail)



state 62

    type_tail  ->  type_tail IDENTIFIER '=' typedenoter . ';'   (rule 8)

    ';' 	shift, and go to state 79



state 63

    var_tail  ->  var_tail var_id_list ':' typedenoter . ';'   (rule 11)

    ';' 	shift, and go to state 80



state 64

    var_tail  ->  var_id_list ':' typedenoter ';' .   (rule 12)

    $default	reduce using rule 12 (var_tail)



state 65

    proc_statement  ->  IDENTIFIER '(' ')' .   (rule 33)

    $default	reduce using rule 33 (proc_statement)



state 66

    assign_statement  ->  IDENTIFIER ':' '=' . expression   (rule 28)

    '+' 	shift, and go to state 50
    '-' 	shift, and go to state 51

    $default	reduce using rule 44 (sign_part)

    expression	go to state 81
    sign_part	go to state 53



state 67

    if_then_else_statement  ->  IF expression THEN . statementlist else_part END   (rule 29)

    IDENTIFIER	shift, and go to state 26
    IF  	shift, and go to state 27
    WHILE	shift, and go to state 28
    RETURN	shift, and go to state 29

    statementlist	go to state 82
    statement	go to state 31
    assign_statement	go to state 32
    if_then_else_statement	go to state 33
    while_do_statement	go to state 34
    proc_statement	go to state 35
    return_statement	go to state 36



state 68

    rel_op  ->  '<' .   (rule 39)

    $default	reduce using rule 39 (rel_op)



state 69

    rel_op  ->  '=' .   (rule 40)

    $default	reduce using rule 40 (rel_op)



state 70

    rel_op  ->  '>' .   (rule 41)

    $default	reduce using rule 41 (rel_op)



state 71

    expression  ->  expression rel_op . sign_part exp_rest   (rule 37)

    '+' 	shift, and go to state 50
    '-' 	shift, and go to state 51

    $default	reduce using rule 44 (sign_part)

    sign_part	go to state 83



state 72

    not_list  ->  NOT .   (rule 53)

    $default	reduce using rule 53 (not_list)



state 73

    expression  ->  sign_part exp_rest .   (rule 38)
    exp_rest  ->  exp_rest . bin_op not_list term   (rule 45)

    '+' 	shift, and go to state 84
    '-' 	shift, and go to state 85
    OR  	shift, and go to state 86
    '*' 	shift, and go to state 87
    AND 	shift, and go to state 88

    $default	reduce using rule 38 (expression)

    bin_op	go to state 89



state 74

    exp_rest  ->  not_list . term   (rule 46)
    not_list  ->  not_list . NOT   (rule 52)

    IDENTIFIER	shift, and go to state 90
    NUMBER	shift, and go to state 91
    TRUE	shift, and go to state 92
    FALSE	shift, and go to state 93
    NOT 	shift, and go to state 94
    '(' 	shift, and go to state 95

    term	go to state 96



state 75

    while_do_statement  ->  WHILE expression DO . statementlist END   (rule 32)

    IDENTIFIER	shift, and go to state 26
    IF  	shift, and go to state 27
    WHILE	shift, and go to state 28
    RETURN	shift, and go to state 29

    statementlist	go to state 97
    statement	go to state 31
    assign_statement	go to state 32
    if_then_else_statement	go to state 33
    while_do_statement	go to state 34
    proc_statement	go to state 35
    return_statement	go to state 36



state 76

    program  ->  MODULE IDENTIFIER ';' declarations BEGIN statementlist END IDENTIFIER . '.'   (rule 1)

    '.' 	shift, and go to state 98



state 77

    statementlist  ->  statementlist ';' statement .   (rule 21)

    $default	reduce using rule 21 (statementlist)



state 78

    declarations  ->  declarations . ';' declaration   (rule 2)
    proc_decl  ->  IDENTIFIER '(' ')' proc_type ';' declarations . BEGIN statementlist END IDENTIFIER ';'   (rule 15)

    BEGIN	shift, and go to state 99
    ';' 	shift, and go to state 19



state 79

    type_tail  ->  type_tail IDENTIFIER '=' typedenoter ';' .   (rule 8)

    $default	reduce using rule 8 (type_tail)



state 80

    var_tail  ->  var_tail var_id_list ':' typedenoter ';' .   (rule 11)

    $default	reduce using rule 11 (var_tail)



state 81

    assign_statement  ->  IDENTIFIER ':' '=' expression .   (rule 28)
    expression  ->  expression . rel_op sign_part exp_rest   (rule 37)

    '<' 	shift, and go to state 68
    '=' 	shift, and go to state 69
    '>' 	shift, and go to state 70

    $default	reduce using rule 28 (assign_statement)

    rel_op	go to state 71



state 82

    statementlist  ->  statementlist . ';' statement   (rule 21)
    if_then_else_statement  ->  IF expression THEN statementlist . else_part END   (rule 29)

    ELSE	shift, and go to state 100
    ';' 	shift, and go to state 58

    $default	reduce using rule 31 (else_part)

    else_part	go to state 101



state 83

    expression  ->  expression rel_op sign_part . exp_rest   (rule 37)

    NOT 	shift, and go to state 72

    exp_rest	go to state 102
    not_list	go to state 74



state 84

    bin_op  ->  '+' .   (rule 48)

    $default	reduce using rule 48 (bin_op)



state 85

    bin_op  ->  '-' .   (rule 49)

    $default	reduce using rule 49 (bin_op)



state 86

    bin_op  ->  OR .   (rule 50)

    $default	reduce using rule 50 (bin_op)



state 87

    bin_op  ->  '*' .   (rule 47)

    $default	reduce using rule 47 (bin_op)



state 88

    bin_op  ->  AND .   (rule 51)

    $default	reduce using rule 51 (bin_op)



state 89

    exp_rest  ->  exp_rest bin_op . not_list term   (rule 45)

    NOT 	shift, and go to state 72

    not_list	go to state 103



state 90

    term  ->  IDENTIFIER .   (rule 57)
    term  ->  IDENTIFIER . '(' ')'   (rule 58)

    '(' 	shift, and go to state 104

    $default	reduce using rule 57 (term)



state 91

    term  ->  NUMBER .   (rule 56)

    $default	reduce using rule 56 (term)



state 92

    term  ->  TRUE .   (rule 54)

    $default	reduce using rule 54 (term)



state 93

    term  ->  FALSE .   (rule 55)

    $default	reduce using rule 55 (term)



state 94

    not_list  ->  not_list NOT .   (rule 52)

    $default	reduce using rule 52 (not_list)



state 95

    term  ->  '(' . expression ')'   (rule 59)

    '+' 	shift, and go to state 50
    '-' 	shift, and go to state 51

    $default	reduce using rule 44 (sign_part)

    expression	go to state 105
    sign_part	go to state 53



state 96

    exp_rest  ->  not_list term .   (rule 46)

    $default	reduce using rule 46 (exp_rest)



state 97

    statementlist  ->  statementlist . ';' statement   (rule 21)
    while_do_statement  ->  WHILE expression DO statementlist . END   (rule 32)

    END 	shift, and go to state 106
    ';' 	shift, and go to state 58



state 98

    program  ->  MODULE IDENTIFIER ';' declarations BEGIN statementlist END IDENTIFIER '.' .   (rule 1)

    $default	reduce using rule 1 (program)



state 99

    proc_decl  ->  IDENTIFIER '(' ')' proc_type ';' declarations BEGIN . statementlist END IDENTIFIER ';'   (rule 15)

    IDENTIFIER	shift, and go to state 26
    IF  	shift, and go to state 27
    WHILE	shift, and go to state 28
    RETURN	shift, and go to state 29

    statementlist	go to state 107
    statement	go to state 31
    assign_statement	go to state 32
    if_then_else_statement	go to state 33
    while_do_statement	go to state 34
    proc_statement	go to state 35
    return_statement	go to state 36



state 100

    else_part  ->  ELSE . statementlist   (rule 30)

    IDENTIFIER	shift, and go to state 26
    IF  	shift, and go to state 27
    WHILE	shift, and go to state 28
    RETURN	shift, and go to state 29

    statementlist	go to state 108
    statement	go to state 31
    assign_statement	go to state 32
    if_then_else_statement	go to state 33
    while_do_statement	go to state 34
    proc_statement	go to state 35
    return_statement	go to state 36



state 101

    if_then_else_statement  ->  IF expression THEN statementlist else_part . END   (rule 29)

    END 	shift, and go to state 109



state 102

    expression  ->  expression rel_op sign_part exp_rest .   (rule 37)
    exp_rest  ->  exp_rest . bin_op not_list term   (rule 45)

    '+' 	shift, and go to state 84
    '-' 	shift, and go to state 85
    OR  	shift, and go to state 86
    '*' 	shift, and go to state 87
    AND 	shift, and go to state 88

    $default	reduce using rule 37 (expression)

    bin_op	go to state 89



state 103

    exp_rest  ->  exp_rest bin_op not_list . term   (rule 45)
    not_list  ->  not_list . NOT   (rule 52)

    IDENTIFIER	shift, and go to state 90
    NUMBER	shift, and go to state 91
    TRUE	shift, and go to state 92
    FALSE	shift, and go to state 93
    NOT 	shift, and go to state 94
    '(' 	shift, and go to state 95

    term	go to state 110



state 104

    term  ->  IDENTIFIER '(' . ')'   (rule 58)

    ')' 	shift, and go to state 111



state 105

    expression  ->  expression . rel_op sign_part exp_rest   (rule 37)
    term  ->  '(' expression . ')'   (rule 59)

    '<' 	shift, and go to state 68
    '=' 	shift, and go to state 69
    '>' 	shift, and go to state 70
    ')' 	shift, and go to state 112

    rel_op	go to state 71



state 106

    while_do_statement  ->  WHILE expression DO statementlist END .   (rule 32)

    $default	reduce using rule 32 (while_do_statement)



state 107

    proc_decl  ->  IDENTIFIER '(' ')' proc_type ';' declarations BEGIN statementlist . END IDENTIFIER ';'   (rule 15)
    statementlist  ->  statementlist . ';' statement   (rule 21)

    END 	shift, and go to state 113
    ';' 	shift, and go to state 58



state 108

    statementlist  ->  statementlist . ';' statement   (rule 21)
    else_part  ->  ELSE statementlist .   (rule 30)

    ';' 	shift, and go to state 58

    $default	reduce using rule 30 (else_part)



state 109

    if_then_else_statement  ->  IF expression THEN statementlist else_part END .   (rule 29)

    $default	reduce using rule 29 (if_then_else_statement)



state 110

    exp_rest  ->  exp_rest bin_op not_list term .   (rule 45)

    $default	reduce using rule 45 (exp_rest)



state 111

    term  ->  IDENTIFIER '(' ')' .   (rule 58)

    $default	reduce using rule 58 (term)



state 112

    term  ->  '(' expression ')' .   (rule 59)

    $default	reduce using rule 59 (term)



state 113

    proc_decl  ->  IDENTIFIER '(' ')' proc_type ';' declarations BEGIN statementlist END . IDENTIFIER ';'   (rule 15)

    IDENTIFIER	shift, and go to state 114



state 114

    proc_decl  ->  IDENTIFIER '(' ')' proc_type ';' declarations BEGIN statementlist END IDENTIFIER . ';'   (rule 15)

    ';' 	shift, and go to state 115



state 115

    proc_decl  ->  IDENTIFIER '(' ')' proc_type ';' declarations BEGIN statementlist END IDENTIFIER ';' .   (rule 15)

    $default	reduce using rule 15 (proc_decl)



state 116

    $   	go to state 117



state 117

    $   	go to state 118



state 118

    $default	accept
