Пример #1
0
 public PrologAtom searchAtom(String name) {
   if (search_context == null) return root.search(name);
   PrologDirectory dir = search_context;
   while (dir != null) {
     PrologAtom atom = dir.searchAtom(name);
     if (atom != null) return atom;
     dir = dir.next;
   }
   return null;
 }
Пример #2
0
 public PrologAtom searchAtomC(String name) {
   PrologAtom atom = searchAtom(name);
   if (atom != null) return atom;
   if (root.auto_atoms) {
     atom = root.createAtom(name);
     if (search_context != null) search_context.firstAtom = atom;
   }
   return atom;
 }