bool token::operator == (const token& rhs) const { if (this == &rhs) return true; if (valid() && rhs.valid()) return to_string() == rhs.to_string(); else return false; }
bool token::operator < (const token& rhs) const { if (!valid() && rhs.valid()) return true; if (valid() && !rhs.valid()) return false; if (!valid() && !rhs.valid()) return false; return to_string() < rhs.to_string(); }