Package com.googlecode.prolog_cafe.lang

Examples of com.googlecode.prolog_cafe.lang.JavaObjectTerm


        Prolog.PUSHBACK_SIZE);

    if (!ctl.execute(
        Prolog.BUILTIN, "consult_stream",
        SymbolTerm.intern("rules.pl"),
        new JavaObjectTerm(in))) {
      throw new CompileException("Cannot consult rules of " + project);
    }
    return save(ctl);
  }
View Full Code Here


    }
    if (!a1.isSymbol()) {
      throw new IllegalTypeException(this, 1, "symbol", a1);
    }
    Pattern regex = Pattern.compile(a1.name());
    engine.areg1 = new JavaObjectTerm(regex);
    engine.areg2 = arg2;
    engine.areg3 = arg3;
    engine.areg4 = arg4;

    PatchList pl = StoredValues.PATCH_LIST.get(engine);
    Iterator<PatchListEntry> iter = pl.getPatches().iterator();

    engine.areg5 = new JavaObjectTerm(iter);

    return engine.jtry5(commit_delta_check, commit_delta_next);
  }
View Full Code Here

    if (in == null) {
      throw new FileNotFoundException(prologResource);
    }
    try {
      SymbolTerm pathTerm = SymbolTerm.create(prologResource);
      JavaObjectTerm inTerm =
          new JavaObjectTerm(new PushbackReader(new BufferedReader(
              new InputStreamReader(in, "UTF-8")), Prolog.PUSHBACK_SIZE));
      if (!env.execute(Prolog.BUILTIN, "consult_stream", pathTerm, inTerm)) {
        throw new CompileException("Cannot consult " + prologResource);
      }
    } finally {
View Full Code Here

    } else {
      throw new IllegalTypeException(this, 1, "user(int)", key);
    }

    return new JavaObjectTerm(user);
  }
View Full Code Here

TOP

Related Classes of com.googlecode.prolog_cafe.lang.JavaObjectTerm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.