add eof checks to number parsing