29 #ifdef ORO_PRAGMA_INTERFACE 30 #pragma implementation 34 #include <boost/bind.hpp> 35 #include <boost/lexical_cast.hpp> 38 #include "../TaskContext.hpp" 43 using namespace detail;
47 boost::spirit::classic::assertion<std::string> expect_open(
"Open brace expected.");
48 boost::spirit::classic::assertion<std::string> expect_close(
"Closing brace expected ( or could not find out what this line means ).");
49 boost::spirit::classic::assertion<std::string> expect_arg(
"No argument given after comma.");
54 const std::string& m )
55 : mparsed( false ), expressionparser( p ),
56 mobject( o ), mmethod( m ), _peer(peer), mtobject(tobject)
58 BOOST_SPIRIT_DEBUG_RULE( argument );
59 BOOST_SPIRIT_DEBUG_RULE( arguments );
65 >> !( argument >> *( ch_p(
',' ) >> expect_arg( argument ) ) )
66 >> expect_close(ch_p(
')')) )[
67 bind( &ArgumentsParser::seenarguments,
this ) ];
71 expressionparser.
parser() [
72 bind( &ArgumentsParser::seen_arg,
this ) ];
75 void ArgumentsParser::seen_arg()
77 margs.push_back( expressionparser.
getResult() );
81 void ArgumentsParser::seenarguments()
ArgumentsParser(ExpressionParser &p, TaskContext *peer, Service::shared_ptr tobject, const std::string &object, const std::string &method)
Construct a new ArgumentsParser.
boost::shared_ptr< Service > shared_ptr
How we parse: this parser works like a stack-based RPN calculator.
base::DataSourceBase::shared_ptr getResult()
The TaskContext is the C++ representation of an Orocos component.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.