ParserState: make it possible to detect if initialization went wrong

this is required to get meaningful error messages if the file specified by INCLUDE does not exist.

note that this PR is based on top of #345. once #345 is merged, I'll rebase if desired...