/* Create a visitor that applies its argument v in topdown * fashion until it fails, and subsequently applies its argument * vFinally at the nodes where failure occurs. */ public TopDownWhile(IVisitor v, IVisitor vFinally) : base(null, vFinally) { first = new Sequence(v, new All(this)); }
public DownUp(IVisitor down, IVisitor stop, IVisitor up) : base(down, null) { then = new Sequence(new Choice(stop,new All(this)), up); }
/* Create a visitor that applies its argument v in topdown * fashion until it fails. Thus, traversal is cut off below * the nodes where v fails. */ public TopDownWhile(IVisitor v) : base(null, new Identity()) { first = new Sequence(v, new All(this)); }
public DownUp(IVisitor down, IVisitor up) : base(down, null) { then = new Sequence(new All(this), up); }