add methods for parsing state in Parser

-add methods for parsing state in Parser
-update the relevant components to support this change