예제 #1
0
        public static void Parse(Stream stream, Encoding encoding, IJmesPathGenerator generator)
        {
            var scanner = new JmesPathScanner(stream, encoding.CodePage.ToString());

            scanner.InitializeLookaheadQueue();

            var analyzer = new JmesPathParser(scanner, generator);

            if (!analyzer.Parse())
            {
                System.Diagnostics.Debug.Assert(false);
                throw new Exception("Error: syntax.");
            }
        }
예제 #2
0
 public JmesPathParser(AbstractScanner <ValueType, LexLocation> scanner,
                       IJmesPathGenerator generator)
     : base(scanner)
 {
     generator_ = generator;
 }