Example #1
0
//		public Disjunct SubsequenceX(int startIndex, int length)
//		{
//			//If the 1st core character is included then also include Left
//			//If the last core character is included then also include Right
//			//Extra restrictions = Must have length > 0, must include 1st or last character, but not both
//			SpecialFunctions.CheckCondition(0 <= startIndex && startIndex < Core.Length); //!!!raise error
//			string expression = Full.Substring((int) startIndex, (int) length);
//			Disjunct disjunct = Disjunct.GetInstance(expression, PatchRegexFactory);
//			return disjunct;
//		}

        public Disjunct Left(int length)
        {
            SpecialFunctions.CheckCondition(length > 0);             //!!!raise error
            AASetSequence expression = FullAsAASetSequence.Subsequence(0, Before.Count + (int)length);
            Disjunct      disjunct   = Disjunct.GetInstance(expression.ToString(), PatchRegexFactory);

            return(disjunct);
        }