ztsdb
|
Struct and functions implementing the interpreter. More...
Classes | |
struct | BaseFrame |
struct | BuiltinFrame |
Type of frame used when invoking builtin functions (see 'val::BuiltinG'). More... | |
struct | ClosureFrame |
Type of frame used when invoking functions defined in R (see 'val::VClos'). More... | |
struct | EvalException |
struct | Frame |
The default frame associated with an interpretation context. More... | |
struct | FutureException |
struct | Kont |
struct | RemoteErrorException |
struct | ShadowFrame |
Typedefs | |
typedef std::shared_ptr< BaseFrame > | shpfrm |
Functions | |
shared_ptr< Kont > | step (shared_ptr< Kont > &k, vector< shpfrm > &frameStack, zcore::InterpCtx &ic) |
shared_ptr< Kont > | buildElChain (const ElNode *eln, unsigned n, shared_ptr< BaseFrame > r, shared_ptr< Kont > &k) |
std::string | errorLines (const yy::location &loc, unsigned nlinesBefore) |
Struct and functions implementing the interpreter.
std::string interp::errorLines | ( | const yy::location & | loc, |
unsigned | nlinesBefore | ||
) |
Builds a string extracting from 'loc' the 'nlinesBefore' and 'nlinesAfter' together with the erorr line and a line underneath pointing to the error.
shared_ptr< Kont > interp::step | ( | shared_ptr< Kont > & | k, |
vector< shpfrm > & | frameStack, | ||
zcore::InterpCtx & | ic | ||
) |
Evaluate the current continuation and return (i.e. step through one continuation and then return). From the point of view of the interpreter, the current state and what needs to be interpreted is entirely defined in the continuation 'k' and the frame stack. The calling context 'ic' is used when the interpreter is required to send out a query (the context is needed to generate the message with the appropriate identifiers, etc.).