Tokens:
  Kind: BOF, Lexeme: BOF
  Kind: INT, Lexeme: int
  Kind: WAIN, Lexeme: wain
  Kind: LPAREN, Lexeme: (
  Kind: INT, Lexeme: int
  Kind: ID, Lexeme: a
  Kind: COMMA, Lexeme: ,
  Kind: INT, Lexeme: int
  Kind: ID, Lexeme: b
  Kind: RPAREN, Lexeme: )
  Kind: LBRACE, Lexeme: {
  Kind: RETURN, Lexeme: return
  Kind: NUM, Lexeme: 42
  Kind: SEMI, Lexeme: ;
  Kind: RBRACE, Lexeme: }
  Kind: EOF, Lexeme: EOF
Current stack (top to bottom):
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: INT int, State: 15
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: type, State: 16
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: ID a, State: 21
  Node: type, State: 16
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: INT int, State: 15
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: type, State: 16
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: ID b, State: 21
  Node: type, State: 16
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: dcls, State: 43
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: statements, State: 65
  Node: dcls, State: 43
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: RETURN return, State: 88
  Node: statements, State: 65
  Node: dcls, State: 43
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: NUM 42, State: 48
  Node: RETURN return, State: 88
  Node: statements, State: 65
  Node: dcls, State: 43
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: factor, State: 46
  Node: RETURN return, State: 88
  Node: statements, State: 65
  Node: dcls, State: 43
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: term, State: 45
  Node: RETURN return, State: 88
  Node: statements, State: 65
  Node: dcls, State: 43
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: expr, State: 113
  Node: RETURN return, State: 88
  Node: statements, State: 65
  Node: dcls, State: 43
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: SEMI ;, State: 128
  Node: expr, State: 113
  Node: RETURN return, State: 88
  Node: statements, State: 65
  Node: dcls, State: 43
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: RBRACE }, State: 133
  Node: SEMI ;, State: 128
  Node: expr, State: 113
  Node: RETURN return, State: 88
  Node: statements, State: 65
  Node: dcls, State: 43
  Node: LBRACE {, State: 30
  Node: RPAREN ), State: 27
  Node: dcl, State: 25
  Node: COMMA ,, State: 22
  Node: dcl, State: 17
  Node: LPAREN (, State: 11
  Node: WAIN wain, State: 9
  Node: INT int, State: 5
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: main, State: 3
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: procedures, State: 4
  Node: BOF BOF, State: 1
-----------------------------
Current stack (top to bottom):
  Node: EOF EOF, State: 7
  Node: procedures, State: 4
  Node: BOF BOF, State: 1
-----------------------------
ERROR at 16
Full parse tree at the point of error:
BOF BOF

at the end, code should recognize reduction 7 0 .ACCEPT and go to 0 which is start -> BOF procedure EOF and then go back to start and then create the final tree.