jess
Class Jesp
java.lang.Object
|
+--jess.Jesp
- public class Jesp
- extends java.lang.Object
Parser functionality for Jess. Not serializable, as it holds a
reference to an input stream.
(C) 1997 Ernest J. Friedman-Hill and Sandia National Laboratories
- Author:
- Ernest J. Friedman-Hill
Constructor Summary |
Jesp(java.io.Reader r,
Rete e)
Construct a Jesp object. |
Method Summary |
void |
clear()
Flush any partially-parsed information, probably to the next ')'. |
Value |
loadFacts(Context c)
Parses an input file containing only facts, asserts each one. |
Value |
parse(boolean prompt)
Parses an input file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Jesp
public Jesp(java.io.Reader r,
Rete e)
- Construct a Jesp object.
The reader will be looked up in the Rete object's router tables,
and any wrapper found there will be used.
- Parameters:
is
- The Reader from which this Jesp should get its inpute
- The engine that the parsed commands go to
parse
public Value parse(boolean prompt)
throws JessException
- Parses an input file.
Argument is true if a prompt should be printed (to the
ReteObject's standard output), false for no prompt.
- Parameters:
prompt
- True if a prompt should be printed.- Returns:
- The result of the last parsed entity (often TRUE or FALSE).
- Throws:
JessException
- If anything goes wrong.
clear
public void clear()
- Flush any partially-parsed information, probably to the next ')'. Useful in
error recovery.
loadFacts
public Value loadFacts(Context c)
throws JessException
- Parses an input file containing only facts, asserts each one.
- Returns:
-
- Throws:
JessException
-