Orocos Real-Time Toolkit  2.9.0
Public Member Functions | List of all members
RTT::scripting::ScriptParser Class Reference

Parsers and executes any RTT script you throw at it. More...

#include <rtt/scripting/ScriptParser.hpp>

Public Member Functions

 ScriptParser (iter_t &positer, TaskContext *tc, ExecutionEngine *caller)
 Initialize with an initial position, the TaskContext in which context to parse the scripts and the TaskContext that will call the parse() functions. More...
 
 ~ScriptParser ()
 
void parse (iter_t &begin, iter_t end)
 Parses and executes the script from begin to end. More...
 
base::DataSourceBase::shared_ptr parseExcerpt (iter_t &begin, iter_t end)
 Parses and executes a (possibly) incomplete script. More...
 

Detailed Description

Parsers and executes any RTT script you throw at it.

Definition at line 21 of file ScriptParser.hpp.

Constructor & Destructor Documentation

RTT::ScriptParser::ScriptParser ( iter_t positer,
TaskContext tc,
ExecutionEngine caller 
)
RTT::ScriptParser::~ScriptParser ( )

Definition at line 222 of file ScriptParser.cpp.

Member Function Documentation

void RTT::ScriptParser::parse ( iter_t begin,
iter_t  end 
)

Parses and executes the script from begin to end.

The script must be complete and well formed.

Exceptions
parse_exceptionor one of its variants in case of wrong input

Definition at line 168 of file ScriptParser.cpp.

References RTT::parse_exception::copy(), RTT::scripting::CommonParser::skipper, and RTT::scripting::StateGraphParser::storeOffset().

base::DataSourceBase::shared_ptr RTT::scripting::ScriptParser::parseExcerpt ( iter_t begin,
iter_t  end 
)

Parses and executes a (possibly) incomplete script.

Returns
a valid datasource which contains the result of the last statement parsed. It does not need to be evaluate()'ed anymore to read its contents. In case the input is incomplete, a null data source is returned.
Exceptions
parse_exceptionor one of its variants in case of wrong input

The documentation for this class was generated from the following files: