@Override
  public boolean equals(Object o) {
    if (!(o instanceof GrammarState))
      return false;
    GrammarState s = (GrammarState)o;
    return destinations.equals(s.destinations) &&
            name.equals(s.name) &&
            defaultDestination == s.defaultDestination;
  }