Orocos Real-Time Toolkit
2.8.3
|
How we parse: this parser works like a stack-based RPN calculator. More...
#include <rtt/scripting/ExpressionParser.hpp>
Public Member Functions | |
ExpressionParser (TaskContext *pc, ExecutionEngine *caller, CommonParser &common_parser) | |
~ExpressionParser () | |
rule_t & | parser () |
base::DataSourceBase::shared_ptr | getResult () |
boost::shared_ptr< base::AttributeBase > | getHandle () |
In case the parsed result returns a SendHandle, ask the parser to also create a handle for it. More... | |
void | dropResult () |
bool | hasResult () |
How we parse: this parser works like a stack-based RPN calculator.
An atomic expression pushes one internal::DataSource up the stack, a binary expression pops two DataSources, and pushes a new one, a unary pops one, and pushes one etc. This allows for the reentrancy we need..
Definition at line 140 of file ExpressionParser.hpp.
RTT::ExpressionParser::ExpressionParser | ( | TaskContext * | pc, |
ExecutionEngine * | caller, | ||
CommonParser & | common_parser | ||
) |
Definition at line 332 of file ExpressionParser.cpp.
References RTT::scripting::DataCallParser::getParseHandle(), RTT::scripting::DataCallParser::getParseResult(), RTT::scripting::ConstructorParser::getParseResult(), RTT::scripting::CommonParser::identchar, RTT::scripting::CommonParser::identifier, RTT::scripting::CommonParser::keyword, RTT::scripting::ValueParser::lastParsed(), RTT::scripting::DataCallParser::parser(), RTT::scripting::ValueParser::parser(), RTT::scripting::ConstructorParser::parser(), and RTT::scripting::CommonParser::skipeol.
RTT::ExpressionParser::~ExpressionParser | ( | ) |
Definition at line 569 of file ExpressionParser.cpp.
void RTT::ExpressionParser::dropResult | ( | ) |
Definition at line 697 of file ExpressionParser.cpp.
Referenced by RTT::scripting::ArgumentsParser::ArgumentsParser(), RTT::scripting::Parser::parseExpression(), RTT::scripting::ProgramGraphParser::parseFunction(), RTT::scripting::ProgramGraphParser::parserUsed(), RTT::scripting::StateGraphParser::storeOffset(), RTT::scripting::ValueChangeParser::ValueChangeParser(), and RTT::scripting::ConditionParser::~ConditionParser().
boost::shared_ptr< AttributeBase > RTT::ExpressionParser::getHandle | ( | ) |
In case the parsed result returns a SendHandle, ask the parser to also create a handle for it.
Definition at line 588 of file ExpressionParser.cpp.
References RTT::TaskContext::attributes(), RTT::base::AttributeBase::getDataSource(), RTT::ConfigurationInterface::getValues(), RTT::ConfigurationInterface::removeAttribute(), RTT::base::AttributeBase::setName(), and RTT::ConfigurationInterface::setValue().
DataSourceBase::shared_ptr RTT::ExpressionParser::getResult | ( | ) |
Definition at line 582 of file ExpressionParser.cpp.
Referenced by RTT::scripting::ArgumentsParser::ArgumentsParser(), RTT::scripting::Parser::parseExpression(), RTT::scripting::ProgramGraphParser::parseFunction(), RTT::scripting::ProgramGraphParser::parserUsed(), RTT::scripting::StateGraphParser::storeOffset(), RTT::scripting::ValueChangeParser::ValueChangeParser(), and RTT::scripting::ConditionParser::~ConditionParser().
|
inline |
Definition at line 218 of file ExpressionParser.hpp.
Referenced by RTT::scripting::Parser::parseExpression(), and RTT::scripting::ValueChangeParser::ValueChangeParser().
rule_t & RTT::ExpressionParser::parser | ( | ) |
Definition at line 577 of file ExpressionParser.cpp.
Referenced by RTT::scripting::ArgumentsParser::ArgumentsParser(), RTT::scripting::ConditionParser::ConditionParser(), RTT::scripting::Parser::parseExpression(), RTT::scripting::StateGraphParser::StateGraphParser(), RTT::scripting::ValueChangeParser::ValueChangeParser(), and RTT::scripting::ProgramGraphParser::~ProgramGraphParser().