
BTW I do specify a proto grammar, and only enable the operators I need on a case by case basis, in this case though I would need to restrict the grammar so that proto's shift operators are only enabled for RHS arguments of integer type. Is that possible?
Yes. Can you post your grammar?
Pretty basic at present, need to refine those terminals a bit more! : struct big_number_grammar : proto::or_< proto::terminal< proto::_ > , proto::plus< big_number_grammar, big_number_grammar > , proto::multiplies< big_number_grammar, big_number_grammar > , proto::minus< big_number_grammar, big_number_grammar > , proto::divides< big_number_grammar, big_number_grammar > , proto::unary_plus< big_number_grammar > , proto::negate< big_number_grammar > , proto::modulus<big_number_grammar, big_number_grammar> , proto::shift_left<big_number_grammar, big_number_grammar> , proto::shift_right<big_number_grammar, big_number_grammar> > {}; I assume I could replace , proto::shift_right<big_number_grammar, big_number_grammar> with something like: , proto::shift_right<big_number_grammar, integer_terminal> Where integer_terminal is a big list of terminal integer types, but is there any way to use a predicate to say "any type that matches predicate X is a terminal"? Thanks, John.