| should use operator priority, not some built-in (#156)
This commit is contained in:
parent
2d6934178b
commit
1bbf7ff16c
@ -687,19 +687,20 @@ ParseTerm(int prio, JMPBUFF *FailBuff)
|
|||||||
}
|
}
|
||||||
curprio = 1000;
|
curprio = 1000;
|
||||||
continue;
|
continue;
|
||||||
} else if (Unsigned(Yap_tokptr->TokInfo) == '|' && prio >= 1100 &&
|
} else if (Unsigned(Yap_tokptr->TokInfo) == '|' &&
|
||||||
curprio <= 1099) {
|
IsInfixOp(AtomVBar, &opprio, &oplprio, &oprprio)
|
||||||
|
&& opprio <= prio && oplprio >= curprio) {
|
||||||
Volatile Term args[2];
|
Volatile Term args[2];
|
||||||
NextToken;
|
NextToken;
|
||||||
args[0] = t;
|
args[0] = t;
|
||||||
args[1] = ParseTerm(1100, FailBuff);
|
args[1] = ParseTerm(oprprio, FailBuff);
|
||||||
t = Yap_MkApplTerm(FunctorVBar, 2, args);
|
t = Yap_MkApplTerm(FunctorVBar, 2, args);
|
||||||
/* check for possible overflow against local stack */
|
/* check for possible overflow against local stack */
|
||||||
if (H > ASP-4096) {
|
if (H > ASP-4096) {
|
||||||
Yap_ErrorMessage = "Stack Overflow";
|
Yap_ErrorMessage = "Stack Overflow";
|
||||||
FAIL;
|
FAIL;
|
||||||
}
|
}
|
||||||
curprio = 1100;
|
curprio = opprio;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user