parser logic now handles error cases instead of raise ParseError()