#include <skInterpreterp.h>
Public Methods | |
P_Interpreter () | |
Constructor for implementation class. | |
~P_Interpreter () | |
Destructor for implementation class. | |
skRValue | evaluate (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skExprNode *n) |
this method evaluates an arbitrary Simkin expression. More... | |
skRValue | evalMethod (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skIdListNode *ids) |
this method evaluates the given method. More... | |
void | makeMethodCall (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skRValue &robject, const skString &method_name, skExprNode *array_index, const skString &attribute, skExprListNode *exprs, skRValue &ret) |
this method actually executes a method. More... | |
void | executeAssignStat (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skAssignNode *n) |
This method executes an assignment statement. More... | |
bool | executeStat (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skStatNode *pstat, skRValue &r) |
This method executes a statement. More... | |
bool | executeStats (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skStatListNode *n, skRValue &r) |
This method executes a list of statements. More... | |
bool | executeReturnStat (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skReturnNode *n, skRValue &r) |
This method executes a return statement. More... | |
bool | executeIfStat (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skIfNode *n, skRValue &r) |
This method executes an if statement. More... | |
bool | executeWhileStat (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skWhileNode *n, skRValue &r) |
This method executes a while statement. More... | |
bool | executeSwitchStat (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skSwitchNode *n, skRValue &r) |
This method executes a switch statement. More... | |
bool | executeForEachStat (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skForEachNode *n, skRValue &r) |
This method executes a foreach statement. More... | |
bool | executeForStat (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skForNode *n, skRValue &r) |
This method executes a for statement. More... | |
void | addLocalVariable (skRValueTable &var, const skString &name, skRValue value) |
Adds a new local variable to the current list. More... | |
skString | checkIndirectId (skContext &ctxt, skiExecutable *obj, skRValueTable &var, const skString &name) |
This method checks whether a field name includes the indirection character. More... | |
skRValue | findValue (skContext &ctxt, skiExecutable *obj, skRValueTable &var, const skString &name, skExprNode *array_index, const skString &attribute) |
This method finds a value associated with a given name. More... | |
void | runtimeError (skContext &ctxt, const skString &s) |
This method reports a runtime error by throwing a skRuntimeException. More... | |
void | followIdList (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skIdListNode *idList, skRValue &object) |
This method follows a dotted list of id's to retrieve the associated value. More... | |
void | trace (const skString &s) |
This method sends a message to the tracer output. More... | |
bool | extractFieldArrayValue (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skRValue &robject, const skString &field_name, skExprNode *array_index, const skString &attrib, skRValue &ret) |
This method extracts a value of the form foo[1] - first dereferencing foo. More... | |
bool | extractArrayValue (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skRValue &robject, skExprNode *array_index, const skString &attrib, skRValue &ret) |
This method extracts a value of the form robject[1] - assumes robject is already a collection object. More... | |
bool | extractValue (skContext &ctxt, skRValue &robject, const skString &name, const skString &attrib, skRValue &ret) |
This method extracts an instance variable with the given name. More... | |
bool | insertArrayValue (skContext &ctxt, skiExecutable *obj, skRValueTable &var, skRValue &robject, skExprNode *array_index, const skString &attr, const skRValue &value) |
This method is a wrapper around calling the setValueAt method. More... | |
bool | insertValue (skContext &ctxt, skRValue &robject, const skString &name, const skString &attr, const skRValue &value) |
This method is a wrapper around calling the setValue method. More... | |
Public Attributes | |
skRValueTable | m_GlobalVars |
this is the list of global variables. | |
bool | m_Tracing |
this flag controls whether the interpreter outputs tracing information about the execution of statements. | |
skTraceCallback * | m_TraceCallback |
This variable points to an associated object for capturing tracing output. | |
skStatementStepper * | m_StatementStepper |
This variable points to an associated object which receives information about which statements are being executed. | |
Static Public Attributes | |
THREAD skInterpreter * | g_GlobalInterpreter |
This variable holds a global instance of the interpreter. |
|
Adds a new local variable to the current list.
|
|
This method checks whether a field name includes the indirection character.
|
|
this method evaluates the given method.
|
|
this method evaluates an arbitrary Simkin expression.
|
|
This method executes an assignment statement.
|
|
This method executes a foreach statement.
|
|
This method executes a for statement.
|
|
This method executes an if statement.
|
|
This method executes a return statement.
|
|
This method executes a statement.
|
|
This method executes a list of statements.
|
|
This method executes a switch statement.
|
|
This method executes a while statement.
|
|
This method extracts a value of the form robject[1] - assumes robject is already a collection object.
|
|
This method extracts a value of the form foo[1] - first dereferencing foo.
|
|
This method extracts an instance variable with the given name.
|
|
This method finds a value associated with a given name.
|
|
This method follows a dotted list of id's to retrieve the associated value.
|
|
This method is a wrapper around calling the setValueAt method.
|
|
This method is a wrapper around calling the setValue method.
|
|
this method actually executes a method.
|
|
This method reports a runtime error by throwing a skRuntimeException.
|
|
This method sends a message to the tracer output.
|