protected DTDItem ParseCp() { Token token = Scanner.Get(); DTDItem item; if (token.Type == Scanner.IDENTIFIER) { item = new DTDName(token.Value); } else if (token.Type == Scanner.LPAREN) { item = ParseChoiceSequence(); } else { throw new DTDParseException(Scanner.GetUriId(), "Found invalid token in sequence: " + token.Type.Name, Scanner.GetLineNumber(), Scanner.GetColumn()); } item.Cardinal = ParseCardinality(); return(item); }
public override bool Equals(object ob) { if (ob == this) { return(true); } if (!(ob is DTDName)) { return(false); } if (!base.Equals(ob)) { return(false); } DTDName other = (DTDName)ob; if (Value == null) { if (other.Value != null) { return(false); } } else { if (!Value.Equals(other.Value)) { return(false); } } return(true); }