Exemplo n.º 1
0
 public override IReadOnlyCollection <IState> InnerEpsilonTransitions(StateWithBit state)
 {
     if (state.FromRight)
     {
         if (this.Right.IsAccepting(state.InternalState))
         {
             return(new List <IState>()
             {
                 this.Accept
             });
         }
         else
         {
             return(this.Right.EpsilonTransitions(state.InternalState).Select(GetStateWrapper(true)).ToList());
         }
     }
     else
     {
         if (this.Left.IsAccepting(state.InternalState))
         {
             return(new List <IState>()
             {
                 this.Accept
             });
         }
         else
         {
             return(this.Left.EpsilonTransitions(state.InternalState).Select(GetStateWrapper(false)).ToList());
         }
     }
 }
Exemplo n.º 2
0
 public override IReadOnlyCollection <IState> InnerEpsilonTransitions(StateWithBit state)
 {
     if (this.Inner.IsAccepting(state.InternalState))
     {
         return(new List <IState>()
         {
             this.Accept, new StateWithBit(false, this.Inner.StartingState())
         });
     }
     else
     {
         return(this.Inner.EpsilonTransitions(state.InternalState).Select(GetStateWrapper(false)).ToList());
     }
 }
Exemplo n.º 3
0
 public virtual IReadOnlyDictionary <Symbol, IReadOnlyCollection <IState> > InnerTransitions(StateWithBit state)
 {
     return(new Dictionary <Symbol, IReadOnlyCollection <IState> >());
 }
Exemplo n.º 4
0
            public override IReadOnlyDictionary <Symbol, IReadOnlyCollection <IState> > InnerTransitions(StateWithBit state)
            {
                var transitions = state.FromRight ? this.Right.Transitions(state.InternalState) : this.Left.Transitions(state.InternalState);

                return(MapDictionary(transitions, GetStateWrapper(state.FromRight)));
            }
Exemplo n.º 5
0
 public override IReadOnlyDictionary <Symbol, IReadOnlyCollection <IState> > InnerTransitions(StateWithBit state)
 {
     return(MapDictionary(this.Inner.Transitions(state.InternalState), GetStateWrapper(false)));
 }
Exemplo n.º 6
0
 public virtual IReadOnlyCollection <IState> InnerEpsilonTransitions(StateWithBit state)
 {
     return(new List <IState>());
 }