external parser state. add error checks.