code.loop
Class ReadEvalPrint

java.lang.Object
  extended by java.lang.Thread
      extended by code.loop.ReadEvalPrint
All Implemented Interfaces:
Client, java.lang.Runnable

public class ReadEvalPrint
extends java.lang.Thread
implements Client

Description of the Class

Since:
June 17, 2003
Author:
Sergio Antoy

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private static java.lang.String badChoice
           
private  Command command
           
private  java.io.BufferedReader in
           
private  java.io.BufferedWriter out
           
private  IOQueue outputQueue
           
private  code.loop.parser.ClpParser parser
           
private static boolean performingIO
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ReadEvalPrint()
          Constructor for the ReadEvalPrint object
ReadEvalPrint(java.io.BufferedReader in)
          Constructor for the ReadEvalPrint object
ReadEvalPrint(java.io.BufferedReader in, java.io.BufferedWriter out)
          Constructor for the ReadEvalPrint object
ReadEvalPrint(java.io.BufferedWriter out)
          Constructor for the ReadEvalPrint object
 
Method Summary
private  void displayInputPrompt()
          Description of the Method
 void doneChild(Computation computation)
           
private  void forOutput(java.lang.String header, Computation computation, java.io.BufferedWriter out)
           
 java.lang.String getIdString()
          Gets the idString attribute of the ReadEvalPrint object
private  void noReturnScript()
          Description of the Method
private  Term parseAndCheckIO(java.lang.String string)
           
private  java.lang.String readUserInput()
          Description of the Method
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

badChoice

private static final java.lang.String badChoice
See Also:
Constant Field Values

performingIO

private static boolean performingIO

in

private java.io.BufferedReader in

out

private java.io.BufferedWriter out

parser

private code.loop.parser.ClpParser parser

outputQueue

private IOQueue outputQueue

command

private Command command
Constructor Detail

ReadEvalPrint

public ReadEvalPrint()
Constructor for the ReadEvalPrint object


ReadEvalPrint

public ReadEvalPrint(java.io.BufferedReader in)
Constructor for the ReadEvalPrint object

Parameters:
in - Description of the Parameter

ReadEvalPrint

public ReadEvalPrint(java.io.BufferedWriter out)
Constructor for the ReadEvalPrint object

Parameters:
out - Description of the Parameter

ReadEvalPrint

public ReadEvalPrint(java.io.BufferedReader in,
                     java.io.BufferedWriter out)
Constructor for the ReadEvalPrint object

Parameters:
in - Description of the Parameter
out - Description of the Parameter
Method Detail

getIdString

public java.lang.String getIdString()
Gets the idString attribute of the ReadEvalPrint object

Specified by:
getIdString in interface Client
Returns:
The idString value

doneChild

public void doneChild(Computation computation)
Specified by:
doneChild in interface Client

parseAndCheckIO

private Term parseAndCheckIO(java.lang.String string)
                      throws java.lang.Exception
Throws:
java.lang.Exception

forOutput

private void forOutput(java.lang.String header,
                       Computation computation,
                       java.io.BufferedWriter out)
                throws java.io.IOException
Throws:
java.io.IOException

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

displayInputPrompt

private void displayInputPrompt()
                         throws java.io.IOException
Description of the Method

Throws:
java.io.IOException - Description of the Exception

readUserInput

private java.lang.String readUserInput()
                                throws java.io.IOException
Description of the Method

Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception

noReturnScript

private void noReturnScript()
                     throws java.io.IOException
Description of the Method

Throws:
java.io.IOException - Description of the Exception