jess
Class Jesp

java.lang.Object
  extended byjess.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 reader, Rete engine)
          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.
 Value parse(boolean prompt, Context context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jesp

public Jesp(java.io.Reader reader,
            Rete engine)
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:
reader - The Reader from which this Jesp should get its input
engine - The engine that the parsed commands go to
Method Detail

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.

parse

public Value parse(boolean prompt,
                   Context context)
            throws JessException
Throws:
JessException

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:
The symbol TRUE
Throws:
JessException - If an error occurs

© 2001 E.J. Friedman-Hill and Sandia Corporation