This commit is contained in:
Vitor Santos Costa
2016-09-22 21:53:42 -05:00
parent 02dabe8e3a
commit 2bbc3b9265
10 changed files with 91 additions and 49 deletions

View File

@@ -20,10 +20,19 @@ class T(tuple):
return str(self.name) + str(self.tuple)
def query_prolog(engine, s):
def answer( q ):
# try:
return q.next()
# except yap.YAPPythonException e:
# print e.text()
# return False
q = engine.query(s)
ask = True
while q.next():
while answer(q):
vs = q.namedVarsCopy()
if vs:
i = 0