Expression grammar with exponentiation operator using Boost Spirit
问题 I would like to add the exponentiation operator to the expression grammar provided in the Boost spirit samples. The BNF grammar is the following: (see this answer for example: "Unambiguous grammar for exponentiation operation" ) E -> E + T | E - T | T T -> T * F | T / F | X X -> X ^ Y | Y Y -> i | (E) which I translated to Boost spirit like this: template <typename Iterator> struct calculator : qi::grammar<Iterator, ascii::space_type> { calculator() : calculator::base_type(expression) { qi: