[ ] should be processed by parser, not by scanner.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2136 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2008-03-10 14:11:38 +00:00
parent 93e6f17c3b
commit cab59d9f3a
3 changed files with 16 additions and 18 deletions

View File

@@ -576,8 +576,14 @@ ParseTerm(int prio, JMPBUFF *FailBuff)
break;
case '[':
NextToken;
t = ParseList(FailBuff);
checkfor((Term) ']', FailBuff);
if (Yap_tokptr->Tok == Ord(Ponctuation_tok) &&
Unsigned(Yap_tokptr->TokInfo) == ']') {
t = TermNil;
NextToken;
} else {
t = ParseList(FailBuff);
checkfor((Term) ']', FailBuff);
}
break;
case '{':
NextToken;