Mathematical parser