Esempio n. 1
0
        /// <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));
        }
Esempio n. 2
0
 public Boolean ContainsTransition(String fromState, String input, String toState)
 {
     return(Transitions.Exists(
                x => x.From.Name == fromState &&
                x.Input == input &&
                x.To.Name == toState
                ));
 }
Esempio n. 3
0
 public bool isEpsilonExist()
 {
     if (Transitions.Exists(x => x.Token == 'ε'))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }