Mathematical expression parser