Simple math expression parser implemented with PLY