Exemple #1
0
        public State CreateInitialState(Automaton nfa, Automaton dfa)
        {
            /** get closure of initial state from nfa. */
            var initialStates  = nfa.StartStates;
            var initialClosure = ClosureTaker.GetClosure(initialStates, nfa);
            var state          = AddHashSetState(dfa, initialClosure);

            dfa.AddStartState(state);
            return(state);
        }
Exemple #2
0
 public ThompsonsConstruction()
 {
     _nfa         = new Automaton();
     _start_state = new State(_nfa);
     _nfa.AddStartState(_start_state);
 }