I use Boost :: Spirit to parse text in structures. To do this, use BOOST_FUSION_ADAPT_STRUCT for text analysis and direct storage in the structure. I know that a macro takes 2 arguments: the name of the structure as the 1st argument and all members of the structure as the 2nd argument. And I only pass those 2. But I get a compilation error saying:
error: macro "BOOST_FUSION_ADAPT_STRUCT_FILLER_0" passed 3 arguments, but takes just 2
Here is a snippet of code. Let me know if you need all the code.
Thanks.
namespace client { namespace qi = boost::spirit::qi; namespace ascii = boost::spirit::ascii; namespace phoenix = boost::phoenix; struct Dir_Entry_Pair { std::string dir; std::string value1; std::pair<std::string, std::string> keyw_value2; }; } BOOST_FUSION_ADAPT_STRUCT( client::Dir_Entry_Pair, (std::string, dir) (std::string, value1) (std::pair< std::string, std::string >, keyw_value2))
This is the rule I'm trying to analyze,
qi::rule<Iterator, Dir_Entry_Pair()> ppair = dir >> '/' >> entry >> -(keyword >> entry);
Nik
source share