Orocos Real-Time Toolkit
2.6.0
|
This is not a parser in the Boost.spirit sense of the word, it's just a class used to hold the parser and semantic actions. More...
#include <rtt/scripting/StateGraphParser.hpp>
Public Member Functions | |
StateGraphParser (iter_t &positer, TaskContext *tc, ExecutionEngine *caller, CommonParser *cp) | |
std::vector < ParsedStateMachinePtr > | parse (iter_t &begin, iter_t end) |
rule_t & | parser () |
Returns the top-level parser for state machines. | |
ParsedStateMachinePtr | getParserResult () |
Returns the last state machine instantiation of parser() or null if no instantiations were seen. | |
void | storeOffset () |
Stores the current position in the input stream (iterator received from the constructor) in order to be able to extract the statemachine's text from the input stream. |
This is not a parser in the Boost.spirit sense of the word, it's just a class used to hold the parser and semantic actions.
This class does the actual work. It generates a Finite State Graph, by constructing the State nodes. We just go over the code one single time, and construct the FSM as we go. For every statement, we construct a new GraphNode, and fill it up as we get the information we need.
Definition at line 61 of file StateGraphParser.hpp.
RTT::StateGraphParser::StateGraphParser | ( | iter_t & | positer, |
TaskContext * | tc, | ||
ExecutionEngine * | caller, | ||
CommonParser * | cp | ||
) |
peerparser->parser() >>
Definition at line 101 of file StateGraphParser.cpp.
References RTT::scripting::ValueChangeParser::aliasDefinitionParser(), RTT::scripting::ValueChangeParser::constantDefinitionParser(), RTT::scripting::CommonParser::eos, RTT::scripting::ValueChangeParser::paramDefinitionParser(), RTT::scripting::CommonParser::skipeol, storeOffset(), and RTT::scripting::ValueChangeParser::variableDefinitionParser().
rule_t & RTT::StateGraphParser::parser | ( | ) |
Returns the top-level parser for state machines.
It parses one state machine definition or one state machine instantiation.
Definition at line 317 of file StateGraphParser.cpp.
Referenced by RTT::scripting::ScriptParser::ScriptParser().
void RTT::StateGraphParser::storeOffset | ( | ) |
Stores the current position in the input stream (iterator received from the constructor) in order to be able to extract the statemachine's text from the input stream.
You need to call this function once before using the parser().
Definition at line 869 of file StateGraphParser.cpp.
Referenced by RTT::scripting::ScriptParser::parse(), RTT::scripting::ScriptParser::ScriptParser(), and StateGraphParser().