Boost::spirit passing semantic actions in inherited attributes
问题 I'm trying to pass semantic action in a grammar's inherited argument. In the very basic example below the grammar parses two numbers and I pass semantic action (in a form of c++ lambda) into it and I'd like this action to be called on parsing of the first number. However it does not called but silently ignored and I'd like to know why is it so and what is the proper way to do such things. #include <iostream> #include <boost/spirit/include/qi.hpp> using namespace std; using namespace boost;