parser: Give more consistent error messages on parse errors.

Some messages were missing "while parsing" at the start.
parser: Print error for an unexpected token in one message, not two.
driver: Do not use an arbitrary string as format string.