parsing a simple repeated text macro with Boost.spirit
问题 I'm learning how to use Boost.Spirit library for parsing strings. It seems to be a very nice tool but difficult as well. So, I want to parse a string with some words separated with / and put them in a vector of strings. Here is an example: word1/word2/word3 . That's a simple task, I can do this with the following finction: bool r = phrase_parse(first, last, (+~char_("/") % qi::lit("/")),space,v) where v is std::vector<std::string> . But in general, I'd like to parse something like w1/[w2/w3]2