Public Member Functions | Private Member Functions | Private Attributes
RTT::scripting::ScriptParser Class Reference

#include <ScriptParser.hpp>

List of all members.

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_t & mpositer
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 21 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 46 of file ScriptParser.cpp.

Definition at line 222 of file ScriptParser.cpp.


Member Function Documentation

void RTT::ScriptParser::clear ( ) [private]

Definition at line 231 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 37 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 168 of file ScriptParser.cpp.

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

void RTT::ScriptParser::seenprogram ( ) [private]

Definition at line 115 of file ScriptParser.cpp.

Definition at line 146 of file ScriptParser.cpp.

Definition at line 85 of file ScriptParser.cpp.


Member Data Documentation

Definition at line 26 of file ScriptParser.hpp.

Definition at line 41 of file ScriptParser.hpp.

Definition at line 24 of file ScriptParser.hpp.

Definition at line 38 of file ScriptParser.hpp.

Definition at line 32 of file ScriptParser.hpp.

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

Definition at line 29 of file ScriptParser.hpp.

Definition at line 35 of file ScriptParser.hpp.

Definition at line 37 of file ScriptParser.hpp.

Definition at line 33 of file ScriptParser.hpp.

Definition at line 43 of file ScriptParser.hpp.

Definition at line 30 of file ScriptParser.hpp.

Definition at line 39 of file ScriptParser.hpp.

Definition at line 36 of file ScriptParser.hpp.

Definition at line 44 of file ScriptParser.hpp.

Definition at line 42 of file ScriptParser.hpp.

Definition at line 28 of file ScriptParser.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Sat Jun 8 2019 18:46:40