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.
-
err
-
-
identification
- A short textual banner for Jaja.
-
in
-
-
out
-
-
promptin
-
-
promptout
-
-
url
- The base URL for the documentation.
-
Textual()
-
-
displayAnomaly(EvaluationAble, Exception)
- Display information about an anomaly on stderr.
-
displayResult(Value)
- Prints a result on the output port, prefixed with a prompt.
-
eval(Value)
- Evaluates one expression, displays its results then stops.
-
getProgram()
- Reads an Sexpression to evaluate on the input port.
-
getProgramFromString(String)
-
-
initialize(String[], WorldAble)
- Initialize the Listener so it may be used from FromOS.
-
initializeAsCommand()
- Initialize the textual interpreter when run from a command shell
(where input/output are Posix streams).
-
main(String[])
- Starts a stand-alone text-only Scheme interpreter directly from
a shell with input/output bound to Posix streams.
-
setWorld(WorldAble)
-
-
toplevel()
- Starts a toplevel ie an interactive (read-eval-print) loop.
identification
protected static final String identification
- A short textual banner for Jaja.
url
protected URL url
- The base URL for the documentation.
in
protected InputPort in
out
protected OutputPort out
err
protected OutputPort err
promptin
protected String promptin
promptout
protected String promptout
Textual
public Textual()
setWorld
public void setWorld(WorldAble world)
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).
getProgram
public Value getProgram()
- Reads an Sexpression to evaluate on the input port. Emits a
prompt before.
getProgramFromString
public Value getProgramFromString(String s)
displayResult
public void displayResult(Value v)
- Prints a result on the output port, prefixed with a prompt.
displayAnomaly
public void displayAnomaly(EvaluationAble ev,
Exception exception)
- Display information about an anomaly on stderr.
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.
eval
public void eval(Value e)
- Evaluates one expression, displays its results then stops.
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.
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