예제 #1
0
 // 仅仅匹配产生式右部和项目索引
 public bool IsConcentric(BuildingProduction another)
 {
     return(Comparation.EqualsWithOrder(Elems, another.Elems) && another.Index == Index);
 }
예제 #2
0
 // 匹配产生式的左部、右部、索引、展望符,且另一个的展望符集要包含于自身的展望符集
 public bool IsCompatible(BuildingProduction another)
 {
     return(Comparation.EqualsWithOrder(Elems, another.Elems) &&
            another.Index == Index &&
            Comparation.IncludesAll(LookAheads, another.LookAheads));
 }
예제 #3
0
 // 匹配产生式左部、右部、索引、展望符
 public bool Equals(BuildingProduction another)
 {
     return(another.Prod == Prod &&
            another.Index == Index &&
            Comparation.EqualsWithoutOrder(another.LookAheads, LookAheads));
 }