Esempio n. 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()));
        }
Esempio n. 2
0
        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()));
        }