package aspectEditor.aspectEditorUtils;
import java.util.jar.JarFile;
import java.util.*;
import java.io.*;
import edu.neu.ccs.demeter.aplib.*;
import edu.neu.ccs.demeter.*;
class Nonempty_Glob_Commalist {
  protected Glob it;
  public Glob get_it() { return it; }
  public void set_it(Glob new_it) { it = new_it; }
  protected Nonempty_Glob_Commalist next;
  public Nonempty_Glob_Commalist get_next() { return next; }
  public void set_next(Nonempty_Glob_Commalist new_next) { next = new_next; }
  public Nonempty_Glob_Commalist() { super(); }
  public Nonempty_Glob_Commalist(Glob it, Nonempty_Glob_Commalist next) {
    super();
    set_it(it);
    set_next(next);
  }
  public static Nonempty_Glob_Commalist parse(java.io.Reader in) throws ParseException { return new Parser(in)._Nonempty_Glob_Commalist(); }
  public static Nonempty_Glob_Commalist parse(java.io.InputStream in) throws ParseException { return new Parser(in)._Nonempty_Glob_Commalist(); }
  public static Nonempty_Glob_Commalist parse(String s) {
    try { return parse(new java.io.StringReader(s)); }
    catch (ParseException e) {
      throw new RuntimeException(e.toString());
    }
  }
  public String toString() {
    return it + (next == null ? "" : ", " + next);
  }
  void universal_trv0_bef(UniversalVisitor _v_) {
    ((UniversalVisitor) _v_).before(this);
  }

  void universal_trv0_aft(UniversalVisitor _v_) {
    ((UniversalVisitor) _v_).after(this);
  }

  void universal_trv0(UniversalVisitor _v_) {
    universal_trv0_bef(_v_);
    ((UniversalVisitor) _v_).before_it(this, it);
    it.universal_trv0(_v_);
    ((UniversalVisitor) _v_).after_it(this, it);
    if (next != null) {
      ((UniversalVisitor) _v_).before_next(this, next);
      next.universal_trv0(_v_);
      ((UniversalVisitor) _v_).after_next(this, next);
    }
    universal_trv0_aft(_v_);
  }

  void allGlobs_GlobSpec_trv_bef(GlobVisitor v) {
    ((UniversalVisitor) v).before(this);
  }

  void allGlobs_GlobSpec_trv_aft(GlobVisitor v) {
    ((UniversalVisitor) v).after(this);
  }

  void allGlobs_GlobSpec_trv(GlobVisitor v) {
    allGlobs_GlobSpec_trv_bef(v);
    ((UniversalVisitor) v).before_it(this, it);
    it.allGlobs_GlobSpec_trv(v);
    ((UniversalVisitor) v).after_it(this, it);
    if (next != null) {
      ((UniversalVisitor) v).before_next(this, next);
      next.allGlobs_GlobSpec_trv(v);
      ((UniversalVisitor) v).after_next(this, next);
    }
    allGlobs_GlobSpec_trv_aft(v);
  }

  void __trav_matchEdge_GlobSpec_trv_bef(__V_GlobSpec_matchEdge __v0) {  }

  void __trav_matchEdge_GlobSpec_trv_aft(__V_GlobSpec_matchEdge __v0) {  }

  void __trav_matchEdge_GlobSpec_trv(__V_GlobSpec_matchEdge __v0) {
    __trav_matchEdge_GlobSpec_trv_bef(__v0);
    it.__trav_matchEdge_GlobSpec_trv(__v0);
    if (next != null) {
      next.__trav_matchEdge_GlobSpec_trv(__v0);
    }
    __trav_matchEdge_GlobSpec_trv_aft(__v0);
  }

  void __trav_match_GlobSpec_trv_bef(__V_GlobSpec_match __v0) {  }

  void __trav_match_GlobSpec_trv_aft(__V_GlobSpec_match __v0) {  }

  void __trav_match_GlobSpec_trv(java.util.BitSet nodes, __V_GlobSpec_match __v0) {
    __trav_match_GlobSpec_trv_bef(__v0);
    { java.util.BitSet newnodes = new java.util.BitSet();
      newnodes.set(0);
      newnodes.and(nodes);
      if (!newnodes.equals(new java.util.BitSet())) {
        it.__trav_match_GlobSpec_trv(newnodes, __v0);
      }
    }
    if (next != null) {
      { java.util.BitSet newnodes = new java.util.BitSet();
        newnodes.set(0);
        newnodes.and(nodes);
        if (!newnodes.equals(new java.util.BitSet())) {
          next.__trav_match_GlobSpec_trv(newnodes, __v0);
        }
      }
    }
    __trav_match_GlobSpec_trv_aft(__v0);
  }

  void __trav_collectClassGlobs_GlobSpec_trv_bef(__V_GlobSpec_collectClassGlobs __v0) {  }

  void __trav_collectClassGlobs_GlobSpec_trv_aft(__V_GlobSpec_collectClassGlobs __v0) {  }

  void __trav_collectClassGlobs_GlobSpec_trv(__V_GlobSpec_collectClassGlobs __v0) {
    __trav_collectClassGlobs_GlobSpec_trv_bef(__v0);
    it.__trav_collectClassGlobs_GlobSpec_trv(__v0);
    if (next != null) {
      next.__trav_collectClassGlobs_GlobSpec_trv(__v0);
    }
    __trav_collectClassGlobs_GlobSpec_trv_aft(__v0);
  }

  void __trav_collectEdgeGlobs_GlobSpec_trv_bef(__V_GlobSpec_collectEdgeGlobs __v0) {  }

  void __trav_collectEdgeGlobs_GlobSpec_trv_aft(__V_GlobSpec_collectEdgeGlobs __v0) {  }

  void __trav_collectEdgeGlobs_GlobSpec_trv(__V_GlobSpec_collectEdgeGlobs __v0) {
    __trav_collectEdgeGlobs_GlobSpec_trv_bef(__v0);
    it.__trav_collectEdgeGlobs_GlobSpec_trv(__v0);
    if (next != null) {
      next.__trav_collectEdgeGlobs_GlobSpec_trv(__v0);
    }
    __trav_collectEdgeGlobs_GlobSpec_trv_aft(__v0);
  }

}
