public static void MainTest(string[] args) { string regexp = "(" + args[0] + ")"; string txt = args[1]; NFA nfa = new NFA(regexp); Console.WriteLine(nfa.Recognizes(txt)); }
public static void MainTest(string[] args) { TextInput StdIn = new TextInput(); string regexp = "(.*" + args[0] + ".*)"; NFA nfa = new NFA(regexp); while (StdIn.HasNextLine()) { string line = StdIn.ReadLine(); if (nfa.Recognizes(line)) { Console.WriteLine(line); } } }