Implement parsing numbers.