Exemplo n.º 1
0
 /* 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));
 }
Exemplo n.º 2
0
 public DownUp(IVisitor down, IVisitor stop, IVisitor up)
     : base(down, null)
 {
     then = new Sequence(new Choice(stop,new All(this)), up);
 }
Exemplo n.º 3
0
 /* 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));
 }
Exemplo n.º 4
0
 public DownUp(IVisitor down, IVisitor up)
     : base(down, null)
 {
     then = new Sequence(new All(this), up);
 }