Exemplo n.º 1
0
        public void AnyCharSequenceTest(string input, bool expected)
        {
            string pattern = "^a.c$";
            var    target  = NFA.Sequence(NFA.Character('a'), NFA.AnyCharacter(), NFA.Character('c'));

            Test(input, expected, target, pattern);
        }
Exemplo n.º 2
0
        public void AnyCharSequenceRepeatedTest(string input, bool expected)
        {
            string pattern = "^A.+C$";
            var    target  = NFA.Sequence(NFA.Character('A'), NFA.OneOrMany(NFA.AnyCharacter()), NFA.Character('C'));

            Test(input, expected, target, pattern);
        }
Exemplo n.º 3
0
        public void AnyCharTest(string input, bool expected)
        {
            string pattern = "^.$";
            var    target  = NFA.AnyCharacter();

            Test(input, expected, target, pattern);
        }
 public void Visit(AnyChar target)
 {
     stack.Push(NFA.AnyCharacter());
 }