public override bool Equals(Object o) { if (this == o) { return true; } if ((o == null) || !(o is Token)) { return false; } Token other = (Token)o; return ((other.type == type) && (other.text.Equals(text))); }