예제 #1
0
        private static JsonValue ParseANTLRStream(ANTLRStringStream inputStream)
        {
            var lexer     = new JsonLexer(inputStream);
            var tokens    = new CommonTokenStream(lexer);
            var parser    = new JsonParser(tokens);
            var parseTree = parser.value().Tree;
            var stream    = new CommonTreeNodeStream(parseTree);
            var tree      = new JsonTree(stream);

            var @object = tree.value();

            Contract.Assume(@object != null);
            return(JsonValueTypes.Interpret(@object));
        }
      private static JsonValue ParseANTLRStream(ANTLRStringStream inputStream)
      {
         var lexer = new JsonLexer(inputStream);
         var tokens = new CommonTokenStream(lexer);
         var parser = new JsonParser(tokens);
         var parseTree = parser.value().Tree;
         var stream = new CommonTreeNodeStream(parseTree);
         var tree = new JsonTree(stream);

         var @object = tree.value();
         Contract.Assume(@object != null);
         return JsonValueTypes.Interpret(@object);
      }