imake sure -1 is read independently of the current syntax operator.

This commit is contained in:
Vitor Santos Costa 2011-04-26 18:51:02 +01:00
parent 697f7c650c
commit 9f6426fb95
1 changed files with 41 additions and 40 deletions

View File

@ -440,10 +440,6 @@ ParseTerm(int prio, JMPBUFF *FailBuff USES_REGS)
case Name_tok:
t = Yap_tokptr->TokInfo;
NextToken;
if ((Yap_tokptr->Tok != Ord(Ponctuation_tok)
|| Unsigned(Yap_tokptr->TokInfo) != 'l')
&& IsPrefixOp((Atom)t, &opprio, &oprprio PASS_REGS)
) {
/* special rules apply for +1, -2.3, etc... */
if (Yap_tokptr->Tok == Number_tok) {
if ((Atom)t == AtomMinus) {
@ -462,7 +458,12 @@ ParseTerm(int prio, JMPBUFF *FailBuff USES_REGS)
NextToken;
break;
}
} else if (Yap_tokptr->Tok == Name_tok) {
}
if ((Yap_tokptr->Tok != Ord(Ponctuation_tok)
|| Unsigned(Yap_tokptr->TokInfo) != 'l')
&& IsPrefixOp((Atom)t, &opprio, &oprprio PASS_REGS)
) {
if (Yap_tokptr->Tok == Name_tok) {
Atom at = (Atom)Yap_tokptr->TokInfo;
#ifndef _MSC_VER
if ((Atom)t == AtomPlus) {