Boost logo

Boost Users :

Subject: [Boost-users] [proto] Unable to display_expr a spirit expression
From: Marcin Zalewski (marcin.zalewski_at_[hidden])
Date: 2010-11-21 12:38:36


Hello.

I have a following program:

#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/proto/core.hpp>

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 <boost/spirit/home/phoenix/operator.hpp> (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?

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.

-m


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net