Exemple #1
0
        private JsonValue Parse(string text)
        {
            var grammar = new JsonGrammar();
            var parser  = new Parser <JsonValue>(grammar);
            var lexer   = new JsonLexer(text);

            return(parser.Parse(new TokenStream(lexer).Start()));
        }
        private JsonValue Parse(TextReader reader)
        {
            var grammar = new JsonGrammar();
            var parser  = new Parser <JsonValue>(grammar);
            var lexer   = new JsonLexer(reader);

            return(parser.Parse(new TokenStream(lexer).Start()));
        }