:- use_module(library(readutil)).
On end-of-file the atom end_of_file is returned. See also at_end_of_stream/[0,1].
end_of_file