|
|
|
|
|
|
Modules Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages
acdk::lisp::LispEnvironment Class Reference#include <LispEnvironment.h>
Inheritance diagram for acdk::lisp::LispEnvironment:
List of all members.
Detailed Description
Represents an Lisp-Interpreter.
- Author:
- Roger Rene Kommer
- Version:
- Revision
- 1.16
- Date:
- Date
- 2005/04/08 10:53:20
|
Public Member Functions |
| LispEnvironment (IN(acdk::util::RProperties) environment=Nil, IN(RStringArray) args=Nil, bool trace=false) |
| ~LispEnvironment () |
void | init (bool loadCode=false) |
| loads standard lisp files in /cfg/lib/acdk/lisp/autoload.lsp.
|
void | initEnv () |
| initialize environmnet variables
|
void | deinit () |
| uninizialize the LispEnvironment.
|
RString | parseEval (const char *&ptr, int &rest) |
RLispVar | parseEval (IN(RString) str) |
RLispCode | parse (IN(RLispTokenizer) in, IN(acdk::io::RPrintWriter) out, bool interactiv=false, bool parseOneToken=false) |
void | interactive (IN(acdk::io::RCharReader) in, IN(acdk::io::RCharWriter) out) |
virtual RLispVar | eval (IN(RLispVar) list) |
RLispVar | lookupVar (IN(RString) str, bool warn=true) |
| Lookup for var in.
|
RLispVar | lookupLocalVar (IN(RString) str) |
| Lookup for var in only local scopes returns Nil if not found.
|
RFunction | lookupFunction (IN(RString) str) |
bool | isMacro (IN(RString) str) |
virtual void | bindLocal (IN(RString) symbol, IN(RLispVar) value, bool forcelocal=false) |
virtual void | bindGlobal (IN(RString) symbol, IN(RLispVar) value) |
virtual void | bindGlobal (IN(RString) symbol, IN(RString) value) |
virtual void | bindToEnv (IN(RString) symbol, IN(RLispVar) value) |
virtual void | bindToEnv (IN(RString) symbol, IN(RString) value) |
void | registerDefun (IN(RLispFunction) func) |
RString | load (IN(RLispTokenizer) tok) |
| load code into Lisp-Environment
|
RString | load (IN(RString) filename) |
RString | loadUnparsedFile (IN(RString) filename) |
void | dumpEnv (IN(acdk::io::RCharWriter) out) |
| Debugging function.
|
bool | trace () |
| Debugging function.
|
void | trace (bool t) |
| Debugging function.
|
bool | trace (IN(RString) symbol) |
| Debugging function.
|
void | trace (IN(RString) symbol, bool dotrace) |
| Debugging function.
|
void | traceln (IN(RString) out) |
void | traceflush (IN(RString) str) |
void | trace_begin (IN(RString) out) |
void | trace_end (IN(RString) out) |
void | setBreak (int b) |
int | getBreak () |
RLispVar | debug_interactive (IN(RLispVar) var) |
RLispVar | lastEvaled () |
RString | lastEvaledString () |
void | returnNow (bool set) |
bool | returnNow () |
void | exitNow (int exitval) |
bool | exitNow () |
int | exitValue () |
acdk::util::RIterator | functionIterator () |
| returns an KeyIterator, where value is RFunction
|
acdk::util::RIterator | buildinsIterator () |
acdk::util::RIterator | defunsIterator () |
acdk::util::RProperties | environment () |
acdk::util::RHashMap | globals () |
acdk::util::RHashSet | includes () |
void | setInOut (IN(RCharReader) rin, IN(RCharWriter) rout, IN(RCharWriter) rerr) |
RLispVar | _eval (IN(RLispVar) list) |
RLispVar | _eval (IN(RLispList) list) |
RLispVar | _eval (IN(RLispSymbol) list) |
RLispVar | _eval (IN(RLispAtom) list) |
void | storeCompiled (IN(RString) file) |
| store all compiled functions, macros an globals variables a file.
|
void | storeCompiled (IN(::acdk::io::RWriter) out) |
void | loadCompiled (IN(RString) file, bool replace) |
| Loads image file.
|
void | loadCompiled (IN(::acdk::io::RReader) in, bool replace) |
| Loads image file.
|
Static Public Member Functions |
RLispList | parseToList (IN(RString) str) |
RLispAtom | t () |
void | registerFunction (const char *name, const char *decl, LispNativFunction func, bool preeval=true) |
acdk::util::RHashMap | _staticFuncs () |
RLispEnvironment | lenv () |
Public Attributes |
acdk::io::RPrintWriter | out |
acdk::io::RPrintWriter | err |
acdk::io::RInputReader | in |
Stack< RFile > | _modulStack |
| The current Modul stack.
|
Stack< RLispStackFrame > | _stackFrame |
Stack< RLispVar > | _evalStack |
Private Attributes |
acdk::util::RProperties | _environment |
acdk::util::RHashMap | _globals |
acdk::util::RHashMap | _defuns |
acdk::util::RHashMap | _macros |
acdk::util::RHashSet | _includes |
| all fq names of included lsp-files
|
acdk::util::RHashSet | _tracedSymbols |
bool | _trace |
RLispVar | _lastEvaled |
bool | _returnNow |
int | _tracelevel |
int | _break |
bool | _exitNow |
int | _exitValue |
RStringArray | _cmlineArgs |
Static Private Attributes |
LispEnvironment * | _lenv |
| global instance
|
RLispEnvironment | _glenv |
| this will be used if not already set
|
acdk::util::RHashMap | __staticFuncs |
| normal buildin function
|
RLispAtom | __trueVar |
Friends |
class | LispBinaryCode |
Constructor & Destructor Documentation
Member Function Documentation
virtual void acdk::lisp::LispEnvironment::bindGlobal |
( |
IN(RString) |
symbol, |
|
|
IN(RString) |
value |
|
) |
[inline, virtual] |
|
virtual void acdk::lisp::LispEnvironment::bindGlobal |
( |
IN(RString) |
symbol, |
|
|
IN(RLispVar) |
value |
|
) |
[virtual] |
|
virtual void acdk::lisp::LispEnvironment::bindLocal |
( |
IN(RString) |
symbol, |
|
|
IN(RLispVar) |
value, |
|
|
bool |
forcelocal = false |
|
) |
[virtual] |
|
virtual void acdk::lisp::LispEnvironment::bindToEnv |
( |
IN(RString) |
symbol, |
|
|
IN(RString) |
value |
|
) |
[inline, virtual] |
|
virtual void acdk::lisp::LispEnvironment::bindToEnv |
( |
IN(RString) |
symbol, |
|
|
IN(RLispVar) |
value |
|
) |
[virtual] |
|
void acdk::lisp::LispEnvironment::deinit |
( |
|
) |
|
|
virtual RLispVar acdk::lisp::LispEnvironment::eval |
( |
IN(RLispVar) |
list |
) |
[virtual] |
|
bool acdk::lisp::LispEnvironment::exitNow |
( |
|
) |
[inline] |
|
void acdk::lisp::LispEnvironment::exitNow |
( |
int |
exitval |
) |
[inline] |
|
int acdk::lisp::LispEnvironment::exitValue |
( |
|
) |
[inline] |
|
|
returns an KeyIterator, where value is RFunction
|
int acdk::lisp::LispEnvironment::getBreak |
( |
|
) |
[inline] |
|
void acdk::lisp::LispEnvironment::init |
( |
bool |
loadCode = false |
) |
|
|
|
loads standard lisp files in /cfg/lib/acdk/lisp/autoload.lsp.
- Exceptions:
-
Error | if ACDK_HOME is not defined. |
- Parameters:
-
loadCode | load code instead of image |
|
void acdk::lisp::LispEnvironment::initEnv |
( |
|
) |
|
|
|
initialize environmnet variables
|
bool acdk::lisp::LispEnvironment::isMacro |
( |
IN(RString) |
str |
) |
[inline] |
|
RLispVar acdk::lisp::LispEnvironment::lastEvaled |
( |
|
) |
[inline] |
|
RString acdk::lisp::LispEnvironment::lastEvaledString |
( |
|
) |
[inline] |
|
|
load code into Lisp-Environment
- Returns:
- The result of the evaluated code
|
void acdk::lisp::LispEnvironment::loadCompiled |
( |
IN(::acdk::io::RReader) |
in, |
|
|
bool |
replace |
|
) |
|
|
|
Loads image file.
- Parameters:
-
replace | replace current env. |
|
void acdk::lisp::LispEnvironment::loadCompiled |
( |
IN(RString) |
file, |
|
|
bool |
replace |
|
) |
|
|
|
Loads image file.
- Parameters:
-
replace | replace current env. |
|
RString acdk::lisp::LispEnvironment::loadUnparsedFile |
( |
IN(RString) |
filename |
) |
|
|
|
Lookup for var in only local scopes returns Nil if not found.
|
RLispVar acdk::lisp::LispEnvironment::lookupVar |
( |
IN(RString) |
str, |
|
|
bool |
warn = true |
|
) |
|
|
|
Lookup for var in.
-
locals in scopes from inner to outer
-
functions
-
global variables (setg)
-
environmnet
|
RString acdk::lisp::LispEnvironment::parseEval |
( |
const char *& |
ptr, |
|
|
int & |
rest |
|
) |
|
|
void acdk::lisp::LispEnvironment::registerDefun |
( |
IN(RLispFunction) |
func |
) |
|
|
void acdk::lisp::LispEnvironment::registerFunction |
( |
const char * |
name, |
|
|
const char * |
decl, |
|
|
LispNativFunction |
func, |
|
|
bool |
preeval = true |
|
) |
[static] |
|
bool acdk::lisp::LispEnvironment::returnNow |
( |
|
) |
[inline] |
|
void acdk::lisp::LispEnvironment::returnNow |
( |
bool |
set |
) |
[inline] |
|
void acdk::lisp::LispEnvironment::setBreak |
( |
int |
b |
) |
[inline] |
|
void acdk::lisp::LispEnvironment::storeCompiled |
( |
IN(RString) |
file |
) |
|
|
|
store all compiled functions, macros an globals variables a file.
Environment and build in functions will not be stored |
RLispAtom acdk::lisp::LispEnvironment::t |
( |
|
) |
[static] |
|
void acdk::lisp::LispEnvironment::trace |
( |
IN(RString) |
symbol, |
|
|
bool |
dotrace |
|
) |
[inline] |
|
bool acdk::lisp::LispEnvironment::trace |
( |
IN(RString) |
symbol |
) |
[inline] |
|
void acdk::lisp::LispEnvironment::trace |
( |
bool |
t |
) |
[inline] |
|
bool acdk::lisp::LispEnvironment::trace |
( |
|
) |
[inline] |
|
void acdk::lisp::LispEnvironment::trace_begin |
( |
IN(RString) |
out |
) |
|
|
void acdk::lisp::LispEnvironment::trace_end |
( |
IN(RString) |
out |
) |
|
|
void acdk::lisp::LispEnvironment::traceflush |
( |
IN(RString) |
str |
) |
|
|
void acdk::lisp::LispEnvironment::traceln |
( |
IN(RString) |
out |
) |
|
|
Friends And Related Function Documentation
Member Data Documentation
|
this will be used if not already set
|
|
all fq names of included lsp-files
|
|
|