/// <summary> /// Adds a transition between this and the state with the inputted state ID. /// </summary> /// <param name="destinationStateID">The ID of the state we will transition to.</param> public void AddTransition(uint destinationStateID) { Debug.Assert(destinationStateID != StateID); Debug.Assert(!Transitions.Exists(x => x.DestinationState == destinationStateID)); Transitions.Add(new Transition(destinationStateID)); }
public Boolean ContainsTransition(String fromState, String input, String toState) { return(Transitions.Exists( x => x.From.Name == fromState && x.Input == input && x.To.Name == toState )); }
public bool isEpsilonExist() { if (Transitions.Exists(x => x.Token == 'ε')) { return(true); } else { return(false); } }