
I have a following program:
#include
#include #include int main () { // boost::proto::display_expr(boost::phoenix::arg_names::arg1);
boost::proto::display_expr(boost::spirit::int_[boost::phoenix::arg_names:: arg1]); }
That works as expected:
subscript( terminal(N5boost6spirit3tag4int_E) , terminal(N5boost7phoenix5actorINS0_8argumentILi0EEEEE) )
When I include
(as the last include), however, the output of the program changes to: subscript( terminal(N5boost6spirit3tag4int_E) , terminal()
I am not sure if this is expected, unsupported, or a bug. Anyone?
That's expected as Proto does not know anything about Phoenix (V2). This will be different with the new Phoenix V3 (in development), which is built on top of Proto as well.
Just to put this in context, I am trying to figure out how does spirit intercept phoenix expressions (e.g., in semantic actions) to wrap them in proto terminals. The infrastructure of spirit is rather complex, so if anyone can point me in the right direction, I would really appreciate it.
Spirit has special code to deal with Phoenix V2 function objects. For instance, Phoenix semantic actions are handled here: spirit/home/support/action_dispatch.hpp, line 41. Regards Hartmut --------------- http://boost-spirit.com