예제 #1
0
        public override bool Equals(object obj)
        {
            RuleAlternation a = obj as RuleAlternation;

            if (a == null)
            {
                return(false);
            }

            if (a.Count != this.Count)
            {
                return(false);
            }

            return(a.Zip(this, (x, y) => x.Equals(y)).Aggregate((x, y) => x && y));
        }
예제 #2
0
 public NonTerminal(string name, ConcatenationRule rule = null)
     : base(name)
 {
     Rules = rule;
 }