//
// Generated by JTB 1.2.1
//

package jde.parser.syntaxtree;

/**
 * Represents a grammar choice, e.g. ( A | B )
 */
public class NodeChoice implements Node {
   public NodeChoice(Node node) {
      this(node, -1);
   }

   public NodeChoice(Node node, int whichChoice) {
      choice = node;
      choice.setParent(this);
      which = whichChoice;
   }

   public void accept(jde.parser.visitor.Visitor v) {
      choice.accept(v);
   }
   public Object accept(jde.parser.visitor.ObjectVisitor v, Object argu) {
      return choice.accept(v,argu);
   }

   public void setParent(Node n) { parent = n; }
   public Node getParent()       { return parent; }

   private Node parent;
   public Node choice;
   public int which;
}

