More error handling in parser.
More error handling in parser.

Now that the parser can be invoked at runtime, we need to be extra
careful with error handling.

jech/babeld,jech/babeld,Gwendocg/babeldToS,Gwendocg/babeldToS