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

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)
 
 ~StateGraphParser ()
 
std::vector< ParsedStateMachinePtr > parse (iter_t &begin, iter_t end)
 
rule_tparser ()
 Returns the top-level parser for state machines. More...
 
ParsedStateMachinePtr getParserResult ()
 Returns the last state machine instantiation of parser() or null if no instantiations were seen. More...
 
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. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

RTT::StateGraphParser::StateGraphParser ( iter_t positer,
TaskContext tc,
ExecutionEngine caller,
CommonParser cp 
)
RTT::StateGraphParser::~StateGraphParser ( )

Member Function Documentation

ParsedStateMachinePtr RTT::StateGraphParser::getParserResult ( )

Returns the last state machine instantiation of parser() or null if no instantiations were seen.

Definition at line 321 of file StateGraphParser.cpp.

References RTT::scripting::CommandComposite::add(), RTT::scripting::ProgramGraphParser::bodyParser(), RTT::scripting::ProgramGraphParser::bodyParserResult(), RTT::scripting::ConditionInterface::clone(), RTT::base::TaskCore::engine(), RTT::wrong_types_of_args_exception::expected_, RTT::scripting::StateDescription::getEntryProgram(), RTT::scripting::StateDescription::getExitProgram(), RTT::scripting::StateDescription::getHandleProgram(), RTT::scripting::StateDescription::getName(), RTT::scripting::ConditionParser::getParseResult(), RTT::scripting::StateDescription::getRunProgram(), RTT::scripting::ParsedStateMachine::getService(), RTT::scripting::ProgramGraphParser::initBodyParser(), RTT::scripting::StateDescription::isDefined(), RTT::NewData, ORO_THROW, RTT::scripting::ArgumentsParser::parser(), RTT::TaskContext::provides(), RTT::wrong_number_of_args_exception::received, RTT::wrong_types_of_args_exception::received_, RTT::scripting::ConditionParser::reset(), RTT::scripting::PeerParser::reset(), RTT::scripting::ValueChangeParser::reset(), RTT::scripting::ArgumentsParser::result(), RTT::scripting::StateDescription::setDefined(), RTT::scripting::StateDescription::setEntryPoint(), RTT::scripting::StateDescription::setEntryProgram(), RTT::scripting::StateDescription::setExitProgram(), RTT::scripting::StateDescription::setHandleProgram(), RTT::scripting::StateDescription::setRunProgram(), RTT::scripting::ValueChangeParser::store(), RTT::scripting::PeerParser::taskObject(), RTT::internal::values(), RTT::wrong_number_of_args_exception::wanted, and RTT::wrong_types_of_args_exception::whicharg.

Referenced by RTT::scripting::ScriptParser::ScriptParser().

std::vector< ParsedStateMachinePtr > RTT::StateGraphParser::parse ( iter_t begin,
iter_t  end 
)
rule_t & RTT::StateGraphParser::parser ( )

Returns the top-level parser for state machines.

It parses one state machine definition or one state machine instantiation.

See also
storeOffset()

Definition at line 317 of file StateGraphParser.cpp.

Referenced by RTT::scripting::ScriptParser::ScriptParser().

void RTT::StateGraphParser::storeOffset ( )

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