A Parser for Orocos Program Scripts. More...
#include <ProgramGraphParser.hpp>
Public Member Functions | |
rule_t & | bodyParser () |
ProgramInterfacePtr | bodyParserResult () |
rule_t & | functionParser () |
void | initBodyParser (const std::string &name, Service::shared_ptr stck, int offset) |
std::vector< ProgramInterfacePtr > | parse (iter_t &begin, iter_t end) |
Tries to parse programs, returns the generated programs on success. More... | |
std::vector< ProgramInterfacePtr > | parseFunction (iter_t &begin, iter_t end) |
bool | parserUsed () const |
ProgramGraphParser (iter_t &positer, TaskContext *context, ExecutionEngine *caller, CommonParser &cp) | |
rule_t & | programParser () |
ProgramInterfacePtr | programParserResult () |
rule_t & | statementParser () |
~ProgramGraphParser () | |
Private Types | |
typedef FunctionGraphBuilder::CommandNode | CommandNode |
typedef FunctionGraphBuilder::ConditionEdge | ConditionEdge |
typedef std::map< std::string, FunctionGraphPtr > | funcmap |
typedef FunctionGraphBuilder::Graph | Graph |
A Parser for Orocos Program Scripts.
This class does the actual work. It generates a Program, by constructing the ProgramNode's. We just go over the code one single time, and construct the Program as we go. For every statement, we construct a new ProgramNode, and fill it up as we get the information we need.
Definition at line 72 of file ProgramGraphParser.hpp.
Definition at line 74 of file ProgramGraphParser.hpp.
|
private |
Definition at line 75 of file ProgramGraphParser.hpp.
|
private |
Definition at line 108 of file ProgramGraphParser.hpp.
|
private |
Definition at line 76 of file ProgramGraphParser.hpp.
RTT::ProgramGraphParser::ProgramGraphParser | ( | iter_t & | positer, |
TaskContext * | context, | ||
ExecutionEngine * | caller, | ||
CommonParser & | cp | ||
) |
Definition at line 95 of file ProgramGraphParser.cpp.
RTT::ProgramGraphParser::~ProgramGraphParser | ( | ) |
Definition at line 115 of file ProgramGraphParser.cpp.
rule_t & RTT::ProgramGraphParser::bodyParser | ( | ) |
Parses a multi-line program, which you can retrieve with bodyParserResult(). You need to initialize it with initBodyParser
Definition at line 243 of file ProgramGraphParser.cpp.
ProgramInterfacePtr RTT::ProgramGraphParser::bodyParserResult | ( | ) |
Definition at line 266 of file ProgramGraphParser.cpp.
|
private |
Definition at line 795 of file ProgramGraphParser.cpp.
|
private |
Clears helper variables of parser.
Definition at line 295 of file ProgramGraphParser.cpp.
|
private |
Definition at line 663 of file ProgramGraphParser.cpp.
|
private |
Definition at line 580 of file ProgramGraphParser.cpp.
|
private |
Definition at line 585 of file ProgramGraphParser.cpp.
|
private |
Definition at line 602 of file ProgramGraphParser.cpp.
|
private |
Definition at line 329 of file ProgramGraphParser.cpp.
Definition at line 343 of file ProgramGraphParser.cpp.
rule_t & RTT::ProgramGraphParser::functionParser | ( | ) |
Parses a function foo {} definition.
Definition at line 239 of file ProgramGraphParser.cpp.
|
private |
Definition at line 334 of file ProgramGraphParser.cpp.
void RTT::ProgramGraphParser::initBodyParser | ( | const std::string & | name, |
Service::shared_ptr | stck, | ||
int | offset | ||
) |
Initialize the bodyParser to parse and store each statement it sees. The result is retrieved with bodyParserResult().
Definition at line 227 of file ProgramGraphParser.cpp.
|
private |
Definition at line 549 of file ProgramGraphParser.cpp.
std::vector< ProgramInterfacePtr > RTT::ProgramGraphParser::parse | ( | iter_t & | begin, |
iter_t | end | ||
) |
Tries to parse programs, returns the generated programs on success.
file_parse_exception | The parser found an error. |
Definition at line 690 of file ProgramGraphParser.cpp.
std::vector< ProgramInterfacePtr > RTT::ProgramGraphParser::parseFunction | ( | iter_t & | begin, |
iter_t | end | ||
) |
Definition at line 744 of file ProgramGraphParser.cpp.
bool RTT::ProgramGraphParser::parserUsed | ( | ) | const |
Returns true if the parser was already used (even partially). an initBodyParser will reset this to false.
Definition at line 286 of file ProgramGraphParser.cpp.
Definition at line 305 of file ProgramGraphParser.cpp.
rule_t & RTT::ProgramGraphParser::programParser | ( | ) |
Returns a program foo {} parser.
Definition at line 235 of file ProgramGraphParser.cpp.
ProgramInterfacePtr RTT::ProgramGraphParser::programParserResult | ( | ) |
Returns the last program parsed by programParser()
Definition at line 253 of file ProgramGraphParser.cpp.
Definition at line 323 of file ProgramGraphParser.cpp.
|
private |
Definition at line 477 of file ProgramGraphParser.cpp.
|
private |
Definition at line 504 of file ProgramGraphParser.cpp.
Definition at line 927 of file ProgramGraphParser.cpp.
|
private |
Definition at line 509 of file ProgramGraphParser.cpp.
|
private |
Definition at line 561 of file ProgramGraphParser.cpp.
|
private |
Definition at line 437 of file ProgramGraphParser.cpp.
|
private |
Definition at line 940 of file ProgramGraphParser.cpp.
|
private |
Definition at line 638 of file ProgramGraphParser.cpp.
|
private |
Definition at line 631 of file ProgramGraphParser.cpp.
|
private |
Definition at line 607 of file ProgramGraphParser.cpp.
|
private |
Definition at line 624 of file ProgramGraphParser.cpp.
|
private |
Definition at line 643 of file ProgramGraphParser.cpp.
Definition at line 486 of file ProgramGraphParser.cpp.
|
private |
Definition at line 382 of file ProgramGraphParser.cpp.
|
private |
Definition at line 391 of file ProgramGraphParser.cpp.
|
private |
Definition at line 566 of file ProgramGraphParser.cpp.
|
private |
Definition at line 678 of file ProgramGraphParser.cpp.
|
private |
|
private |
Definition at line 450 of file ProgramGraphParser.cpp.
Definition at line 339 of file ProgramGraphParser.cpp.
|
private |
Definition at line 457 of file ProgramGraphParser.cpp.
|
private |
Definition at line 865 of file ProgramGraphParser.cpp.
|
private |
Definition at line 837 of file ProgramGraphParser.cpp.
|
private |
Definition at line 433 of file ProgramGraphParser.cpp.
|
private |
Definition at line 891 of file ProgramGraphParser.cpp.
|
private |
Definition at line 589 of file ProgramGraphParser.cpp.
|
private |
Definition at line 884 of file ProgramGraphParser.cpp.
|
private |
Definition at line 290 of file ProgramGraphParser.cpp.
|
private |
Definition at line 122 of file ProgramGraphParser.cpp.
|
private |
Definition at line 63 of file ProgramGraphParser2.cpp.
|
private |
Definition at line 545 of file ProgramGraphParser.cpp.
|
private |
Definition at line 553 of file ProgramGraphParser.cpp.
|
private |
Definition at line 301 of file ProgramGraphParser.cpp.
rule_t & RTT::ProgramGraphParser::statementParser | ( | ) |
Parses a single-line statement.
Definition at line 248 of file ProgramGraphParser.cpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 196 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 118 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 192 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 193 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
The current subcontext of root where we are working in.
Definition at line 87 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 205 of file ProgramGraphParser.hpp.
|
private |
Definition at line 195 of file ProgramGraphParser.hpp.
|
private |
The current function context where we are working in.
Definition at line 92 of file ProgramGraphParser.hpp.
|
private |
Definition at line 203 of file ProgramGraphParser.hpp.
|
private |
Definition at line 202 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 205 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 116 of file ProgramGraphParser.hpp.
|
private |
Definition at line 117 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 206 of file ProgramGraphParser.hpp.
|
private |
Definition at line 105 of file ProgramGraphParser.hpp.
|
private |
Definition at line 121 of file ProgramGraphParser.hpp.
|
private |
Definition at line 102 of file ProgramGraphParser.hpp.
|
private |
Definition at line 109 of file ProgramGraphParser.hpp.
|
private |
Definition at line 99 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 205 of file ProgramGraphParser.hpp.
|
private |
peer context for events.
Definition at line 97 of file ProgramGraphParser.hpp.
|
private |
Definition at line 197 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 199 of file ProgramGraphParser.hpp.
|
private |
Definition at line 200 of file ProgramGraphParser.hpp.
|
private |
Definition at line 204 of file ProgramGraphParser.hpp.
|
private |
Definition at line 112 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
The context given to us by the user to root the parsed programs into.
Definition at line 82 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 123 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.
|
private |
Definition at line 194 of file ProgramGraphParser.hpp.
|
private |
Definition at line 185 of file ProgramGraphParser.hpp.