diff Implab/Automaton/DFATable.cs @ 236:302ca905c19e v2

JsonReader optimizations
author cin
date Tue, 21 Nov 2017 14:57:58 +0300
parents 5f7a3e1d32b9
children fa6cbf4d8841
line wrap: on
line diff
--- a/Implab/Automaton/DFATable.cs	Thu Oct 05 09:24:49 2017 +0300
+++ b/Implab/Automaton/DFATable.cs	Tue Nov 21 14:57:58 2017 +0300
@@ -116,7 +116,7 @@
 
             for (int i = 0; i < StateCount; i++)
                 for (int j = 0; j < AlphabetSize; j++)
-                    table[i, j] = AutomatonConst.UNREACHABLE_STATE;
+                    table[i, j] = AutomatonConst.UnreachableState;
 
             foreach (var t in this)
                 table[t.s1,t.edge] = (byte)t.s2;
@@ -290,11 +290,11 @@
 
             var nextCls = 0;
             foreach (var item in minClasses) {
-                if (nextCls == AutomatonConst.UNCLASSIFIED_INPUT)
+                if (nextCls == AutomatonConst.UnclassifiedInput)
                     nextCls++;
 
                 // сохраняем DFAConst.UNCLASSIFIED_INPUT
-                var cls = item.Contains(AutomatonConst.UNCLASSIFIED_INPUT) ? AutomatonConst.UNCLASSIFIED_INPUT : nextCls++;
+                var cls = item.Contains(AutomatonConst.UnclassifiedInput) ? AutomatonConst.UnclassifiedInput : nextCls++;
                 optimalDFA.AddSymbol(cls);
 
                 foreach (var a in item)
@@ -326,7 +326,7 @@
                 data.Add(String.Format(
                     "{0} -> {2} [label={1}];",
                     String.Join("", stateAlphabet.GetSymbols(t.s1)),
-                    ToLiteral(ToLiteral(String.Join("", t.edge == AutomatonConst.UNCLASSIFIED_INPUT ? new [] { "@" } : inputAlphabet.GetSymbols(t.edge).Select(x => x.ToString())))),
+                    ToLiteral(ToLiteral(String.Join("", t.edge == AutomatonConst.UnclassifiedInput ? new [] { "@" } : inputAlphabet.GetSymbols(t.edge).Select(x => x.ToString())))),
                     String.Join("", stateAlphabet.GetSymbols(t.s2))
                 ));
             data.Add("}");