math and logic formula parser and evaluator