示例#1
0
文件: parse_op.cpp 项目: 8l/zl
 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;
 }
示例#2
0
文件: parse_op.cpp 项目: 8l/zl
 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;
 }
示例#3
0
文件: parse_op.cpp 项目: 8l/zl
 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;
 }