I'm trying to build an AST with boost spirit and I've been struggling with how to build synthesized arguments when using C++11 lambda expressions as semantic actions.
Say I have a rule:
qi::rule<char*,ascii::space_type,SomeStruct()> rule = some_parser[[](some_type val){/*code to build SomeStruct from val*/}];
How does my lambda return the synthesized argument (SomeStruct)? By the return value? Because qi::_val is not available in this context right? (this is a bit obscure to me, sorry if this question is not well formulated)
Thanks in advance for any pointer in the right direction!