bool symbol_exist(std::string name) { if (symbols.count(name) == 0) { cout << "ERROR: no such symbol " << name << endl; return false; } return true; }
bool load_symbol_or_int(std::string arg, Int& num) { if (symbols.count(arg)) { num = symbols[arg]; } else { if (!num.parse(arg)) { cout << "ERROR: parse failed " << arg << endl; return false; } } return true; }