diff Implab/Automaton/RegularExpressions/RegularDFA.cs @ 181:b2b6a6640aa3 ref20160224

minor fixes and debug
author cin
date Thu, 24 Mar 2016 03:54:46 +0300
parents c32688129f14
children 76e8f2ba12b8
line wrap: on
line diff
--- a/Implab/Automaton/RegularExpressions/RegularDFA.cs	Thu Mar 24 02:30:46 2016 +0300
+++ b/Implab/Automaton/RegularExpressions/RegularDFA.cs	Thu Mar 24 03:54:46 2016 +0300
@@ -63,7 +63,8 @@
                 dfa.SetStateTag(g.Key, g.SelectMany(x => x).ToArray());
 
             // make the alphabet for the new DFA
-            foreach (var pair in alphaMap)
+            // skip all unclassified symbols
+            foreach (var pair in alphaMap.Where(x => x.Value != 0))
                 alphabet.DefineClass(m_alphabet.GetSymbols(pair.Key), pair.Value);
             
             return dfa;