ix.test.xml
Class LispSourceText

java.lang.Object
  extended by ix.test.xml.LispSourceText
All Implemented Interfaces:
IScriptSource, ProgramSource, SemiPrimitive, java.io.Serializable
Direct Known Subclasses:
IScriptLispSource

public class LispSourceText
extends java.lang.Object
implements SemiPrimitive, java.io.Serializable, ProgramSource, IScriptSource

Allows Lisp source code to be written in XML using the ordinary textual syntax. For example:

   <lisp-source-text>
     (defun f (x) (* x x))
     (defun g (x y) (/ (+ x y) 2))
   </lisp-source-text>
 

See Also:
LispProgramReader, Serialized Form

Field Summary
protected static LispInterpreter parser
           
protected  java.lang.String text
           
 
Constructor Summary
LispSourceText(java.lang.String text)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getLanguage()
           
 java.lang.Object getSource()
           
 java.lang.String getSyntax()
          Returns a string that identifies the syntax of the source contained in, or represented by, this object.
 Interpreter.Expr parseSource()
          Converts the source code into the tree representation used by Interpreters.
 LList readSource()
           
 java.lang.String toString()
           
static java.lang.Object valueOf(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parser

protected static LispInterpreter parser

text

protected java.lang.String text
Constructor Detail

LispSourceText

public LispSourceText(java.lang.String text)
Method Detail

valueOf

public static java.lang.Object valueOf(java.lang.String text)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getSyntax

public java.lang.String getSyntax()
Description copied from interface: IScriptSource
Returns a string that identifies the syntax of the source contained in, or represented by, this object. At present, the value should be either "iscript/lisp" or "iscript/xml".

Specified by:
getSyntax in interface IScriptSource

parseSource

public Interpreter.Expr parseSource()
Description copied from interface: IScriptSource
Converts the source code into the tree representation used by Interpreters.

Specified by:
parseSource in interface IScriptSource

getLanguage

public java.lang.String getLanguage()
Specified by:
getLanguage in interface ProgramSource

getSource

public java.lang.Object getSource()
Specified by:
getSource in interface ProgramSource

readSource

public LList readSource()