Math parser and evaluator