Пример #1
0
            public void ConsumeAny()
            {
                var p = new SimpleParser("abc.def ghi");

                p.ConsumeAny('a', 'b', 'c', 'd', 'e', 'f');
                Assert.AreEqual('.', p.NextChar.Value);
                p.Skip(1);
                p.ConsumeAny('a', 'b', 'c', 'd', 'e', 'f');
                Assert.AreEqual(' ', p.NextChar.Value);
                p.Skip(1);
                p.ConsumeAny('a', 'b', 'c', 'd', 'e', 'f');
                Assert.AreEqual(true, p.NextIs('g'));
            }