void SymbolTable::insert(Symbol * sym) { if ( sym->type == 'T' || sym->type == 't' || sym->type == 'W' || sym->type == 'w' ) this->symbols.push_back(sym); this->names.insert(name_pair(sym->name, sym)); }
void add_calc_trans(environment const & env, name const & trans) { buffer<expr> arg_types; expr r_type = extract_arg_types(env, trans, arg_types); unsigned nargs = arg_types.size(); if (nargs < 5) throw exception("invalid calc transitivity rule, it must have at least 5 arguments"); name const & rop = get_fn_const(r_type, "invalid calc transitivity rule, result type must be an operator application"); name const & op1 = get_fn_const(arg_types[nargs-2], "invalid calc transitivity rule, penultimate argument must be an operator application"); name const & op2 = get_fn_const(arg_types[nargs-1], "invalid calc transitivity rule, last argument must be an operator application"); m_trans_table.insert(name_pair(op1, op2), std::make_tuple(trans, rop, nargs)); }
void SymbolTable::insert(Symbol * sym) { if ( ! std::strcmp(sym->name, "_stext") ) this->text_start = sym->address; else if ( ! std::strcmp(sym->name, "_etext") ) this->text_end = sym->address; else if ( ! std::strcmp(sym->name, "_sinittext") ) this->init_start = sym->address; else if ( ! std::strcmp(sym->name, "_einittext") ) this->init_end = sym->address; else if ( ! std::strcmp(sym->name, "hypercall_page") ) this->hypercall_page = sym->address; if ( sym->type == 'T' || sym->type == 't' || sym->type == 'W' || sym->type == 'w' ) this->symbols.push_back(sym); this->names.insert(name_pair(sym->name, sym)); }
void json_object () { match('{');name_pair(); match('}'); }