internal override GrammarBuilderBase Clone()
        {
            SemanticKeyElement semanticKeyElement = new SemanticKeyElement(_semanticKey);

            semanticKeyElement._ruleRef.CloneItems(_ruleRef);
            return(semanticKeyElement);
        }
        public override bool Equals(object obj)
        {
            SemanticKeyElement semanticKeyElement = obj as SemanticKeyElement;

            if (semanticKeyElement == null)
            {
                return(false);
            }
            if (!base.Equals(obj))
            {
                return(false);
            }
            return(_semanticKey == semanticKeyElement._semanticKey);
        }
        public override bool Equals(object obj)
        {
            SemanticKeyElement refObj = obj as SemanticKeyElement;

            if (refObj == null)
            {
                return(false);
            }
            if (!base.Equals(obj))
            {
                return(false);
            }
            // No need to check for the equality on _ruleRef. The children are in the Items, not the underlying rule
            return(_semanticKey == refObj._semanticKey);
        }