imake sure -1 is read independently of the current syntax operator.
This commit is contained in:
parent
697f7c650c
commit
9f6426fb95
11
C/parser.c
11
C/parser.c
@ -440,10 +440,6 @@ ParseTerm(int prio, JMPBUFF *FailBuff USES_REGS)
|
|||||||
case Name_tok:
|
case Name_tok:
|
||||||
t = Yap_tokptr->TokInfo;
|
t = Yap_tokptr->TokInfo;
|
||||||
NextToken;
|
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... */
|
/* special rules apply for +1, -2.3, etc... */
|
||||||
if (Yap_tokptr->Tok == Number_tok) {
|
if (Yap_tokptr->Tok == Number_tok) {
|
||||||
if ((Atom)t == AtomMinus) {
|
if ((Atom)t == AtomMinus) {
|
||||||
@ -462,7 +458,12 @@ ParseTerm(int prio, JMPBUFF *FailBuff USES_REGS)
|
|||||||
NextToken;
|
NextToken;
|
||||||
break;
|
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;
|
Atom at = (Atom)Yap_tokptr->TokInfo;
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
if ((Atom)t == AtomPlus) {
|
if ((Atom)t == AtomPlus) {
|
||||||
|
Reference in New Issue
Block a user