FormeleMethode/Program.cs
/// <summary>
/// Creates the example thompson construction.
/// </summary>
Creates the example thompson construction.
Creates the example thompson construction .
public static void CreateExampleThompsonConstruction()
		{
			string regex1 = "(aa)*(aa)+";
			RegExpression expression1 = new RegExpression(regex1);
			Automata<string> ndfa1 = ThompsonConstruction.RegExpToNDFA(expression1);
			ndfa1.GenerateGraphFile("ThompsonNDFA1");
			FileDotEngine.Run(@".\..\..\graphviz\dotfiles\ThompsonNDFA1", "ThompsonNDFA1Pic");
			string regex2 = "a(a|b)*";
			RegExpression expression2 = new RegExpression(regex2);
			Automata<string> ndfa2 = ThompsonConstruction.RegExpToNDFA(expression2);
			ndfa2.GenerateGraphFile("ThompsonNDFA2");
			FileDotEngine.Run(@".\..\..\graphviz\dotfiles\ThompsonNDFA2", "ThompsonNDFA2Pic");
			string regex3 = "a*(aa+|(ba))* (abba|baab|bbbb)+";
			RegExpression expression3 = new RegExpression(regex3);
			Automata<string> ndfa3 = ThompsonConstruction.RegExpToNDFA(expression3);
			ndfa3.GenerateGraphFile("ThompsonNDFA3");
			FileDotEngine.Run(@".\..\..\graphviz\dotfiles\ThompsonNDFA3", "ThompsonNDFA3Pic");
		}
public static void CreateExampleThompsonConstruction ( ) { string regex1 = " " ; RegExpression expression1 = new RegExpression ( regex1 ) ; Automata < string > ndfa1 = ThompsonConstruction . RegExpToNDFA ( expression1 ) ; ndfa1 . GenerateGraphFile ( " " ) ; FileDotEngine . Run ( @".\..\..\graphviz\dotfiles\ThompsonNDFA1" , " " ) ; string regex2 = " " ; RegExpression expression2 = new RegExpression ( regex2 ) ; Automata < string > ndfa2 = ThompsonConstruction . RegExpToNDFA ( expression2 ) ; ndfa2 . GenerateGraphFile ( " " ) ; FileDotEngine . Run ( @".\..\..\graphviz\dotfiles\ThompsonNDFA2" , " " ) ; string regex3 = " " ; RegExpression expression3 = new RegExpression ( regex3 ) ; Automata < string > ndfa3 = ThompsonConstruction . RegExpToNDFA ( expression3 ) ; ndfa3 . GenerateGraphFile ( " " ) ; FileDotEngine . Run ( @".\..\..\graphviz\dotfiles\ThompsonNDFA3" , " " ) ; }
Creates the example thompson construction.
Creates the example thompson construction .
// regex : (aa)*(aa)+ //// regex : a(a|b)* // regex : a*(aa+|(ba))* (abba|baab|bbbb)+