Boost Spirit Qi Custom Syntesized Attribute (Set a specific member of a struct attribute via a semantic action)
问题 Suppose I have a structure that I want to parse into with Spirit Qi, that is defined as such: struct data_ { bool export; std::wstring name; data_() : export(false) {} }; Also, suppose the struct has been adapted to fusion like this: BOOST_FUSION_ADAPT_STRUCT( data_, (bool, export) (std::wstring, name) ) And the associated rule is: qi::rule<Iterator, data_(), skipper<Iterator> > rule_data; rule_data = -lexeme["SpecialText" >> !(alnum | '_')] [ boost::phoenix::at_c<0> = true ] // If this