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); }
void IFiniteAutomaton <char> .MakeTransition(char symbol) { currentState = currentState[symbol] ?? startState; }
public StringMatchFiniteAutomaton(StringMatchAutomatonState startState, StringMatchAutomatonState acceptingState) { this.startState = startState; this.currentState = startState; this.acceptingState = acceptingState; }