| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectohmm.OHMMShell
public class OHMMShell
OHMM JScheme command shell.
This is a JScheme
 interpreter for debug and exercise of the OHMM high level processor
 library.  The main(java.lang.String[]) method can be invoked in the usual Java way.  In
 addition, OHMMShell is specified as the main-class of OHMM.jar.
Communications are established according to command-line parameters:
OHMM.init(double, FileOutputStream, FileInputStream)OHMM instance.
 ohmm-shell-api.scm and ohmm-shell-extra.scm are loaded to
 define the scheme-level API and conveniences.  A site-specific scheme file
 is also loaded iff present, see OHMM_SHELL_SITE.
 The optional command line parameter -repl-gui causes the JScheme read-eval-print loop to run in a GUI window. Otherwise it runs on the command line.
Communication errors including timeouts are internally detected, and the
 ErrorHandler, if any, is notified.
| Field Summary | |
|---|---|
| static java.lang.String | APPNAMEApplication title. | 
| static java.lang.String | BANNERStartup banner. | 
| static java.lang.String | EXTRA_USAGEExtra command line usage. | 
| protected static java.lang.Object | interactorLockSynchronization object if using REPL GUI. | 
| protected  jscheme.JScheme | jsOur JScheme interpreter. | 
| protected  OHMM | ohmmOur OHMM. | 
| static java.lang.String | OHMM_SHELL_APIThe name of the scheme bindings for the api. | 
| static java.lang.String | OHMM_SHELL_EXTRAThe name of the scheme bindings for the extra stuff. | 
| static java.lang.String | OHMM_SHELL_SITEDefault name of scheme bindings for any site-local stuff. | 
| static java.lang.String | OHMM_SHELL_SITE_PROPSee OHMM_SHELL_SITE. | 
| static java.lang.String | PROMPTShell prompt. | 
| Constructor Summary | |
|---|---|
| OHMMShell(OHMM ohmm)Make a new OHMMShell wrapping an OHMMinstance. | |
| Method Summary | |
|---|---|
| static boolean | charReady()jscheme does not implement char-ready? | 
| protected  void | initJScheme()Initialize JScheme. | 
|  void | interactorREPL()interactorREPL(String)with defaultPROMPT | 
|  void | interactorREPL(java.lang.String prompt)Run the scheme REPL in a JScheme Interactor in its own top-level GUI JFrame. | 
| protected  boolean | loadJSchemeFileFromResource(java.lang.String resourceName)Load a scheme file into jsfrom a resource for this class. | 
| protected  void | loadJSchemeFiles()load initial JScheme values | 
| static void | main(java.lang.String[] argv)Command line driver, see OHMM.USAGE. | 
|  void | readEvalPrintLoop()readEvalPrintLoop(String)with defaultPROMPT | 
|  void | readEvalPrintLoop(java.lang.String prompt)Run the scheme REPL. | 
| protected  void | setJSGlobals()bind global JScheme values | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String APPNAME
Application title.
public static final java.lang.String PROMPT
Shell prompt.
public static final java.lang.String BANNER
Startup banner.
public static final java.lang.String OHMM_SHELL_API
The name of the scheme bindings for the api.
public static final java.lang.String OHMM_SHELL_EXTRA
The name of the scheme bindings for the extra stuff.
public static final java.lang.String OHMM_SHELL_SITE
Default name of scheme bindings for any site-local stuff.
May be overriden by the java property OHMM_SHELL_SITE_PROP.
public static final java.lang.String OHMM_SHELL_SITE_PROP
See OHMM_SHELL_SITE.
public static final java.lang.String EXTRA_USAGE
Extra command line usage.
protected OHMM ohmm
Our OHMM.
protected jscheme.JScheme js
Our JScheme interpreter.
protected static java.lang.Object interactorLock
Synchronization object if using REPL GUI.
| Constructor Detail | 
|---|
public OHMMShell(OHMM ohmm)
          throws java.io.IOException
OHMM instance.
java.io.IOException| Method Detail | 
|---|
public static boolean charReady()
                         throws java.io.IOException
java.io.IOExceptionpublic void readEvalPrintLoop(java.lang.String prompt)
prompt - the REPL command line promptpublic void readEvalPrintLoop()
readEvalPrintLoop(String) with default PROMPT
public void interactorREPL(java.lang.String prompt)
Run the scheme REPL in a JScheme Interactor in its own top-level GUI JFrame.
prompt - the REPL command line promptpublic void interactorREPL()
interactorREPL(String) with default PROMPT
protected void initJScheme()
                    throws java.io.IOException
Initialize JScheme.
java.io.IOExceptionprotected void setJSGlobals()
protected void loadJSchemeFiles()
protected boolean loadJSchemeFileFromResource(java.lang.String resourceName)
Load a scheme file into js from a resource for this class.
resourceName - the name of the resource (i.e. the name of a scheme
 file in the same package as this class)
public static void main(java.lang.String[] argv)
                 throws java.io.IOException,
                        java.lang.InterruptedException
Command line driver, see OHMM.USAGE.
java.io.IOException
java.lang.InterruptedException| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||