示例#1
0
        public static void BuildAndShow(string fileprefix, RegexBase r)
        {
            var nfa = r.MkNfa(new Nfa.NameSource());

            Console.WriteLine(nfa);
            Console.WriteLine("Writing NFA graph to file");
            nfa.WriteDot(fileprefix + "nfa.dot");
            Console.WriteLine("---");
            var dfa = nfa.ToDfa();

            Console.WriteLine(dfa);
            Console.WriteLine("Writing DFA graph to file");
            dfa.WriteDot(fileprefix + "dfa.dot");
            Console.WriteLine();
        }
示例#2
0
 public Alt(RegexBase r1, RegexBase r2)
 {
     _r1 = r1;
     _r2 = r2;
 }
示例#3
0
 public Star(RegexBase r)
 {
     _r = r;
 }
示例#4
0
 public Seq(RegexBase r1, RegexBase r2)
 {
     _r1 = r1;
     _r2 = r2;
 }