Track max error pos for better error location, report expected chars.