parse_formula function

.formula parser