Resolve to add a define-before-use requirement in the parser
Refactor parser state from [Chain] to ParserState which is a record data type