Factoring the expression parser