Reimplemented with NSScanner.