public override void ToNFA(NFA pad, int from, int to) { pad.AddEdge(from, to, CC.All); }
public override void ToNFA(NFA pad, int from, int to) { int knot = pad.AddNode(); pad.nodes_l[knot].final = true; pad.AddEdge(from, knot, null); }
public override void ToNFA(NFA pad, int from, int to) { for (int i = 0; i < args.Length; i++) { int knot = (i == args.Length - 1) ? to : pad.AddNode(); args[i].ToNFA(pad, from, knot); from = knot; } if (from != to) pad.AddEdge(from, to, null); }
public override void ToNFA(NFA pad, int from, int to) { if (text.Length == 0) { pad.AddEdge(from, to, null); } else { int len = text.Length; for (int c = 0; c < len; c++) { int fromp = (c == len - 1) ? to : pad.AddNode(); pad.AddEdge(from, fromp, new CC(text[c], true)); from = fromp; } } }
public override bool ToNFA(NFA pad, int from, int to) { int knot = pad.AddNode(); pad.SetFinal(knot); pad.AddEdge(from, knot, null); return false; }
public override void ToNFA(NFA pad, int from, int to) { int knot1 = pad.AddNode(); int knot2 = pad.AddNode(); int knot3 = pad.AddNode(); pad.AddEdge(from, knot1, null); z0.ToNFA(pad, knot1, knot2); if (z1 != null) z1.ToNFA(pad, knot2, knot3); else pad.AddEdge(knot2, knot3, null); pad.AddEdge(knot2, to, null); if ((type & 1) != 0) pad.AddEdge(from, to, null); if ((type & 4) != 0) pad.AddEdge(knot3, to, null); if ((type & 2) != 0) pad.AddEdge(knot3, knot1, null); }
public override bool ToNFA(NFA pad, int from, int to) { if (text.Length == 0) { pad.AddEdge(from, to, null); } else { int len = text.Length; for (int c = 0; c < len; c++) { int fromp = (c == len - 1) ? to : pad.AddNode(); pad.AddEdge(from, fromp, (int)text[c]); // XXX supplementaries from = fromp; } } return true; }
public override bool ToNFA(NFA pad, int from, int to) { pad.AddEdge(from, to, CC.All); return true; }
public override bool ToNFA(NFA pad, int from, int to) { for (int i = 0; i < args.Length; i++) { int knot = (i == args.Length - 1) ? to : pad.AddNode(); if (!args[i].ToNFA(pad, from, knot)) return false; from = knot; } if (from != to) pad.AddEdge(from, to, null); return true; }
public override bool ToNFA(NFA pad, int from, int to) { int knot1 = pad.AddNode(); int knot2 = pad.AddNode(); int knot3 = pad.AddNode(); pad.AddEdge(from, knot1, null); z0.ToNFA(pad, knot1, knot2); if (z1 != null) z1.ToNFA(pad, knot2, knot3); else pad.AddEdge(knot2, knot3, null); pad.AddEdge(knot2, to, null); if ((type & 1) != 0) pad.AddEdge(from, to, null); if ((type & 4) != 0) pad.AddEdge(knot3, to, null); if ((type & 2) != 0) pad.AddEdge(knot3, knot1, null); return true; // conservative }
public override void ToNFA(NFA pad, int from, int to) { pad.AddEdge(from, to, null); child.ToNFA(pad, from, to); }
public override void ToNFA(NFA pad, int from, int to) { int knot = pad.AddNode(); pad.AddEdge(from, knot, null); pad.AddEdge(knot, to, null); child.ToNFA(pad, knot, knot); }
public override void ToNFA(NFA pad, int from, int to) { int knot1 = pad.AddNode(); int knot2 = pad.AddNode(); pad.AddEdge(from, knot1, null); pad.AddEdge(knot2, to, null); pad.AddEdge(knot2, knot1, null); child.ToNFA(pad, knot1, knot2); }