diff Implab/Automaton/RegularExpressions/RegularDFABuilder.cs @ 170:181119ef3b39 ref20160224

DFA refactoring, rx based dfa.
author cin
date Fri, 04 Mar 2016 01:56:31 +0300
parents e227e78d72e4
children
line wrap: on
line diff
--- a/Implab/Automaton/RegularExpressions/RegularDFABuilder.cs	Thu Mar 03 08:41:02 2016 +0300
+++ b/Implab/Automaton/RegularExpressions/RegularDFABuilder.cs	Fri Mar 04 01:56:31 2016 +0300
@@ -122,7 +122,7 @@
             m_ends.Add(m_idx, token.Tag);
         }
 
-        public void BuildDFA(IDFATableBuilder<TTag> dfa) {
+        public void BuildDFA(IDFATableBuilder dfa) {
             Safe.ArgumentNotNull(dfa,"dfa");
 
             var states = new MapAlphabet<HashSet<int>>(new CustomEqualityComparer<HashSet<int>>(
@@ -165,7 +165,7 @@
                             
                             queue.Enqueue(next);
                         }
-                        dfa.DefineTransition(s1, s2, a);
+                        dfa.Add(new AutomatonTransition(s1, s2, a));
                     }
                 }
             }