All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.mind.adl.jtb.syntaxtree.NodeOptional Maven / Gradle / Ivy

There is a newer version: 2.0
Show newest version
//
// Generated by JTB 1.3.2
//

package org.ow2.mind.adl.jtb.syntaxtree;

/**
 * Represents an grammar optional node, e.g. ( A )? or [ A ]
 */
public class NodeOptional implements Node {
   public NodeOptional() {
      node = null;
   }

   public NodeOptional(Node n) {
      addNode(n);
   }

   public void addNode(Node n)  {
      if ( node != null)                // Oh oh!
         throw new Error("Attempt to set optional node twice");

      node = n;
   }
   public void accept(org.ow2.mind.adl.jtb.visitor.Visitor v) {
      v.visit(this);
   }
   public  R accept(org.ow2.mind.adl.jtb.visitor.GJVisitor v, A argu) {
      return v.visit(this,argu);
   }
   public  R accept(org.ow2.mind.adl.jtb.visitor.GJNoArguVisitor v) {
      return v.visit(this);
   }
   public  void accept(org.ow2.mind.adl.jtb.visitor.GJVoidVisitor v, A argu) {
      v.visit(this,argu);
   }
   public boolean present()   { return node != null; }

   public Node node;
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy