parser: fix chaining of elseif statements
clear current parser input if errors persist after restart