示例#1
0
        /// <summary>
        /// Runs match starting from <c>set</c> specified against input
        /// sequence starting at <c>index</c> specified; Result of the match
        /// will be stored into matchResult instance;
        /// </summary>
        ///
        private bool RunMatch(AbstractSet set, int index,
                              MatchResultImpl matchResult_0)
        {
            if (set.Matches(index, str0, matchResult_0) >= 0)
            {
                matchResult_0.FinalizeMatch();
                return(true);
            }

            return(false);
        }
示例#2
0
        /// @com.intel.drl.spec_ref
        public bool Find(int startIndex)
        {
            int stringLength = str0.Length;

            if (startIndex < 0 || startIndex > stringLength)
            {
                throw new IndexOutOfRangeException("regex.03" +                 //$NON-NLS-1$
                                                   ((int)(startIndex)).ToString());
            }

            startIndex = FindAt(startIndex);
            if (startIndex >= 0 && matchResult.IsValid())
            {
                matchResult.FinalizeMatch();
                return(true);
            }
            matchResult.startIndex = -1;
            return(false);
        }