Mercurial > pub > ImplabNet
diff Implab/Automaton/RegularExpressions/RegularDFABuilder.cs @ 164:ec35731ae299 ref20160224
Almost complete DFA refactoring
author | cin |
---|---|
date | Thu, 25 Feb 2016 02:11:13 +0300 |
parents | 419aa51b04fd |
children | e227e78d72e4 |
line wrap: on
line diff
--- a/Implab/Automaton/RegularExpressions/RegularDFABuilder.cs Wed Feb 24 20:12:52 2016 +0300 +++ b/Implab/Automaton/RegularExpressions/RegularDFABuilder.cs Thu Feb 25 02:11:13 2016 +0300 @@ -122,7 +122,7 @@ m_ends.Add(m_idx, token.Tag); } - public void BuildDFA(IDFADefinitionBuilder<TTag> dfa) { + public void BuildDFA(IDFATransitionTableBuilder<TTag> dfa) { Safe.ArgumentNotNull(dfa,"dfa"); var states = new MapAlphabet<HashSet<int>>(new CustomEqualityComparer<HashSet<int>>( @@ -131,7 +131,8 @@ )); var initialState = states.DefineSymbol(m_firstpos); - + dfa.SetInitialState(initialState); + var tags = GetStateTags(m_firstpos); if (tags != null && tags.Length > 0) dfa.MarkFinalState(initialState, tags);