24 for(
const auto &line : lines)
31 auto space_pos = line.find(
' ', 8);
32 if(space_pos == std::string::npos)
35 auto id = line.substr(8, space_pos - 8);
36 auto value = line.substr(space_pos + 1, std::string::npos);
37 map[id].value = value;
44 std::istringstream in(src);
49 std::ostringstream out;
54 auto m_it =
map.find(t.text);
57 out << m_it->second.value;
67 auto result = out.str();
std::string operator()(const std::string &) const
void parse(const std::string &)
std::vector< ctokent > get_tokens()
bool has_prefix(const std::string &s, const std::string &prefix)
static bool is_identifier(int token)
void split_string(const std::string &s, char delim, std::vector< std::string > &result, bool strip, bool remove_empty)