All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Jaja.Textual

java.lang.Object
   |
   +----Jaja.Jaja
           |
           +----Jaja.Textual

public class Textual
extends Jaja
implements ListenerAble
This class provides a textual access to Jaja. It reads expressions from stdin and outputs results or anomalies on stdout and stderr. Other more visual accesses exists. @see Listener.


Variable Index

 o err
 o identification
A short textual banner for Jaja.
 o in
 o out
 o promptin
 o promptout
 o url
The base URL for the documentation.

Constructor Index

 o Textual()

Method Index

 o displayAnomaly(EvaluationAble, Exception)
Display information about an anomaly on stderr.
 o displayResult(Value)
Prints a result on the output port, prefixed with a prompt.
 o eval(Value)
Evaluates one expression, displays its results then stops.
 o getProgram()
Reads an Sexpression to evaluate on the input port.
 o getProgramFromString(String)
 o initialize(String[], WorldAble)
Initialize the Listener so it may be used from FromOS.
 o initializeAsCommand()
Initialize the textual interpreter when run from a command shell (where input/output are Posix streams).
 o main(String[])
Starts a stand-alone text-only Scheme interpreter directly from a shell with input/output bound to Posix streams.
 o setWorld(WorldAble)
 o toplevel()
Starts a toplevel ie an interactive (read-eval-print) loop.

Variables

 o identification
 protected static final String identification
A short textual banner for Jaja.

 o url
 protected URL url
The base URL for the documentation.

 o in
 protected InputPort in
 o out
 protected OutputPort out
 o err
 protected OutputPort err
 o promptin
 protected String promptin
 o promptout
 protected String promptout

Constructors

 o Textual
 public Textual()

Methods

 o setWorld
 public void setWorld(WorldAble world)
 o initializeAsCommand
 public Textual initializeAsCommand()
Initialize the textual interpreter when run from a command shell (where input/output are Posix streams). Binds input and output ports in the dynamic environment (so display, read and others may find them).

 o getProgram
 public Value getProgram()
Reads an Sexpression to evaluate on the input port. Emits a prompt before.

 o getProgramFromString
 public Value getProgramFromString(String s)
 o displayResult
 public void displayResult(Value v)
Prints a result on the output port, prefixed with a prompt.

 o displayAnomaly
 public void displayAnomaly(EvaluationAble ev,
                            Exception exception)
Display information about an anomaly on stderr.

 o toplevel
 public void toplevel()
Starts a toplevel ie an interactive (read-eval-print) loop. It returns when the input port is exhausted or when the user calls the exit function.

 o eval
 public void eval(Value e)
Evaluates one expression, displays its results then stops.

 o initialize
 public void initialize(String argv[],
                        WorldAble world)
Initialize the Listener so it may be used from FromOS. Analyze the command options. The -eval option gathers all remaining arguments in a string that is evaluated. In this case, the toplevel loop is not started.

 o main
 public static void main(String argv[])
Starts a stand-alone text-only Scheme interpreter directly from a shell with input/output bound to Posix streams. The Scheme interpreter may also be run from the FromOS class. @see FromOS


All Packages  Class Hierarchy  This Package  Previous  Next  Index