예제 #1
0
파일: RegExpDfa.cs 프로젝트: Daoting/dt
        RegExpDfaWave GetInitialStates()
        {
            RegExpDfaWave wave = new RegExpDfaWave(this._finalState);

            wave.AddStateWithEmptyTransitionsTargets(this._initialState);
            return(wave);
        }
예제 #2
0
파일: RegExpDfaWave.cs 프로젝트: Daoting/dt
        /// <summary>
        ///
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public RegExpDfaWave GetNextWave(char input)
        {
            RegExpDfaWave wave = new RegExpDfaWave(this._finalState);

            foreach (RegExpState state in this)
            {
                foreach (Transition transition in state.Transitions)
                {
                    if (transition.IsMatch(input))
                    {
                        wave.AddStateWithEmptyTransitionsTargets(transition.Target);
                    }
                }
            }
            return(wave);
        }