25 Mar
2010
25 Mar
'10
7:54 a.m.
I have a rule like this: rule<> IP_Parser = int_p>>'.'>>int_p >>'.'>>int_p >>'.'>>int_p >> !( ('/'>>int_p)|(':'>>int_p)); Now I want to extend it that the user can use that parser to fill a simple struct: struct IP_address { std::string host; int port; int netmask; }; and use it this way: IP_address src; rule<> Source = str_p("source") >> +space_p >> IP_Parser(src) >> *space_p >> ';'; Any ideas how to do that with the old boost::spirit (boost version 1.35)? Lars R.