algebraic expression evaluator