36 #include "../Logger.hpp" 47 #include "../TaskContext.hpp" 48 #include "../internal/GlobalService.hpp" 51 #include <boost/bind.hpp> 52 #include <boost/lambda/lambda.hpp> 56 #pragma optimize( "", off) 62 using namespace boost;
63 using namespace detail;
68 boost::spirit::classic::assertion<std::string> expect_opencurly(
"Open curly brace '{' expected.");
69 boost::spirit::classic::assertion<std::string> expect_closecurly(
"Closing curly brace '}' expected in statement block (or could not find out what this line means).");
70 boost::spirit::classic::assertion<std::string> expect_closefunction(
"Closing curly brace '}' expected at end of program or function (or could not find out what this line means).");
71 boost::spirit::classic::assertion<std::string> expect_open(
"Open brace '(' expected.");
72 boost::spirit::classic::assertion<std::string> expect_close(
"Closing brace ')' expected.");
73 boost::spirit::classic::assertion<std::string> expect_comma(
"Expected a comma separator.");
74 boost::spirit::classic::assertion<std::string> expect_ident(
"Expected a valid identifier.");
75 boost::spirit::classic::assertion<std::string> expect_semicolon(
"Semicolon ';' expected after statement.");
76 boost::spirit::classic::assertion<std::string> expect_condition(
"Expected a boolean expression ( a condition ).");
77 boost::spirit::classic::assertion<std::string> expect_expression(
"Expected an expression.");
78 boost::spirit::classic::assertion<std::string> expect_command(
"Expected a command after 'do'.");
79 boost::spirit::classic::assertion<std::string> expect_nl(
"Expected a newline after statement.");
80 boost::spirit::classic::assertion<std::string> expect_eof(
"Invalid input in file.");
81 boost::spirit::classic::assertion<std::string> expect_term(
"No valid termination claues found in do ... until { } block.");
86 : rootc( t ),context(), fcontext(), mpositer( positer ),
88 implcond(0), mcondition(0), try_cond(0),
90 conditionparser( rootc, caller, cp ),
91 valuechangeparser( rootc, cp, t->provides(), caller ),
92 expressionparser( rootc, caller, cp ),
94 peerparser(rootc, commonparser),
97 exportf(false),globalf(false),
112 void ProgramGraphParser::setup() {
113 BOOST_SPIRIT_DEBUG_RULE( newline );
114 BOOST_SPIRIT_DEBUG_RULE( openbrace );
115 BOOST_SPIRIT_DEBUG_RULE( closebrace );
116 BOOST_SPIRIT_DEBUG_RULE( opencurly );
117 BOOST_SPIRIT_DEBUG_RULE( closecurly );
118 BOOST_SPIRIT_DEBUG_RULE( semicolon );
119 BOOST_SPIRIT_DEBUG_RULE( condition );
120 BOOST_SPIRIT_DEBUG_RULE( terminationclause );
121 BOOST_SPIRIT_DEBUG_RULE( jumpdestination );
122 BOOST_SPIRIT_DEBUG_RULE( terminationpart );
123 BOOST_SPIRIT_DEBUG_RULE( dostatement );
124 BOOST_SPIRIT_DEBUG_RULE( trystatement );
125 BOOST_SPIRIT_DEBUG_RULE( catchpart );
126 BOOST_SPIRIT_DEBUG_RULE( statement );
127 BOOST_SPIRIT_DEBUG_RULE( line );
128 BOOST_SPIRIT_DEBUG_RULE( content );
129 BOOST_SPIRIT_DEBUG_RULE( program );
130 BOOST_SPIRIT_DEBUG_RULE( production );
131 BOOST_SPIRIT_DEBUG_RULE( valuechange );
132 BOOST_SPIRIT_DEBUG_RULE(
function );
133 BOOST_SPIRIT_DEBUG_RULE( functions );
134 BOOST_SPIRIT_DEBUG_RULE( arguments );
135 BOOST_SPIRIT_DEBUG_RULE( returnstatement );
136 BOOST_SPIRIT_DEBUG_RULE( funcstatement );
137 BOOST_SPIRIT_DEBUG_RULE( continuepart );
138 BOOST_SPIRIT_DEBUG_RULE( callpart );
139 BOOST_SPIRIT_DEBUG_RULE( returnpart );
140 BOOST_SPIRIT_DEBUG_RULE( ifstatement );
141 BOOST_SPIRIT_DEBUG_RULE( whilestatement );
142 BOOST_SPIRIT_DEBUG_RULE( forstatement );
143 BOOST_SPIRIT_DEBUG_RULE( breakstatement );
144 BOOST_SPIRIT_DEBUG_RULE( ifblock );
145 BOOST_SPIRIT_DEBUG_RULE( funcargs );
148 openbrace = expect_open( ch_p(
'(') );
149 closebrace = expect_close( ch_p(
')') );
150 opencurly = expect_opencurly( ch_p(
'{') );
151 closecurly = expect_closecurly( ch_p(
'}') );
152 semicolon = expect_semicolon( ch_p(
';') );
153 condition = expect_condition( conditionparser.
parser()[ boost::bind(&ProgramGraphParser::seencondition,
this) ] );
160 production = *( program | function )[boost::bind(&ProgramGraphParser::programtext,
this, _1, _2)] >> expect_eof(end_p) ;
165 !(
keyword_p(
"export" )[boost::bind(&ProgramGraphParser::exportdef,
this)] |
keyword_p(
"global" )[boost::bind(&ProgramGraphParser::globaldef,
this)] |
keyword_p(
"local") )[boost::bind(&ProgramGraphParser::seenvalidinput,
this)]
166 >> (
keyword_p(
"function" )[boost::bind(&ProgramGraphParser::seenvalidinput,
this)] | commonparser.
notassertingidentifier[boost::bind( &ProgramGraphParser::seenreturntype,
this, _1, _2)] )
167 >> expect_ident( commonparser.
identifier[boost::bind(&ProgramGraphParser::seenvalidinput,
this)][ boost::bind( &ProgramGraphParser::functiondef,
this, _1, _2 ) ] )
171 >> expect_closefunction( ch_p(
'}') )[ boost::bind( &ProgramGraphParser::seenfunctionend,
this ) ]
175 funcargs = ch_p(
'(') >> ( !str_p(
"void") >> ch_p(
')') | ((
176 valuechangeparser.
bareDefinitionParser()[boost::bind(&ProgramGraphParser::seenfunctionarg,
this)]
177 >> *(ch_p(
',')>> valuechangeparser.
bareDefinitionParser()[boost::bind(&ProgramGraphParser::seenfunctionarg,
this)]) )
182 keyword_p(
"program" )[boost::bind(&ProgramGraphParser::seenvalidinput,
this)]
183 >> expect_ident( commonparser.
identifier[ boost::bind( &ProgramGraphParser::programdef,
this, _1, _2 ) ] )
186 >> expect_closefunction( ch_p(
'}') )[ boost::bind( &ProgramGraphParser::seenprogramend,
this ) ];
196 line = statement[boost::bind(&ProgramGraphParser::noskip_eol,
this )] >> commonparser.
eos[boost::bind(&ProgramGraphParser::skip_eol,
this )];
198 statement = valuechange | trystatement | funcstatement | returnstatement | ifstatement | whilestatement | forstatement | breakstatement | dostatement;
200 valuechange = valuechangeparser.
parser()[ boost::bind( &ProgramGraphParser::seenvaluechange,
this ) ];
205 (
keyword_p(
"yield") |
keyword_p(
"nothing"))[boost::bind(&ProgramGraphParser::seenyield,
this)]
206 | expressionparser.
parser()[ boost::bind(&ProgramGraphParser::seenstatement,
this) ]
212 >> expect_command ( expressionparser.
parser()[ boost::bind( &ProgramGraphParser::seentrystatement,
this ) ] )
219 assert(program_builder != 0 );
220 program_builder->startFunction(name);
221 this->setStack( stck );
222 this->clearParseState();
245 if (program_list.empty())
247 program_text =
"Bug: Program Text to be set by Parser.";
249 program_list.front()->setText( program_text );
250 result=program_list.front();
251 this->cleanup(
false);
252 program_list.clear();
259 valuechangeparser.
store( context );
260 valuechangeparser.
reset();
263 program_builder->returnFunction(
new ConditionTrue, mpositer.get_position().line - ln_offset );
264 program_builder->proceedToNext( mpositer.get_position().line - ln_offset);
265 return program_builder->endFunction( mpositer.get_position().line - ln_offset );
282 valuechangeparser.
load(context);
285 void ProgramGraphParser::clearParseState() {
291 void ProgramGraphParser::startofprogram()
295 void ProgramGraphParser::programdef(
iter_t begin,
iter_t end )
299 std::string def(begin, end);
301 if ( rootc->
provides()->hasService( def ) )
307 pi->setProgramService(ptsk);
308 pi->setUnloadOnStop(
false );
310 rootc->
provides()->addService( ptsk );
313 void ProgramGraphParser::programtext(
iter_t begin,
iter_t end )
319 void ProgramGraphParser::exportdef()
324 void ProgramGraphParser::globaldef()
329 void ProgramGraphParser::seenreturntype(
iter_t begin,
iter_t end )
331 rettype = std::string(begin, end);
333 void ProgramGraphParser::functiondef(
iter_t begin,
iter_t end )
337 std::string funcdef(begin, end);
350 if ( mfuncs.count( funcdef ) )
354 if ( !rettype.empty() && rettype !=
"void") {
357 throw_(
iter_t(),
"Return type '" + rettype +
"' for function '"+ funcdef +
"' is an unknown type." );
361 mfuncs[funcdef] = program_builder->startFunction( funcdef );
362 program_builder->getFunction()->setResult( retarg );
368 fcontext.reset(
new Service(funcdef) );
372 void ProgramGraphParser::seenfunctionarg()
378 valuechangeparser.
clear();
381 void ProgramGraphParser::seenfunctionend()
384 program_builder->returnFunction(
new ConditionTrue, mpositer.get_position().line - ln_offset );
385 program_builder->proceedToNext( mpositer.get_position().line - ln_offset );
386 boost::shared_ptr<ProgramInterface> mfunc = program_builder->endFunction( mpositer.get_position().line - ln_offset );
390 std::map<const DataSourceBase*, DataSourceBase*> dummy;
392 if (rootc->
provides()->hasMember( mfunc->getName() ) )
393 log(
Warning) <<
"Redefining function '"<< rootc->
getName() <<
"." << mfunc->getName() <<
"': only new programs will use this new function." <<endlog();
394 rootc->
provides()->add(mfunc->getName(), cfi );
399 std::map<const DataSourceBase*, DataSourceBase*> dummy;
402 log(
Warning) <<
"Redefining function '"<<
GlobalService::Instance()->getName() <<
"."<< mfunc->getName() <<
"': only new programs will use this new function." <<endlog();
406 std::map<const DataSourceBase*, DataSourceBase*> dummy;
408 if (rootc->
provides(
"scripting")->hasMember( mfunc->getName() ) )
409 log(
Warning) <<
"Redefining function '"<< rootc->
getName() <<
".scripting."<< mfunc->getName() <<
"': only new programs will use this new function." <<endlog();
410 rootc->
provides(
"scripting")->add(mfunc->getName(), cfi );
418 exportf =
false; globalf =
false;
420 valuechangeparser.
reset();
423 void ProgramGraphParser::seenvalidinput() {
427 void ProgramGraphParser::seencondition()
430 assert( mcondition );
440 void ProgramGraphParser::seenreturnstatement()
443 program_builder->returnFunction(
new ConditionTrue, mpositer.get_position().line - ln_offset );
444 program_builder->proceedToNext( mpositer.get_position().line - ln_offset );
447 void ProgramGraphParser::seenreturnvalue()
449 AttributeBase* ar =program_builder->getFunction()->getResult();
458 program_builder->setCommand( assigncomm );
459 program_builder->proceedToNext(
new ConditionTrue(), mpositer.get_position().line - ln_offset );
467 void ProgramGraphParser::seenbreakstatement()
469 if ( program_builder->inLoop() ) {
470 program_builder->breakLoop();
471 program_builder->proceedToNext( mpositer.get_position().line - ln_offset );
476 void ProgramGraphParser::seenfuncidentifier(
iter_t begin,
iter_t end )
479 std::string fname(begin, end);
480 if ( mfuncs.count(fname) == 0 )
482 if ( fname == program_builder->getFunction()->getName() )
485 mcallfunc = mfuncs[ fname ];
490 arguments = argsparser->
parser();
494 void ProgramGraphParser::seencallfuncargs()
496 callfnargs = argsparser->
result();
499 void ProgramGraphParser::seencallfuncstatement()
501 log(
Warning) <<
" 'call' has been deprecated. Please remove this keyword." << endlog();
509 program_builder->setFunction( mcallfunc, callfnargs );
532 program_builder->proceedToNext(mpositer.get_position().line - ln_offset);
535 void ProgramGraphParser::skip_eol() {
539 void ProgramGraphParser::noskip_eol() {
543 void ProgramGraphParser::startcatchpart() {
547 program_builder->startIfStatement( try_cond, mpositer.get_position().line - ln_offset );
551 void ProgramGraphParser::seencatchpart() {
553 this->endifstatement();
556 void ProgramGraphParser::seenifstatement() {
560 std::pair<ActionInterface*, ConditionInterface*> comcon;
562 program_builder->setCommand( comcon.first );
563 program_builder->startIfStatement( comcon.second, mpositer.get_position().line - ln_offset );
570 void ProgramGraphParser::endifblock() {
571 program_builder->endIfBlock(mpositer.get_position().line - ln_offset);
575 void ProgramGraphParser::endifstatement() {
576 program_builder->endElseBlock(mpositer.get_position().line - ln_offset);
579 void ProgramGraphParser::seenwhilestatement() {
583 std::pair<ActionInterface*, ConditionInterface*> comcon;
585 program_builder->setCommand( comcon.first );
586 program_builder->startWhileStatement( comcon.second, mpositer.get_position().line - ln_offset );
592 void ProgramGraphParser::endwhilestatement() {
593 program_builder->endWhileBlock(mpositer.get_position().line - ln_offset);
597 void ProgramGraphParser::seenforinit()
602 std::vector<ActionInterface*> acv = valuechangeparser.
assignCommands();
604 valuechangeparser.
clear();
605 if ( acv.size() == 1) {
608 else if (acv.size() > 1) {
611 for_init_command = ac;
614 void ProgramGraphParser::seenforinit_expr()
621 void ProgramGraphParser::seenforincr()
628 void ProgramGraphParser::seenemptyforincr()
630 for_incr_command.push( 0 );
633 void ProgramGraphParser::seenforstatement() {
634 assert( mcondition );
637 if ( for_init_command )
639 program_builder->setCommand( for_init_command );
640 program_builder->proceedToNext(
new ConditionTrue, mpositer.get_position().line - ln_offset );
642 for_init_command = 0;
645 std::pair<ActionInterface*, ConditionInterface*> comcon;
647 program_builder->setCommand( comcon.first );
648 program_builder->startWhileStatement( comcon.second, mpositer.get_position().line - ln_offset );
653 void ProgramGraphParser::endforstatement() {
656 for_incr_command.pop();
660 program_builder->setCommand( incr );
663 program_builder->proceedToNext(
new ConditionTrue, mpositer.get_position().line - ln_offset );
665 program_builder->endWhileBlock(mpositer.get_position().line - ln_offset);
668 void ProgramGraphParser::seenprogramend()
671 program_builder->returnFunction(
new ConditionTrue, mpositer.get_position().line - ln_offset );
672 program_builder->proceedToNext( mpositer.get_position().line - ln_offset );
673 program_list.push_back(program_builder->endFunction( mpositer.get_position().line - ln_offset ) );
676 valuechangeparser.
store( context );
677 valuechangeparser.
reset();
683 iter_t begin_copy = begin;
684 skip_parser_t skip_parser = comment_p(
"#" ) | comment_p(
"//" ) | comment_p(
"/*",
"*/" ) | (space_p - eol_p) | commonparser.
skipper;
687 scanner_t scanner( begin, end, policies );
688 program_list.clear();
694 if ( ! production.parse( scanner ) )
699 mpositer.get_position().file, mpositer.get_position().line,
700 mpositer.get_position().column );
702 program_text = std::string( begin_copy, begin );
704 for (std::vector<FunctionGraphPtr>::iterator it= program_list.begin();it!=program_list.end();++it)
705 (*it)->setText( program_text );
706 this->cleanup(
false);
707 std::vector<ProgramInterfacePtr> result;
708 for (std::vector<FunctionGraphPtr>::iterator it= program_list.begin();it!=program_list.end();++it)
709 result.push_back( *it );
710 program_list.clear();
713 catch(
const parser_error<std::string, iter_t>& e )
716 program_list.clear();
719 mpositer.get_position().file, mpositer.get_position().line,
720 mpositer.get_position().column );
727 program_list.clear();
729 e.
copy(), mpositer.get_position().file,
730 mpositer.get_position().line, mpositer.get_position().column );
737 iter_t begin_copy = begin;
740 iter_pol_t iter_policy( ( comment_p(
"#" ) | comment_p(
"//" ) | comment_p(
"/*",
"*/" ) | (space_p - eol_p) | commonparser.
skipper ) );
742 scanner_t scanner( begin, end, policies );
744 std::vector< ProgramInterfacePtr > function_list;
747 if ( ! functions.parse( scanner ) )
752 mpositer.get_position().file, mpositer.get_position().line,
753 mpositer.get_position().column );
755 program_text = std::string( begin_copy, begin );
757 for (funcmap::iterator it= mfuncs.begin();it!=mfuncs.end();++it) {
758 it->second->setText( program_text );
759 function_list.push_back( it->second );
762 this->cleanup(
false);
763 return function_list;
766 catch(
const parser_error<std::string, iter_t>& e )
771 mpositer.get_position().file, mpositer.get_position().line,
772 mpositer.get_position().column );
780 e.
copy(), mpositer.get_position().file,
781 mpositer.get_position().line, mpositer.get_position().column );
785 void ProgramGraphParser::cleanup(
bool unload_service)
787 if (unload_service && rootc && context)
788 rootc->
provides()->removeService( context->getName() );
799 delete for_init_command;
800 for_init_command = 0;
801 while (!for_incr_command.empty() ) {
802 delete for_incr_command.top();
803 for_incr_command.pop();
807 exportf =
false; globalf =
false;
817 while ( ! mfuncs.empty() ) {
818 mfuncs.erase( mfuncs.begin() );
822 valuechangeparser.
reset();
823 conditionparser.
reset();
827 void ProgramGraphParser::seentrystatement()
838 program_builder->setCommand(command);
846 program_builder->setCommand( trycommand );
847 try_cond = tryresult;
849 if ( program_builder->buildEdges() == 0 )
850 program_builder->proceedToNext(
new ConditionTrue(), mpositer.get_position().line - ln_offset );
852 program_builder->proceedToNext( mpositer.get_position().line - ln_offset );
855 void ProgramGraphParser::seenstatement()
867 program_builder->addConditionEdge( cnd, program_builder->nextNode() );
868 if ( program_builder->buildEdges() == 0 )
869 program_builder->proceedToNext(
new ConditionTrue(), mpositer.get_position().line - ln_offset );
871 program_builder->proceedToNext( mpositer.get_position().line - ln_offset );
874 void ProgramGraphParser::seenyield()
877 program_builder->setCommand(
new CommandNOP );
878 program_builder->proceedToNext(
new ConditionOnce(
false), mpositer.get_position().line - ln_offset );
881 void ProgramGraphParser::seenvaluechange()
887 std::vector<ActionInterface*> acv = valuechangeparser.
assignCommands();
888 std::vector<ConditionInterface*> conds = valuechangeparser.
assignConditions();
890 valuechangeparser.
clear();
891 if ( acv.size() == 1) {
894 else if (acv.size() > 1) {
897 if ( conds.size() ==1 ) {
898 cond = conds.front();
900 else if ( conds.size() > 1) {
901 cond = conds.front();
903 while ( i != conds.size() ) {
909 program_builder->setCommand( ac );
913 program_builder->proceedToNext( cond, mpositer.get_position().line - ln_offset );
917 void ProgramGraphParser::seencallfunclabel(
iter_t begin,
iter_t end )
921 seenfuncidentifier( begin, end );
923 assert( mcondition );
925 program_builder->appendFunction( mcondition, mcallfunc, callfnargs);
930 void ProgramGraphParser::seencontinue( )
934 assert ( mcondition );
937 program_builder->addConditionEdge( mcondition, program_builder->nextNode() );
std::pair< base::ActionInterface *, ConditionInterface * > getParseResultAsCommand()
Retrieve the result as a command, condition pair.
#define keyword_p(word)
Returns a rule which parses a keyword followed by a non-identifier character, newline or semicolon...
std::vector< base::DataSourceBase::shared_ptr > result()
Get the parsed internal::DataSource's.
rule_t & parser()
Returns the full parser, as it is used most.
This class builds a program consisting of data contained in a program graph tree, based on the Boost ...
A Command which evaluates a internal::DataSource<bool> and returns the result of get().
rule_t eos
End Of Statement Parser.
boost::shared_ptr< FunctionGraph > FunctionGraphPtr
ConditionInterface * getParseResult()
Call this to get the parsed condition.
base::AttributeBase * buildAttribute(std::string name, base::DataSourceBase::shared_ptr source=0) const
Build an Attribute of this type.
Service::shared_ptr provides()
Returns this Service.
void load(Service::shared_ptr source)
Loads all defined names from a service.
virtual AttributeBase * clone() const =0
Returns a clone of this AttributeBase.
rule_t & bareDefinitionParser()
The parser that parses a bare variable definition.
void reset()
After reset, peer() == current context and object() == "this".
ProgramInterfacePtr bodyParserResult()
This interface represents the concept of a condition which can be evaluated and return true or false...
bool skipeol
Saves eol skipping state.
A conditional that evaluates true.
void reset()
Completely clear all data and erase all parsed definitions from the taskcontext given in the construc...
Compose an 'AND' function of two Conditions.
parse_exception class that is used for various semantic errors for which it was not worth defining a ...
virtual DataSourceBase::shared_ptr getDataSource() const =0
Return a internal::DataSource which contains the same contents.
boost::shared_ptr< ProgramInterface > ProgramInterfacePtr
virtual parse_exception * copy() const =0
void initBodyParser(const std::string &name, Service::shared_ptr stck, int offset)
Initialize the bodyParser to parse and store each statement it sees.
This is a parser that you construct to parse a set of arguments.
This is an exception class that keeps a parse_exception pointer along with the location in the file a...
ConditionInterface * getCmdResult()
This class contains some very common parser definitions.
std::vector< scripting::ConditionInterface * > assignConditions()
parse_exception class that is used for various syntactic errors for which it was not worth defining a...
An execution engine serialises (executes one after the other) the execution of all commands...
A command which tries another command and stores the result in a internal::DataSource<bool>.
A conditional that evaluates the first time true and afterwards always false (or vice versa)...
boost::shared_ptr< Service > shared_ptr
ProgramInterfacePtr programParserResult()
Returns the last program parsed by programParser()
bool parserUsed() const
Returns true if the parser was already used (even partially).
This class allows storage and retrieval of operations, ports, attributes and properties provided by a...
rule_t & programParser()
Returns a program foo {} parser.
void store(Service::shared_ptr other)
Store allDefinedNames() in a service.
scanner< iter_t, scanner_pol_t > scanner_t
rule_t & functionParser()
Parses a function foo {} definition.
ProgramGraphParser(iter_t &positer, TaskContext *context, ExecutionEngine *caller, CommonParser &cp)
An attribute is a minimalistic, named placeholder for data.
skip_parser_iteration_policy< skip_parser_t > iter_pol_t
This class represents a program as an Service in the Orocos TaskContext system.
functor_parser< eol_skip_functor > skipper
End Of Statement Parser.
static std::ostream & endl(std::ostream &__os)
Based on the software pattern 'command', this interface allows execution of action objects...
base::DataSourceBase::shared_ptr getResult()
This is the uppermost exception class in the parser system.
A class for representing a user type, and which can build instances of that type. ...
internal::AssignableDataSource< bool >::shared_ptr result()
rule_t & statementParser()
Parses a single-line statement.
rule_t & bodyParser()
Parses a multi-line program, which you can retrieve with bodyParserResult().
A Command which evaluates a base::DataSourceBase and always returns true.
boost_spirit::alternative< boost_spirit::alternative< boost_spirit::alternative< boost_spirit::alternative< boost_spirit::confix_parser< boost_spirit::impl::string_as_parser::type, boost_spirit::kleene_star< boost_spirit::anychar_parser >, boost_spirit::alternative< boost_spirit::eol_parser, boost_spirit::end_parser >, boost_spirit::unary_parser_category, boost_spirit::non_nested, boost_spirit::is_lexeme >, boost_spirit::confix_parser< boost_spirit::impl::string_as_parser::type, boost_spirit::kleene_star< boost_spirit::anychar_parser >, boost_spirit::alternative< boost_spirit::eol_parser, boost_spirit::end_parser >, boost_spirit::unary_parser_category, boost_spirit::non_nested, boost_spirit::is_lexeme > >, boost_spirit::confix_parser< boost_spirit::impl::string_as_parser::type, boost_spirit::kleene_star< boost_spirit::anychar_parser >, boost_spirit::impl::string_as_parser::type, boost_spirit::unary_parser_category, boost_spirit::non_nested, boost_spirit::is_lexeme > >, boost_spirit::difference< boost_spirit::space_parser, boost_spirit::eol_parser > >, boost_spirit::functor_parser< eol_skip_functor > > skip_parser_t
std::vector< ProgramInterfacePtr > parse(iter_t &begin, iter_t end)
Tries to parse programs, returns the generated programs on success.
A Factory which delivers operations which execute a FunctionGraph in an engine.
void clear()
Clear assignCommands(), definedValues() and definedNames().
std::vector< ProgramInterfacePtr > parseFunction(iter_t &begin, iter_t end)
static shared_ptr Instance()
static Logger & log()
As Instance(), but more userfriendly.
base::AttributeBase * lastDefinedValue()
The TaskContext is the C++ representation of an Orocos component.
Exception thrown when a factory is requested to create an object, but a wrong argument type was given...
std::vector< base::ActionInterface * > assignCommands()
Returns the (accept/reject) status of another command.
Exception thrown when a factory is requested to create an object but the wrong number of arguments wa...
boost::intrusive_ptr< DataSourceBase > shared_ptr
Use this type to store a pointer to a DataSourceBase.
rule_t notassertingidentifier
identifier with <template> marks in it
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
boost::shared_ptr< ProgramService > ProgramServicePtr
scanner_policies< iter_pol_t > scanner_pol_t
Based on the software pattern 'composite', this class RTT_SCRIPTING_API allows composing command obje...
A conditional that evaluates false.
const ExecutionEngine * engine() const
Get a const pointer to the ExecutionEngine of this Task.
static RTT_API Service::shared_ptr Instance()
virtual const std::string & getName() const
Returns the name of this TaskContext.