const Op * i_lookup(const OpKey & k, int type, const Syntax * p) const { pair<Lookup::const_iterator,Lookup::const_iterator> is = lookup_.equal_range(k); for( ; is.first != is.second; ++is.first) if (is.first->second->type == type) return static_cast<const Op *>(is.first->second); return 0; }
Op::Types i_lookup_types(Op::Types res, const OpKey & k, const Syntax * p) const { pair<Lookup::const_iterator,Lookup::const_iterator> is = lookup_.equal_range(k); for( ; is.first != is.second; ++is.first) { res |= is.first->second->type; } return res; }
const Syntax * i_try_special(const OpKey & k, parts_iterator & i, parts_iterator e) { pair<Lookup::const_iterator,Lookup::const_iterator> is = lookup_.equal_range(k); for( ; is.first != is.second; ++is.first) { if (is.first->second->type == Op::Special) { const SpecialOp * op = static_cast<const SpecialOp *>(is.first->second); const Syntax * res = op->match(i, e); if (res) return res; } } return NULL; }