public Graph Create <TValue>(IFSA <TValue> fsa) { var graph = new Graph(fsa.Name); FillGraph(graph, fsa); return(graph); }
private void DrawGraphCmdFsa(IFSA <char> fsa) { var graph = _graphCreator.Create(fsa); cmdFsaGraph.Graph = graph; cmdFsaGraph.Refresh(); }
private void DrawGraphFastFsa(IFSA <char> fsm) { var graph = _graphCreator.Create(fsm); fastFsaGraph.Graph = graph; fastFsaGraph.Refresh(); }
private static void FillGraph <TValue>(Graph graph, IFSA <TValue> fsa) { foreach (var look in fsa.Transitions.ToLookup(x => x.BeginState, x => x)) { int i = 1; foreach (var t in look) { Edge edge = graph.AddEdge("q" + t.BeginState, string.Format("[{0}]{1}", i++, t.Condition), "q" + t.EndState); if (fsa.IsFinal(t.EndState)) { edge.TargetNode.Attr.Fillcolor = Color.Gray; edge.TargetNode.Attr.Shape = Shape.DoubleCircle; } } } }
private void DrawGraphCmdFsa(IFSA<char> fsa) { var graph = _graphCreator.Create(fsa); cmdFsaGraph.Graph = graph; cmdFsaGraph.Refresh(); }
private void DrawGraphFastFsa(IFSA<char> fsm) { var graph = _graphCreator.Create(fsm); fastFsaGraph.Graph = graph; fastFsaGraph.Refresh(); }
public FiniteAutomaton(IFSA <TValue> fastFsa, IFSA <TValue> cmdFsa) { FastFsa = fastFsa.ThrowIfNull(); CmdFsa = cmdFsa.ThrowIfNull(); }
internal ORegex(IFSA <TValue> finiteAutomaton, ORegexOptions options) { _fa = finiteAutomaton.ThrowIfNull(); Options = options; Pattern = "#Internal pattern are not available by default."; }
public ORegex(string pattern, ORegexOptions options, PredicateTable <TValue> table) { _fa = Compiler.Build(pattern, table, options); Options = options; Pattern = pattern; }