diff Implab/JSON/JSONParser.cs @ 140:f973c5df9972 v2

fixes
author cin
date Fri, 20 Feb 2015 15:58:34 +0300
parents 0349189d2564
children 97fbbf816844
line wrap: on
line diff
--- a/Implab/JSON/JSONParser.cs	Wed Feb 18 18:02:02 2015 +0300
+++ b/Implab/JSON/JSONParser.cs	Fri Feb 20 15:58:34 2015 +0300
@@ -46,10 +46,11 @@
         static readonly DFAStateDescriptior[] _arrayDFA;
 
         static JSONParser() {
-            var jsonExpression = Token.New(JsonTokenType.BeginObject, JsonTokenType.BeginArray).Tag(0);
+
 
             var valueExpression = Token.New(JsonTokenType.BeginArray, JsonTokenType.BeginObject, JsonTokenType.Literal, JsonTokenType.Number, JsonTokenType.String);
             var memberExpression = Token.New(JsonTokenType.String).Cat(Token.New(JsonTokenType.NameSeparator)).Cat(valueExpression);
+
             var objectExpression = memberExpression
                 .Cat(
                     Token.New(JsonTokenType.ValueSeparator)
@@ -69,6 +70,8 @@
                 .Cat(Token.New(JsonTokenType.EndArray))
                 .Tag(0);
 
+            var jsonExpression = valueExpression.Tag(0);
+
             _jsonDFA = BuildDFA(jsonExpression).States;
             _objectDFA = BuildDFA(objectExpression).States;
             _arrayDFA = BuildDFA(arrayExpression).States;