Public Member Functions | Private Member Functions | Private Attributes | List of all members
RTT::scripting::ScriptParser Class Reference

#include <ScriptParser.hpp>

Public Member Functions

void parse (iter_t &begin, iter_t end)
 
base::DataSourceBase::shared_ptr parseExcerpt (iter_t &begin, iter_t end)
 
 ScriptParser (iter_t &positer, TaskContext *tc, ExecutionEngine *caller)
 
 ~ScriptParser ()
 

Private Member Functions

void clear ()
 
error_status handle_no_function (scanner_t const &scan, parser_error< std::string, iter_t > &e)
 
void seenfunction ()
 
void seenprogram ()
 
void seenstatemachine ()
 
void seenstatement ()
 

Private Attributes

ExecutionEnginecaller
 
CommonParsercommonparser
 
TaskContextcontext
 
rule_t function
 
int ln_offset
 
our_pos_iter_tmpositer
 
rule_t production
 
rule_t program
 
std::string program_text
 
ProgramGraphParserprogramparser
 
our_pos_iter_t saveStartPos
 
rule_t statemachine
 
rule_t statement
 
ProgramGraphParserstatementparser
 
StateGraphParserstateparser
 
Service::shared_ptr storage
 

Detailed Description

Parsers and executes any RTT script you throw at it.

Definition at line 59 of file ScriptParser.hpp.

Constructor & Destructor Documentation

RTT::ScriptParser::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.

Definition at line 84 of file ScriptParser.cpp.

RTT::ScriptParser::~ScriptParser ( )

Definition at line 260 of file ScriptParser.cpp.

Member Function Documentation

void RTT::ScriptParser::clear ( )
private

Definition at line 269 of file ScriptParser.cpp.

error_status RTT::ScriptParser::handle_no_function ( scanner_t const &  scan,
parser_error< std::string, iter_t > &  e 
)
private

Definition at line 75 of file ScriptParser.cpp.

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 206 of file ScriptParser.cpp.

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
void RTT::ScriptParser::seenfunction ( )
private

Definition at line 177 of file ScriptParser.cpp.

void RTT::ScriptParser::seenprogram ( )
private

Definition at line 153 of file ScriptParser.cpp.

void RTT::ScriptParser::seenstatemachine ( )
private

Definition at line 184 of file ScriptParser.cpp.

void RTT::ScriptParser::seenstatement ( )
private

Definition at line 123 of file ScriptParser.cpp.

Member Data Documentation

ExecutionEngine* RTT::scripting::ScriptParser::caller
private

Definition at line 64 of file ScriptParser.hpp.

CommonParser* RTT::scripting::ScriptParser::commonparser
private

Definition at line 79 of file ScriptParser.hpp.

TaskContext* RTT::scripting::ScriptParser::context
private

Definition at line 62 of file ScriptParser.hpp.

rule_t RTT::scripting::ScriptParser::function
private

Definition at line 76 of file ScriptParser.hpp.

int RTT::scripting::ScriptParser::ln_offset
private

Definition at line 70 of file ScriptParser.hpp.

our_pos_iter_t& RTT::scripting::ScriptParser::mpositer
private

Definition at line 67 of file ScriptParser.hpp.

rule_t RTT::scripting::ScriptParser::production
private

Definition at line 73 of file ScriptParser.hpp.

rule_t RTT::scripting::ScriptParser::program
private

Definition at line 75 of file ScriptParser.hpp.

std::string RTT::scripting::ScriptParser::program_text
private

Definition at line 71 of file ScriptParser.hpp.

ProgramGraphParser* RTT::scripting::ScriptParser::programparser
private

Definition at line 81 of file ScriptParser.hpp.

our_pos_iter_t RTT::scripting::ScriptParser::saveStartPos
private

Definition at line 68 of file ScriptParser.hpp.

rule_t RTT::scripting::ScriptParser::statemachine
private

Definition at line 77 of file ScriptParser.hpp.

rule_t RTT::scripting::ScriptParser::statement
private

Definition at line 74 of file ScriptParser.hpp.

ProgramGraphParser* RTT::scripting::ScriptParser::statementparser
private

Definition at line 82 of file ScriptParser.hpp.

StateGraphParser* RTT::scripting::ScriptParser::stateparser
private

Definition at line 80 of file ScriptParser.hpp.

Service::shared_ptr RTT::scripting::ScriptParser::storage
private

Definition at line 66 of file ScriptParser.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:46