diff Implab/Formats/JSON/JSONGrammar.cs @ 183:4f82e0f161c3 ref20160224

fixed DFA optimization, JSON is fully functional
author cin
date Fri, 25 Mar 2016 02:49:02 +0300
parents 76e8f2ba12b8
children
line wrap: on
line diff
--- a/Implab/Formats/JSON/JSONGrammar.cs	Thu Mar 24 18:52:10 2016 +0300
+++ b/Implab/Formats/JSON/JSONGrammar.cs	Fri Mar 25 02:49:02 2016 +0300
@@ -17,6 +17,7 @@
             Literal,
             NameSeparator,
             ValueSeparator,
+            Whitespace,
 
             StringBound,
             EscapedChar,
@@ -73,7 +74,8 @@
                 .Or(beginArray.Tag(TokenType.BeginArray))
                 .Or(endArray.Tag(TokenType.EndArray))
                 .Or(nameSep.Tag(TokenType.NameSeparator))
-                .Or(valueSep.Tag(TokenType.ValueSeparator));
+                .Or(valueSep.Tag(TokenType.ValueSeparator))
+                .Or(SymbolSetToken('\n', '\r', '\t', ' ').Closure().Tag(TokenType.Whitespace));
 
 
             var jsonStringExpression =