diff Implab/Formats/Grammar.cs @ 236:302ca905c19e v2

JsonReader optimizations
author cin
date Tue, 21 Nov 2017 14:57:58 +0300
parents 6fa235c5a760
children
line wrap: on
line diff
--- a/Implab/Formats/Grammar.cs	Thu Oct 05 09:24:49 2017 +0300
+++ b/Implab/Formats/Grammar.cs	Tue Nov 21 14:57:58 2017 +0300
@@ -16,7 +16,7 @@
         }
 
         protected SymbolToken UnclassifiedToken() {
-            return new SymbolToken(AutomatonConst.UNCLASSIFIED_INPUT);
+            return new SymbolToken(AutomatonConst.UnclassifiedInput);
         }
 
         protected void DefineAlphabet(IEnumerable<TSymbol> alphabet) {
@@ -42,7 +42,7 @@
 
         int TranslateOrAdd(TSymbol ch) {
             var t = AlphabetBuilder.Translate(ch);
-            if (t == AutomatonConst.UNCLASSIFIED_INPUT)
+            if (t == AutomatonConst.UnclassifiedInput)
                 t = AlphabetBuilder.DefineSymbol(ch);
             return t;
         }
@@ -53,7 +53,7 @@
 
         int TranslateOrDie(TSymbol ch) {
             var t = AlphabetBuilder.Translate(ch);
-            if (t == AutomatonConst.UNCLASSIFIED_INPUT)
+            if (t == AutomatonConst.UnclassifiedInput)
                     throw new ApplicationException(String.Format("Symbol '{0}' is UNCLASSIFIED", ch));
             return t;
         }