handling error remaining terms in expression stack after expression parsing completed