
thanks for our answer ! Your solution work, but it is not exactly I want. Indeed this expression return the typename of a tag (for example literal-char) instead its value ( "A" , "B" , .... ). for example if my start rule is start = qi::char_("a-z") > qi::char_("!"); and I parse the string "a#" then I expect that _4 contain "!" , phx::bind(&boost::spirit::info::tag, qi::_4) return "literal-char" 2 questions : a) I have a look in boost::spirit::info class is the boost::spirit::info::value member is containing the data I want ( ie "!") b) perhaps it exists an alternative like phx::construct<>( phx::val("") << _4 ) thanks again Vincent Agnus Le 06/04/2011 17:07, TONGARI a écrit :
2011/4/6 TONGARI
mailto:tongari95@gmail.com> 2011/4/6 Vincent Agnus
mailto:vincent.agnus@ircad.fr> How can a get qi::_4 as string ?
phx::bind(&boost::spirit::info::tag, qi::_4)
Well, this may or may not be what you want, though...
qi::_4 here stands for a boost::spirit::info object which seems not documented yet. Anyway, it's not a string, but it's outputable (traverse through its value, a tree structure), so its tag member (a utf8_string) is not identical to what will be output, you can see your BOOST_ROOT/boost/spirit/home/support/info.hpp
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users