package EDU.neu.ccs.demeter.tools.apstudio.graphedit;
import java.awt.*;
import java.io.*;
import java.util.*;
import EDU.neu.ccs.demeter.*;
import EDU.neu.ccs.demeter.common.tg.*;


import EDU.neu.ccs.demeter.*;
class RepeatedPart {
  protected ClassSpec nonempty;
  public ClassSpec get_nonempty() { return nonempty; }
  public void set_nonempty(ClassSpec new_nonempty)
    { nonempty = new_nonempty; }
  protected LocalLookahead locallookahead;
  public LocalLookahead get_locallookahead() { return locallookahead; }
  public void set_locallookahead(LocalLookahead new_locallookahead)
    { locallookahead = new_locallookahead; }
  protected ClassSpec_Sandwich repeated;
  public ClassSpec_Sandwich get_repeated() { return repeated; }
  public void set_repeated(ClassSpec_Sandwich new_repeated)
    { repeated = new_repeated; }
  RepeatedPart() { super(); }
  public RepeatedPart(ClassSpec nonempty, LocalLookahead locallookahead, ClassSpec_Sandwich repeated) {
    super();
    set_nonempty(nonempty);
    set_locallookahead(locallookahead);
    set_repeated(repeated);
  }
  public static RepeatedPart parse(java.io.InputStream in) throws ParseException
    { return new Parser(in)._RepeatedPart(); }
  public static RepeatedPart parse(String s) {
    try { return parse(new java.io.ByteArrayInputStream(s.getBytes())); }
    catch (ParseException e) { throw new RuntimeException(e.toString()); }
  }

		void setSyntax( UConstEdge uce)
		{
			SomeClassSpecVisitor sv = new SomeClassSpecVisitor(uce);
			toSyntaxClassSpec(sv);
		}
	  ClassName get_classname() {
    __V_RepeatedPart_get_classname v0 = new __V_RepeatedPart_get_classname();
    v0.start();
    toClassName(v0);
    v0.finish();
    return v0.get_return_val();
  }
  void universal_trv0_bef(UniversalVisitor _v_) {
    _v_.before(this);
  }
  void universal_trv0_aft(UniversalVisitor _v_) {
    _v_.after(this);
  }
  void universal_trv0(UniversalVisitor _v_) {
    universal_trv0_bef(_v_);
    if (nonempty != null) {
      _v_.before_nonempty(this, nonempty);
    nonempty.universal_trv0(_v_);
      _v_.after_nonempty(this, nonempty);
    }
    if (locallookahead != null) {
      _v_.before_locallookahead(this, locallookahead);
    locallookahead.universal_trv0(_v_);
      _v_.after_locallookahead(this, locallookahead);
    }
    _v_.before_repeated(this, repeated);
    repeated.universal_trv0(_v_);
    _v_.after_repeated(this, repeated);
    universal_trv0_aft(_v_);
  }
  void toAllSubclasses_Program_trv_bef(ClassNameTranspVisitor cntv, EdgeVisitor aev) {
    aev.before(this);
  }
  void toAllSubclasses_Program_trv_aft(ClassNameTranspVisitor cntv, EdgeVisitor aev) {
    aev.after(this);
  }
  void toAllSubclasses_Program_trv(ClassNameTranspVisitor cntv, EdgeVisitor aev) {
    toAllSubclasses_Program_trv_bef(cntv, aev);
    if (nonempty != null) {
    nonempty.toAllSubclasses_Program_trv(cntv, aev);
    }
    repeated.toAllSubclasses_Program_trv(cntv, aev);
    toAllSubclasses_Program_trv_aft(cntv, aev);
  }
  public void toClassSpec(RepClassSpecVisitor csv) {
    toClassSpec_RepeatedPart_trv(csv);
  }
  void toClassSpec_RepeatedPart_trv_bef(RepClassSpecVisitor csv) {
    csv.before(this);
  }
  void toClassSpec_RepeatedPart_trv_aft(RepClassSpecVisitor csv) {  }
  void toClassSpec_RepeatedPart_trv(RepClassSpecVisitor csv) {
    toClassSpec_RepeatedPart_trv_bef(csv);
    if (nonempty != null) {
    nonempty.toClassSpec_RepeatedPart_trv(csv);
    }
    repeated.toClassSpec_RepeatedPart_trv(csv);
    toClassSpec_RepeatedPart_trv_aft(csv);
  }
  public void toSyntaxClassSpec(SomeClassSpecVisitor scv) {
    toSyntaxClassSpec_RepeatedPart_trv(scv);
  }
  void toSyntaxClassSpec_RepeatedPart_trv_bef(SomeClassSpecVisitor scv) {
    scv.before(this);
  }
  void toSyntaxClassSpec_RepeatedPart_trv_aft(SomeClassSpecVisitor scv) {
    scv.after(this);
  }
  void toSyntaxClassSpec_RepeatedPart_trv(SomeClassSpecVisitor scv) {
    toSyntaxClassSpec_RepeatedPart_trv_bef(scv);
    repeated.toSyntaxClassSpec_RepeatedPart_trv(scv);
    toSyntaxClassSpec_RepeatedPart_trv_aft(scv);
  }
  public void toClassName(ClassNameAccessor v) {
    toClassName_RepeatedPart_trv(v);
  }
  void toClassName_RepeatedPart_trv_bef(ClassNameAccessor v) {  }
  void toClassName_RepeatedPart_trv_aft(ClassNameAccessor v) {  }
  void toClassName_RepeatedPart_trv(ClassNameAccessor v) {
    toClassName_RepeatedPart_trv_bef(v);
    if (nonempty != null) {
    nonempty.toClassName_RepeatedPart_trv(v);
    }
    repeated.toClassName_RepeatedPart_trv(v);
    toClassName_RepeatedPart_trv_aft(v);
  }
}

