Add yxml_eof() function to detect unexpected EOF errors