示例#1
0
        private AASet FlankingAndCoreUnifyOrEmpty(AASet flanking, AASet core)
        {
            if (flanking == AASet.OptionalAny)
            {
                return(core);
            }
            Debug.Assert(AASetSequence.IsOptional(flanking));             // real assert
            AASet chUnifyOrEmpty = AASetSequence.UnifyOrEmpty(AASetSequence.ToRequired(flanking), core);

            return(chUnifyOrEmpty);
        }
示例#2
0
 private bool CoreUnificationAtPosition(Disjunct other, int possiblePos, ref AASetSequence aAASetSequence)
 {
     for (int iThisPos = 0; iThisPos < Core.Count; ++iThisPos)
     {
         AASet chThis         = Core[iThisPos];
         int   iOtherPos      = possiblePos + iThisPos;
         AASet chOther        = other.Core[iOtherPos];
         AASet chUnifyOrEmpty = AASetSequence.UnifyOrEmpty(chThis, chOther);
         if (chUnifyOrEmpty == AASet.Empty)                 //!!!const
         {
             return(false);
         }
         aAASetSequence.Append(chUnifyOrEmpty);
     }
     return(true);
 }