improve previous patch for syntax_error.

This commit is contained in:
Vitor Santos Costa 2010-03-02 23:18:04 +00:00
parent 910d04a786
commit 24f5b060d5

View File

@ -3847,7 +3847,11 @@ syntax_error (TokEntry * tokptr, int sno, Term *outp)
}
tokptr = tokptr->TokNext;
}
tf[0] = Yap_MkApplTerm(Yap_MkFunctor(AtomRead,1),1,outp);
if (IsVarTerm(*outp) && (VarOfTerm(*outp) > H || VarOfTerm(*outp) < H0)) {
tf[0] = Yap_MkNewApplTerm(Yap_MkFunctor(AtomRead,1),1);
} else {
tf[0] = Yap_MkApplTerm(Yap_MkFunctor(AtomRead,1),1,outp);
}
{
Term t[3];