parse.py: Raise exceptions on parse error