A maths parser based on PLY