Example #1
0
        public static IFiniteAutomaton <T> AssertTransition <T>(this IFiniteAutomaton <T> @this, T symbol, int stateID)
        {
            IFiniteAutomatonState <T> state = @this.State[symbol];

            Assert.IsNotNull(state);
            Assert.AreEqual(state.ID, stateID);
            return(@this);
        }
Example #2
0
 void IFiniteAutomaton <char> .MakeTransition(char symbol)
 {
     currentState = currentState[symbol] ?? startState;
 }
Example #3
0
 public StringMatchFiniteAutomaton(StringMatchAutomatonState startState, StringMatchAutomatonState acceptingState)
 {
     this.startState     = startState;
     this.currentState   = startState;
     this.acceptingState = acceptingState;
 }