Ejemplo n.º 1
0
        public bool IsEpsilonAdPosition()
        {
            bool result = UpRule.Equals(MorphemeRule.Epsilon) &&
                          !RightRule.Equals(MorphemeRule.Nothing) &&
                          !LeftRule.Equals(MorphemeRule.Nothing) &&
                          !RightRule.MorphRule.Evaluate(null) && !RightRule.MorphRule.Evaluate("") && !RightRule.AttributesRule.Evaluate(0) &&
                          !LeftRule.MorphRule.Evaluate(null) && !LeftRule.MorphRule.Evaluate("") && !LeftRule.AttributesRule.Evaluate(0);

            return(result);
        }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 486187739;

            hash = (hash * 16777619) ^ UpRule.GetHashCode();
            hash = (hash * 16777619) ^ LeftRule.GetHashCode();
            hash = (hash * 16777619) ^ RightRule.GetHashCode();
            hash = (hash * 16777619) ^ ValencyPosition.GetHashCode();

            return(hash);
        }
Ejemplo n.º 3
0
 public bool Equals(Pattern other) =>
 UpRule.Equals(other.UpRule) &&
 LeftRule.Equals(other.LeftRule) &&
 RightRule.Equals(other.RightRule) &&
 ValencyPosition == other.ValencyPosition;
Ejemplo n.º 4
0
 public Pattern SetSubstitutionForRight(IRule <GrammarCharacter> inheritanceRule)
 {
     RightRule.SetSubstitution(inheritanceRule);
     return(this);
 }