Reworked parser error to improve implementation.