Dynamically combine Boost.Spirit.Qi rules at runtime (arbitrary number of alternatives)
问题 I was wondering whether there is a way in Boost.Spirit.Qi to dynamically combine an arbitrary number of rules at runtime. The inner workings of Boost.Spirit are still a bit of a mystery to me, but since rules are implemented as objects it seems feasible. My motivation is to make certain parts of my grammar easily extendable. Consider the following contrived example: namespace qi = boost::spirit::qi; namespace px = boost::phoenix; typedef std::string::const_iterator iterator_t; template