% File: process.p :- consult('io.p'). cvt :- do_cvt. cvt(File) :- seeing(F), see(File), do_cvt, see(F). do_cvt :- read_sentence(Sentence), write_string("DEBUG "), write_sentence(Sentence), nl, Sentence \== [stop, '.'], !, write_string("DEBUG "), write_string("continuing translation ..."), nl, phrase(sentence,Sentence,X), write_string("DEBUG "), write_string(" leaves remainder X = "), write(X), nl, ( (Sentence == X, write_string("Can't interpret that"), nl); (write_string("recognized that"), nl) ), nl, do_cvt. do_cvt :- !.