updating eof parser to throw exn