Improve error reporting of syntax errors

Try to provide sensible error message even if
input is not valid at all (from parser's perspective).

Report file and line number if possible.

Signed-off-by: 35V LG84 <35vlg84-x4e6b92@e257.fi>
2 jobs for master in 5 minutes and 8 seconds
Status Job ID Name Coverage
  Test
passed #152501850
test·jdk11

00:04:18

passed #152501851
test·jdk8

00:05:07

99.74%