Parser improvements (diagnostics + speed).