void Step(State from, Node p, BitArray stepped) { if (p == null) { return; } stepped[p.n] = true; switch (p.typ) { case Node.clas: case Node.chr: { NewTransition(from, TheState(p.next), p.typ, p.val, p.code); break; } case Node.alt: { Step(from, p.sub, stepped); Step(from, p.down, stepped); break; } case Node.iter: { if (Tab.DelSubGraph(p.sub)) { parser.SemErr("contents of {...} must not be deletable"); return; } if (p.next != null && !stepped[p.next.n]) { Step(from, p.next, stepped); } Step(from, p.sub, stepped); if (p.state != from) { Step(p.state, p, new BitArray(tab.nodes.Count)); } break; } case Node.opt: { if (p.next != null && !stepped[p.next.n]) { Step(from, p.next, stepped); } Step(from, p.sub, stepped); break; } } }