Improve parser error messages

There's some scope to improve parser error messages.

In particular during semantic analysis, we can have multiple errors, but currently we report only the first one and panic.