#include <skInterpreterp.h>
Public Methods | |
P_Interpreter (skInterpreter *owner) | |
Constructor for implementation class. | |
~P_Interpreter () | |
Destructor for implementation class. | |
skRValue | evaluate (skStackFrame &frame, skExprNode *n) |
this method evaluates an arbitrary Simkin expression | |
skRValue | evalMethod (skStackFrame &frame, skIdListNode *ids) |
this method evaluates the given method | |
void | makeMethodCall (skStackFrame &frame, skRValue &robject, const skString &method_name, skExprNode *array_index, const skString &attribute, skExprListNode *exprs, skRValue &ret) |
this method actually executes a method | |
void | executeAssignStat (skStackFrame &frame, skAssignNode *n) |
This method executes an assignment statement. | |
bool | executeStat (skStackFrame &frame, skStatNode *pstat, skRValue &r) |
This method executes a statement. | |
bool | executeStats (skStackFrame &frame, skStatListNode *n, skRValue &r) |
This method executes a list of statements. | |
bool | executeReturnStat (skStackFrame &frame, skReturnNode *n, skRValue &r) |
This method executes a return statement. | |
bool | executeIfStat (skStackFrame &frame, skIfNode *n, skRValue &r) |
This method executes an if statement. | |
bool | executeWhileStat (skStackFrame &frame, skWhileNode *n, skRValue &r) |
This method executes a while statement. | |
bool | executeSwitchStat (skStackFrame &frame, skSwitchNode *n, skRValue &r) |
This method executes a switch statement. | |
bool | executeForEachStat (skStackFrame &frame, skForEachNode *n, skRValue &r) |
This method executes a foreach statement. | |
bool | executeForStat (skStackFrame &frame, skForNode *n, skRValue &r) |
This method executes a for statement. | |
void | addLocalVariable (skRValueTable &var, const skString &name, skRValue value) |
Adds a new local variable to the current list. | |
skString | checkIndirectId (skStackFrame &frame, const skString &name) |
This method checks whether a field name includes the indirection character. | |
skRValue | findValue (skStackFrame &frame, const skString &name, skExprNode *array_index, const skString &attribute) |
This method finds a value associated with a given name. | |
void | runtimeError (skStackFrame &frame, const skString &s) |
This method reports a runtime error by throwing a skRuntimeException. | |
void | followIdList (skStackFrame &frame, skIdListNode *idList, skRValue &object) |
This method follows a dotted list of id's to retrieve the associated value. | |
void | trace (const skString &s) |
This method sends a message to the tracer output. | |
bool | extractFieldArrayValue (skStackFrame &frame, 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. | |
bool | extractArrayValue (skStackFrame &frame, 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. | |
bool | extractValue (skStackFrame &frame, skRValue &robject, const skString &name, const skString &attrib, skRValue &ret) |
This method extracts an instance variable with the given name. | |
bool | insertArrayValue (skStackFrame &frame, skRValue &robject, skExprNode *array_index, const skString &attr, const skRValue &value) |
This method is a wrapper around calling the setValueAt method. | |
bool | insertValue (skStackFrame &frame, skRValue &robject, const skString &name, const skString &attr, const skRValue &value) |
This method is a wrapper around calling the setValue method. | |
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. |
|
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.
|