// This file is automatically generated by DemeterJ.

CopyVisitor {
  {{
    private java.util.Stack history = new java.util.Stack();
    public CopyVisitor(Class firstClass) {
      try {
        history.push(firstClass.newInstance());
      } catch(Exception e) {
        e.printStackTrace();
      }
    }
  }}
  get copy {{ return history.peek(); }}
  return Object {{ get_copy() }}


  before -> ClassGraph, preamble, Preamble {{
    ClassGraph it = (ClassGraph) history.peek();
    Preamble p = new Preamble();
    it.set_preamble(p);
    history.push(p);
  }}

  after -> ClassGraph, preamble, Preamble {{
    history.pop();
  }}

  before -> ClassGraph, classes, ClassGraphEntry_SList {{
    ClassGraph it = (ClassGraph) history.peek();
    ClassGraphEntry_SList p = new ClassGraphEntry_SList();
    it.set_classes(p);
    history.push(p);
  }}

  after -> ClassGraph, classes, ClassGraphEntry_SList {{
    history.pop();
  }}

  before -> Preamble, pkg, Package {{
    Preamble it = (Preamble) history.peek();
    Package p = new Package();
    it.set_pkg(p);
    history.push(p);
  }}

  after -> Preamble, pkg, Package {{
    history.pop();
  }}

  before -> Preamble, localimports, LocalImports {{
    Preamble it = (Preamble) history.peek();
    LocalImports p = new LocalImports();
    it.set_localimports(p);
    history.push(p);
  }}

  after -> Preamble, localimports, LocalImports {{
    history.pop();
  }}

  before -> Package, packagename, PackageName {{
    Package it = (Package) history.peek();
    PackageName p = new PackageName();
    it.set_packagename(p);
    history.push(p);
  }}

  after -> Package, packagename, PackageName {{
    history.pop();
  }}

  before -> LocalImports, imports, Import_SList {{
    LocalImports it = (LocalImports) history.peek();
    Import_SList p = new Import_SList();
    it.set_imports(p);
    history.push(p);
  }}

  after -> LocalImports, imports, Import_SList {{
    history.pop();
  }}

  before -> Import, packagename, PackageName {{
    Import it = (Import) history.peek();
    PackageName p = new PackageName();
    it.set_packagename(p);
    history.push(p);
  }}

  after -> Import, packagename, PackageName {{
    history.pop();
  }}

  before -> Import, importallclasses, ImportAllClasses {{
    Import it = (Import) history.peek();
    ImportAllClasses p = new ImportAllClasses();
    it.set_importallclasses(p);
    history.push(p);
  }}

  after -> Import, importallclasses, ImportAllClasses {{
    history.pop();
  }}

  before -> ParseDirective, parsekeyword, ParseKeyword {{
    ParseDirective it = (ParseDirective) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_parsekeyword((ParseKeyword) p);
    history.push(p);
  }}

  after -> ParseDirective, parsekeyword, ParseKeyword {{
    history.pop();
  }}

  before -> VisitorDirective, visitorkeyword, VisitorKeyword {{
    VisitorDirective it = (VisitorDirective) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_visitorkeyword((VisitorKeyword) p);
    history.push(p);
  }}

  after -> VisitorDirective, visitorkeyword, VisitorKeyword {{
    history.pop();
  }}

  before -> ClassDef, keywords, ClassKeyword_List {{
    ClassDef it = (ClassDef) history.peek();
    ClassKeyword_List p = new ClassKeyword_List();
    it.set_keywords(p);
    history.push(p);
  }}

  after -> ClassDef, keywords, ClassKeyword_List {{
    history.pop();
  }}

  before -> ClassDef, paramclassname, ParamClassName {{
    ClassDef it = (ClassDef) history.peek();
    ParamClassName p = new ParamClassName();
    it.set_paramclassname(p);
    history.push(p);
  }}

  after -> ClassDef, paramclassname, ParamClassName {{
    history.pop();
  }}

  before -> ClassDef, parsedirective, ParseDirective {{
    ClassDef it = (ClassDef) history.peek();
    ParseDirective p = new ParseDirective();
    it.set_parsedirective(p);
    history.push(p);
  }}

  after -> ClassDef, parsedirective, ParseDirective {{
    history.pop();
  }}

  before -> ClassDef, classparts, ClassParts {{
    ClassDef it = (ClassDef) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_classparts((ClassParts) p);
    history.push(p);
  }}

  after -> ClassDef, classparts, ClassParts {{
    history.pop();
  }}

  before -> ClassDef, eoftoken, EOFtoken {{
    ClassDef it = (ClassDef) history.peek();
    EOFtoken p = new EOFtoken();
    it.set_eoftoken(p);
    history.push(p);
  }}

  after -> ClassDef, eoftoken, EOFtoken {{
    history.pop();
  }}

  before -> ClassKeyword_List, first, Nonempty_ClassKeyword_List {{
    ClassKeyword_List it = (ClassKeyword_List) history.peek();
    Nonempty_ClassKeyword_List p = new Nonempty_ClassKeyword_List();
    it.set_first(p);
    history.push(p);
  }}

  after -> ClassKeyword_List, first, Nonempty_ClassKeyword_List {{
    history.pop();
  }}

  before -> ParamClassName, classname, ClassName {{
    ParamClassName it = (ParamClassName) history.peek();
    ClassName p = new ClassName();
    it.set_classname(p);
    history.push(p);
  }}

  after -> ParamClassName, classname, ClassName {{
    history.pop();
  }}

  before -> ParamClassName, parameters, ClassName_Commalist {{
    ParamClassName it = (ParamClassName) history.peek();
    ClassName_Commalist p = new ClassName_Commalist();
    it.set_parameters(p);
    history.push(p);
  }}

  after -> ParamClassName, parameters, ClassName_Commalist {{
    history.pop();
  }}

  before -> ConstOrAltClass, parts, PartOrSyntax_List {{
    ConstOrAltClass it = (ConstOrAltClass) history.peek();
    PartOrSyntax_List p = new PartOrSyntax_List();
    it.set_parts(p);
    history.push(p);
  }}

  after -> ConstOrAltClass, parts, PartOrSyntax_List {{
    history.pop();
  }}

  before -> ConstOrAltClass, parents, ClassParents {{
    ConstOrAltClass it = (ConstOrAltClass) history.peek();
    ClassParents p = new ClassParents();
    it.set_parents(p);
    history.push(p);
  }}

  after -> ConstOrAltClass, parents, ClassParents {{
    history.pop();
  }}

  before -> Part, partname, PartName {{
    Part it = (Part) history.peek();
    PartName p = new PartName();
    it.set_partname(p);
    history.push(p);
  }}

  after -> Part, partname, PartName {{
    history.pop();
  }}

  before -> Part, keywords, PartKeyword_List {{
    Part it = (Part) history.peek();
    PartKeyword_List p = new PartKeyword_List();
    it.set_keywords(p);
    history.push(p);
  }}

  after -> Part, keywords, PartKeyword_List {{
    history.pop();
  }}

  before -> Part, classspec, ClassSpec {{
    Part it = (Part) history.peek();
    ClassSpec p = new ClassSpec();
    it.set_classspec(p);
    history.push(p);
  }}

  after -> Part, classspec, ClassSpec {{
    history.pop();
  }}

  before -> Part, partinit, PartInit {{
    Part it = (Part) history.peek();
    PartInit p = new PartInit();
    it.set_partinit(p);
    history.push(p);
  }}

  after -> Part, partinit, PartInit {{
    history.pop();
  }}

  before -> PartKeyword_List, first, Nonempty_PartKeyword_List {{
    PartKeyword_List it = (PartKeyword_List) history.peek();
    Nonempty_PartKeyword_List p = new Nonempty_PartKeyword_List();
    it.set_first(p);
    history.push(p);
  }}

  after -> PartKeyword_List, first, Nonempty_PartKeyword_List {{
    history.pop();
  }}

  before -> PartInit, partinitkeyword, PartInitKeyword {{
    PartInit it = (PartInit) history.peek();
    PartInitKeyword p = new PartInitKeyword();
    it.set_partinitkeyword(p);
    history.push(p);
  }}

  after -> PartInit, partinitkeyword, PartInitKeyword {{
    history.pop();
  }}

  before -> PartInit, javacode, JavaCode {{
    PartInit it = (PartInit) history.peek();
    JavaCode p = new JavaCode();
    it.set_javacode(p);
    history.push(p);
  }}

  after -> PartInit, javacode, JavaCode {{
    history.pop();
  }}

  before -> OptionalPart, locallookahead, LocalLookahead {{
    OptionalPart it = (OptionalPart) history.peek();
    LocalLookahead p = new LocalLookahead();
    it.set_locallookahead(p);
    history.push(p);
  }}

  after -> OptionalPart, locallookahead, LocalLookahead {{
    history.pop();
  }}

  before -> OptionalPart, part, Part_Sandwich {{
    OptionalPart it = (OptionalPart) history.peek();
    Part_Sandwich p = new Part_Sandwich();
    it.set_part(p);
    history.push(p);
  }}

  after -> OptionalPart, part, Part_Sandwich {{
    history.pop();
  }}

  before -> ClassParents, superclasses, Superclasses {{
    ClassParents it = (ClassParents) history.peek();
    Superclasses p = new Superclasses();
    it.set_superclasses(p);
    history.push(p);
  }}

  after -> ClassParents, superclasses, Superclasses {{
    history.pop();
  }}

  before -> ClassParents, interfaces, Interfaces {{
    ClassParents it = (ClassParents) history.peek();
    Interfaces p = new Interfaces();
    it.set_interfaces(p);
    history.push(p);
  }}

  after -> ClassParents, interfaces, Interfaces {{
    history.pop();
  }}

  before -> Superclasses, extendskeyword, ExtendsKeyword {{
    Superclasses it = (Superclasses) history.peek();
    ExtendsKeyword p = new ExtendsKeyword();
    it.set_extendskeyword(p);
    history.push(p);
  }}

  after -> Superclasses, extendskeyword, ExtendsKeyword {{
    history.pop();
  }}

  before -> Superclasses, superclasses, Superclass_Commalist {{
    Superclasses it = (Superclasses) history.peek();
    Superclass_Commalist p = new Superclass_Commalist();
    it.set_superclasses(p);
    history.push(p);
  }}

  after -> Superclasses, superclasses, Superclass_Commalist {{
    history.pop();
  }}

  before -> Superclass, classspec, ClassSpec {{
    Superclass it = (Superclass) history.peek();
    ClassSpec p = new ClassSpec();
    it.set_classspec(p);
    history.push(p);
  }}

  after -> Superclass, classspec, ClassSpec {{
    history.pop();
  }}

  before -> Interfaces, implementskeyword, ImplementsKeyword {{
    Interfaces it = (Interfaces) history.peek();
    ImplementsKeyword p = new ImplementsKeyword();
    it.set_implementskeyword(p);
    history.push(p);
  }}

  after -> Interfaces, implementskeyword, ImplementsKeyword {{
    history.pop();
  }}

  before -> Interfaces, interfaces, Interface_Commalist {{
    Interfaces it = (Interfaces) history.peek();
    Interface_Commalist p = new Interface_Commalist();
    it.set_interfaces(p);
    history.push(p);
  }}

  after -> Interfaces, interfaces, Interface_Commalist {{
    history.pop();
  }}

  before -> Interface, classspec, ClassSpec {{
    Interface it = (Interface) history.peek();
    ClassSpec p = new ClassSpec();
    it.set_classspec(p);
    history.push(p);
  }}

  after -> Interface, classspec, ClassSpec {{
    history.pop();
  }}

  before -> AlternationClass, subclasses, Subclass_Barlist {{
    AlternationClass it = (AlternationClass) history.peek();
    Subclass_Barlist p = new Subclass_Barlist();
    it.set_subclasses(p);
    history.push(p);
  }}

  after -> AlternationClass, subclasses, Subclass_Barlist {{
    history.pop();
  }}

  before -> AlternationClass, commonkeyword, CommonKeyword {{
    AlternationClass it = (AlternationClass) history.peek();
    CommonKeyword p = new CommonKeyword();
    it.set_commonkeyword(p);
    history.push(p);
  }}

  after -> AlternationClass, commonkeyword, CommonKeyword {{
    history.pop();
  }}

  before -> Subclass, locallookahead, LocalLookahead {{
    Subclass it = (Subclass) history.peek();
    LocalLookahead p = new LocalLookahead();
    it.set_locallookahead(p);
    history.push(p);
  }}

  after -> Subclass, locallookahead, LocalLookahead {{
    history.pop();
  }}

  before -> Subclass, classspec, ClassSpec {{
    Subclass it = (Subclass) history.peek();
    ClassSpec p = new ClassSpec();
    it.set_classspec(p);
    history.push(p);
  }}

  after -> Subclass, classspec, ClassSpec {{
    history.pop();
  }}

  before -> LocalLookahead, lookaheadkeyword, LookaheadKeyword {{
    LocalLookahead it = (LocalLookahead) history.peek();
    LookaheadKeyword p = new LookaheadKeyword();
    it.set_lookaheadkeyword(p);
    history.push(p);
  }}

  after -> LocalLookahead, lookaheadkeyword, LookaheadKeyword {{
    history.pop();
  }}

  before -> LocalLookahead, javacode, JavaCode {{
    LocalLookahead it = (LocalLookahead) history.peek();
    JavaCode p = new JavaCode();
    it.set_javacode(p);
    history.push(p);
  }}

  after -> LocalLookahead, javacode, JavaCode {{
    history.pop();
  }}

  before -> RepetitionClass, sandwiched, RepeatedPart_Sandwich {{
    RepetitionClass it = (RepetitionClass) history.peek();
    RepeatedPart_Sandwich p = new RepeatedPart_Sandwich();
    it.set_sandwiched(p);
    history.push(p);
  }}

  after -> RepetitionClass, sandwiched, RepeatedPart_Sandwich {{
    history.pop();
  }}

  before -> RepeatedPart, nonempty, ClassSpec {{
    RepeatedPart it = (RepeatedPart) history.peek();
    ClassSpec p = new ClassSpec();
    it.set_nonempty(p);
    history.push(p);
  }}

  after -> RepeatedPart, nonempty, ClassSpec {{
    history.pop();
  }}

  before -> RepeatedPart, openbrace, OpenBrace {{
    RepeatedPart it = (RepeatedPart) history.peek();
    OpenBrace p = new OpenBrace();
    it.set_openbrace(p);
    history.push(p);
  }}

  after -> RepeatedPart, openbrace, OpenBrace {{
    history.pop();
  }}

  before -> RepeatedPart, locallookahead, LocalLookahead {{
    RepeatedPart it = (RepeatedPart) history.peek();
    LocalLookahead p = new LocalLookahead();
    it.set_locallookahead(p);
    history.push(p);
  }}

  after -> RepeatedPart, locallookahead, LocalLookahead {{
    history.pop();
  }}

  before -> RepeatedPart, repeated, RepeatedElement_Sandwich {{
    RepeatedPart it = (RepeatedPart) history.peek();
    RepeatedElement_Sandwich p = new RepeatedElement_Sandwich();
    it.set_repeated(p);
    history.push(p);
  }}

  after -> RepeatedPart, repeated, RepeatedElement_Sandwich {{
    history.pop();
  }}

  before -> RepeatedElement, classspec, ClassSpec {{
    RepeatedElement it = (RepeatedElement) history.peek();
    ClassSpec p = new ClassSpec();
    it.set_classspec(p);
    history.push(p);
  }}

  after -> RepeatedElement, classspec, ClassSpec {{
    history.pop();
  }}

  before -> ClassSpec, classname, ClassName {{
    ClassSpec it = (ClassSpec) history.peek();
    ClassName p = new ClassName();
    it.set_classname(p);
    history.push(p);
  }}

  after -> ClassSpec, classname, ClassName {{
    history.pop();
  }}

  before -> ClassSpec, actual_parameters, ClassSpec_Commalist {{
    ClassSpec it = (ClassSpec) history.peek();
    ClassSpec_Commalist p = new ClassSpec_Commalist();
    it.set_actual_parameters(p);
    history.push(p);
  }}

  after -> ClassSpec, actual_parameters, ClassSpec_Commalist {{
    history.pop();
  }}

  before -> PlainSyntax, string, String {{
    PlainSyntax it = (PlainSyntax) history.peek();
    it.set_string(dest);
  }}

  before -> PackageName, first, Nonempty_PackageName {{
    PackageName it = (PackageName) history.peek();
    Nonempty_PackageName p = new Nonempty_PackageName();
    it.set_first(p);
    history.push(p);
  }}

  after -> PackageName, first, Nonempty_PackageName {{
    history.pop();
  }}

  before -> ClassName, name, Name {{
    ClassName it = (ClassName) history.peek();
    Name p = new Name();
    it.set_name(p);
    history.push(p);
  }}

  after -> ClassName, name, Name {{
    history.pop();
  }}

  before -> PartName, name, IdentOrKeyword {{
    PartName it = (PartName) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_name((IdentOrKeyword) p);
    history.push(p);
  }}

  after -> PartName, name, IdentOrKeyword {{
    history.pop();
  }}

  before -> JavaCode, code, Text {{
    JavaCode it = (JavaCode) history.peek();
    it.set_code(dest);
  }}

  before -> Name, first, Nonempty_Name {{
    Name it = (Name) history.peek();
    Nonempty_Name p = new Nonempty_Name();
    it.set_first(p);
    history.push(p);
  }}

  after -> Name, first, Nonempty_Name {{
    history.pop();
  }}

  before -> OtherIdent, id, Ident {{
    OtherIdent it = (OtherIdent) history.peek();
    it.set_id(dest);
  }}

  before -> ClassType, is_con, boolean {{
    ClassType it = (ClassType) history.peek();
    it.set_is_con(dest);
  }}

  before -> ClassType, is_alt, boolean {{
    ClassType it = (ClassType) history.peek();
    it.set_is_alt(dest);
  }}

  before -> ClassType, is_rep, boolean {{
    ClassType it = (ClassType) history.peek();
    it.set_is_rep(dest);
  }}

  before -> ClassType, is_public, boolean {{
    ClassType it = (ClassType) history.peek();
    it.set_is_public(dest);
  }}

  before -> ClassType, is_final, boolean {{
    ClassType it = (ClassType) history.peek();
    it.set_is_final(dest);
  }}

  before -> ClassType, is_interface, boolean {{
    ClassType it = (ClassType) history.peek();
    it.set_is_interface(dest);
  }}

  before -> ClassType, is_not_parsed, boolean {{
    ClassType it = (ClassType) history.peek();
    it.set_is_not_parsed(dest);
  }}

  before -> ClassType, is_visitor, boolean {{
    ClassType it = (ClassType) history.peek();
    it.set_is_visitor(dest);
  }}

  before -> PartType, is_final, boolean {{
    PartType it = (PartType) history.peek();
    it.set_is_final(dest);
  }}

  before -> PartType, is_static, boolean {{
    PartType it = (PartType) history.peek();
    it.set_is_static(dest);
  }}

  before -> PartType, is_derived, boolean {{
    PartType it = (PartType) history.peek();
    it.set_is_derived(dest);
  }}

  before -> PartType, has_getter, boolean {{
    PartType it = (PartType) history.peek();
    it.set_has_getter(dest);
  }}

  before -> PartType, has_setter, boolean {{
    PartType it = (PartType) history.peek();
    it.set_has_setter(dest);
  }}

  before -> Parts, first, Nonempty_Parts {{
    Parts it = (Parts) history.peek();
    Nonempty_Parts p = new Nonempty_Parts();
    it.set_first(p);
    history.push(p);
  }}

  after -> Parts, first, Nonempty_Parts {{
    history.pop();
  }}

  before -> PrintVisitor, indent, int {{
    PrintVisitor it = (PrintVisitor) history.peek();
    it.set_indent(dest);
  }}

  before -> PrintVisitor, needSpace, boolean {{
    PrintVisitor it = (PrintVisitor) history.peek();
    it.set_needSpace(dest);
  }}

  before -> SubgraphVisitor, is_equal, boolean {{
    SubgraphVisitor it = (SubgraphVisitor) history.peek();
    it.set_is_equal(dest);
  }}

  before -> EqualVisitor, is_equal, boolean {{
    EqualVisitor it = (EqualVisitor) history.peek();
    it.set_is_equal(dest);
  }}

  before -> DisplayVisitor, indent, int {{
    DisplayVisitor it = (DisplayVisitor) history.peek();
    it.set_indent(dest);
  }}

  before -> TraceVisitor, indent, int {{
    TraceVisitor it = (TraceVisitor) history.peek();
    it.set_indent(dest);
  }}

  before -> ClassGraphEntry_SList, first, Nonempty_ClassGraphEntry_SList {{
    ClassGraphEntry_SList it = (ClassGraphEntry_SList) history.peek();
    Nonempty_ClassGraphEntry_SList p = new Nonempty_ClassGraphEntry_SList();
    it.set_first(p);
    history.push(p);
  }}

  after -> ClassGraphEntry_SList, first, Nonempty_ClassGraphEntry_SList {{
    history.pop();
  }}

  before -> Import_SList, first, Nonempty_Import_SList {{
    Import_SList it = (Import_SList) history.peek();
    Nonempty_Import_SList p = new Nonempty_Import_SList();
    it.set_first(p);
    history.push(p);
  }}

  after -> Import_SList, first, Nonempty_Import_SList {{
    history.pop();
  }}

  before -> ClassName_Commalist, first, Nonempty_ClassName_Commalist {{
    ClassName_Commalist it = (ClassName_Commalist) history.peek();
    Nonempty_ClassName_Commalist p = new Nonempty_ClassName_Commalist();
    it.set_first(p);
    history.push(p);
  }}

  after -> ClassName_Commalist, first, Nonempty_ClassName_Commalist {{
    history.pop();
  }}

  before -> PartOrSyntax_List, first, Nonempty_PartOrSyntax_List {{
    PartOrSyntax_List it = (PartOrSyntax_List) history.peek();
    Nonempty_PartOrSyntax_List p = new Nonempty_PartOrSyntax_List();
    it.set_first(p);
    history.push(p);
  }}

  after -> PartOrSyntax_List, first, Nonempty_PartOrSyntax_List {{
    history.pop();
  }}

  before -> Part_Sandwich, first, Syntax_List {{
    Part_Sandwich it = (Part_Sandwich) history.peek();
    Syntax_List p = new Syntax_List();
    it.set_first(p);
    history.push(p);
  }}

  after -> Part_Sandwich, first, Syntax_List {{
    history.pop();
  }}

  before -> Part_Sandwich, inner, Part {{
    Part_Sandwich it = (Part_Sandwich) history.peek();
    Part p = new Part();
    it.set_inner(p);
    history.push(p);
  }}

  after -> Part_Sandwich, inner, Part {{
    history.pop();
  }}

  before -> Part_Sandwich, second, Syntax_List {{
    Part_Sandwich it = (Part_Sandwich) history.peek();
    Syntax_List p = new Syntax_List();
    it.set_second(p);
    history.push(p);
  }}

  after -> Part_Sandwich, second, Syntax_List {{
    history.pop();
  }}

  before -> Superclass_Commalist, first, Nonempty_Superclass_Commalist {{
    Superclass_Commalist it = (Superclass_Commalist) history.peek();
    Nonempty_Superclass_Commalist p = new Nonempty_Superclass_Commalist();
    it.set_first(p);
    history.push(p);
  }}

  after -> Superclass_Commalist, first, Nonempty_Superclass_Commalist {{
    history.pop();
  }}

  before -> Interface_Commalist, first, Nonempty_Interface_Commalist {{
    Interface_Commalist it = (Interface_Commalist) history.peek();
    Nonempty_Interface_Commalist p = new Nonempty_Interface_Commalist();
    it.set_first(p);
    history.push(p);
  }}

  after -> Interface_Commalist, first, Nonempty_Interface_Commalist {{
    history.pop();
  }}

  before -> Subclass_Barlist, first, Nonempty_Subclass_Barlist {{
    Subclass_Barlist it = (Subclass_Barlist) history.peek();
    Nonempty_Subclass_Barlist p = new Nonempty_Subclass_Barlist();
    it.set_first(p);
    history.push(p);
  }}

  after -> Subclass_Barlist, first, Nonempty_Subclass_Barlist {{
    history.pop();
  }}

  before -> RepeatedPart_Sandwich, first, Syntax_List {{
    RepeatedPart_Sandwich it = (RepeatedPart_Sandwich) history.peek();
    Syntax_List p = new Syntax_List();
    it.set_first(p);
    history.push(p);
  }}

  after -> RepeatedPart_Sandwich, first, Syntax_List {{
    history.pop();
  }}

  before -> RepeatedPart_Sandwich, inner, RepeatedPart {{
    RepeatedPart_Sandwich it = (RepeatedPart_Sandwich) history.peek();
    RepeatedPart p = new RepeatedPart();
    it.set_inner(p);
    history.push(p);
  }}

  after -> RepeatedPart_Sandwich, inner, RepeatedPart {{
    history.pop();
  }}

  before -> RepeatedPart_Sandwich, second, Syntax_List {{
    RepeatedPart_Sandwich it = (RepeatedPart_Sandwich) history.peek();
    Syntax_List p = new Syntax_List();
    it.set_second(p);
    history.push(p);
  }}

  after -> RepeatedPart_Sandwich, second, Syntax_List {{
    history.pop();
  }}

  before -> RepeatedElement_Sandwich, first, Syntax_List {{
    RepeatedElement_Sandwich it = (RepeatedElement_Sandwich) history.peek();
    Syntax_List p = new Syntax_List();
    it.set_first(p);
    history.push(p);
  }}

  after -> RepeatedElement_Sandwich, first, Syntax_List {{
    history.pop();
  }}

  before -> RepeatedElement_Sandwich, inner, RepeatedElement {{
    RepeatedElement_Sandwich it = (RepeatedElement_Sandwich) history.peek();
    RepeatedElement p = new RepeatedElement();
    it.set_inner(p);
    history.push(p);
  }}

  after -> RepeatedElement_Sandwich, inner, RepeatedElement {{
    history.pop();
  }}

  before -> RepeatedElement_Sandwich, second, Syntax_List {{
    RepeatedElement_Sandwich it = (RepeatedElement_Sandwich) history.peek();
    Syntax_List p = new Syntax_List();
    it.set_second(p);
    history.push(p);
  }}

  after -> RepeatedElement_Sandwich, second, Syntax_List {{
    history.pop();
  }}

  before -> Syntax_List, first, Nonempty_Syntax_List {{
    Syntax_List it = (Syntax_List) history.peek();
    Nonempty_Syntax_List p = new Nonempty_Syntax_List();
    it.set_first(p);
    history.push(p);
  }}

  after -> Syntax_List, first, Nonempty_Syntax_List {{
    history.pop();
  }}

  before -> ClassSpec_Commalist, first, Nonempty_ClassSpec_Commalist {{
    ClassSpec_Commalist it = (ClassSpec_Commalist) history.peek();
    Nonempty_ClassSpec_Commalist p = new Nonempty_ClassSpec_Commalist();
    it.set_first(p);
    history.push(p);
  }}

  after -> ClassSpec_Commalist, first, Nonempty_ClassSpec_Commalist {{
    history.pop();
  }}

  before -> Nonempty_ClassKeyword_List, it, ClassKeyword {{
    Nonempty_ClassKeyword_List it = (Nonempty_ClassKeyword_List) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_it((ClassKeyword) p);
    history.push(p);
  }}

  after -> Nonempty_ClassKeyword_List, it, ClassKeyword {{
    history.pop();
  }}

  before -> Nonempty_ClassKeyword_List, next, Nonempty_ClassKeyword_List {{
    Nonempty_ClassKeyword_List it = (Nonempty_ClassKeyword_List) history.peek();
    Nonempty_ClassKeyword_List p = new Nonempty_ClassKeyword_List();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_ClassKeyword_List, next, Nonempty_ClassKeyword_List {{
    history.pop();
  }}

  before -> Nonempty_PartKeyword_List, it, PartKeyword {{
    Nonempty_PartKeyword_List it = (Nonempty_PartKeyword_List) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_it((PartKeyword) p);
    history.push(p);
  }}

  after -> Nonempty_PartKeyword_List, it, PartKeyword {{
    history.pop();
  }}

  before -> Nonempty_PartKeyword_List, next, Nonempty_PartKeyword_List {{
    Nonempty_PartKeyword_List it = (Nonempty_PartKeyword_List) history.peek();
    Nonempty_PartKeyword_List p = new Nonempty_PartKeyword_List();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_PartKeyword_List, next, Nonempty_PartKeyword_List {{
    history.pop();
  }}

  before -> Nonempty_PackageName, it, IdentOrKeyword {{
    Nonempty_PackageName it = (Nonempty_PackageName) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_it((IdentOrKeyword) p);
    history.push(p);
  }}

  after -> Nonempty_PackageName, it, IdentOrKeyword {{
    history.pop();
  }}

  before -> Nonempty_PackageName, next, Nonempty_PackageName {{
    Nonempty_PackageName it = (Nonempty_PackageName) history.peek();
    Nonempty_PackageName p = new Nonempty_PackageName();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_PackageName, next, Nonempty_PackageName {{
    history.pop();
  }}

  before -> Nonempty_Name, it, IdentOrKeyword {{
    Nonempty_Name it = (Nonempty_Name) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_it((IdentOrKeyword) p);
    history.push(p);
  }}

  after -> Nonempty_Name, it, IdentOrKeyword {{
    history.pop();
  }}

  before -> Nonempty_Name, next, Nonempty_Name {{
    Nonempty_Name it = (Nonempty_Name) history.peek();
    Nonempty_Name p = new Nonempty_Name();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_Name, next, Nonempty_Name {{
    history.pop();
  }}

  before -> Nonempty_Parts, it, Part {{
    Nonempty_Parts it = (Nonempty_Parts) history.peek();
    Part p = new Part();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Parts, it, Part {{
    history.pop();
  }}

  before -> Nonempty_Parts, next, Nonempty_Parts {{
    Nonempty_Parts it = (Nonempty_Parts) history.peek();
    Nonempty_Parts p = new Nonempty_Parts();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_Parts, next, Nonempty_Parts {{
    history.pop();
  }}

  before -> Nonempty_ClassGraphEntry_SList, it, ClassGraphEntry {{
    Nonempty_ClassGraphEntry_SList it = (Nonempty_ClassGraphEntry_SList) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_it((ClassGraphEntry) p);
    history.push(p);
  }}

  after -> Nonempty_ClassGraphEntry_SList, it, ClassGraphEntry {{
    history.pop();
  }}

  before -> Nonempty_ClassGraphEntry_SList, next, Nonempty_ClassGraphEntry_SList {{
    Nonempty_ClassGraphEntry_SList it = (Nonempty_ClassGraphEntry_SList) history.peek();
    Nonempty_ClassGraphEntry_SList p = new Nonempty_ClassGraphEntry_SList();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_ClassGraphEntry_SList, next, Nonempty_ClassGraphEntry_SList {{
    history.pop();
  }}

  before -> Nonempty_Import_SList, it, Import {{
    Nonempty_Import_SList it = (Nonempty_Import_SList) history.peek();
    Import p = new Import();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Import_SList, it, Import {{
    history.pop();
  }}

  before -> Nonempty_Import_SList, next, Nonempty_Import_SList {{
    Nonempty_Import_SList it = (Nonempty_Import_SList) history.peek();
    Nonempty_Import_SList p = new Nonempty_Import_SList();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_Import_SList, next, Nonempty_Import_SList {{
    history.pop();
  }}

  before -> Nonempty_ClassName_Commalist, it, ClassName {{
    Nonempty_ClassName_Commalist it = (Nonempty_ClassName_Commalist) history.peek();
    ClassName p = new ClassName();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_ClassName_Commalist, it, ClassName {{
    history.pop();
  }}

  before -> Nonempty_ClassName_Commalist, next, Nonempty_ClassName_Commalist {{
    Nonempty_ClassName_Commalist it = (Nonempty_ClassName_Commalist) history.peek();
    Nonempty_ClassName_Commalist p = new Nonempty_ClassName_Commalist();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_ClassName_Commalist, next, Nonempty_ClassName_Commalist {{
    history.pop();
  }}

  before -> Nonempty_PartOrSyntax_List, it, PartOrSyntax {{
    Nonempty_PartOrSyntax_List it = (Nonempty_PartOrSyntax_List) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_it((PartOrSyntax) p);
    history.push(p);
  }}

  after -> Nonempty_PartOrSyntax_List, it, PartOrSyntax {{
    history.pop();
  }}

  before -> Nonempty_PartOrSyntax_List, next, Nonempty_PartOrSyntax_List {{
    Nonempty_PartOrSyntax_List it = (Nonempty_PartOrSyntax_List) history.peek();
    Nonempty_PartOrSyntax_List p = new Nonempty_PartOrSyntax_List();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_PartOrSyntax_List, next, Nonempty_PartOrSyntax_List {{
    history.pop();
  }}

  before -> Nonempty_Superclass_Commalist, it, Superclass {{
    Nonempty_Superclass_Commalist it = (Nonempty_Superclass_Commalist) history.peek();
    Superclass p = new Superclass();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Superclass_Commalist, it, Superclass {{
    history.pop();
  }}

  before -> Nonempty_Superclass_Commalist, next, Nonempty_Superclass_Commalist {{
    Nonempty_Superclass_Commalist it = (Nonempty_Superclass_Commalist) history.peek();
    Nonempty_Superclass_Commalist p = new Nonempty_Superclass_Commalist();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_Superclass_Commalist, next, Nonempty_Superclass_Commalist {{
    history.pop();
  }}

  before -> Nonempty_Interface_Commalist, it, Interface {{
    Nonempty_Interface_Commalist it = (Nonempty_Interface_Commalist) history.peek();
    Interface p = new Interface();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Interface_Commalist, it, Interface {{
    history.pop();
  }}

  before -> Nonempty_Interface_Commalist, next, Nonempty_Interface_Commalist {{
    Nonempty_Interface_Commalist it = (Nonempty_Interface_Commalist) history.peek();
    Nonempty_Interface_Commalist p = new Nonempty_Interface_Commalist();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_Interface_Commalist, next, Nonempty_Interface_Commalist {{
    history.pop();
  }}

  before -> Nonempty_Subclass_Barlist, it, Subclass {{
    Nonempty_Subclass_Barlist it = (Nonempty_Subclass_Barlist) history.peek();
    Subclass p = new Subclass();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Subclass_Barlist, it, Subclass {{
    history.pop();
  }}

  before -> Nonempty_Subclass_Barlist, next, Nonempty_Subclass_Barlist {{
    Nonempty_Subclass_Barlist it = (Nonempty_Subclass_Barlist) history.peek();
    Nonempty_Subclass_Barlist p = new Nonempty_Subclass_Barlist();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_Subclass_Barlist, next, Nonempty_Subclass_Barlist {{
    history.pop();
  }}

  before -> Nonempty_Syntax_List, it, Syntax {{
    Nonempty_Syntax_List it = (Nonempty_Syntax_List) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_it((Syntax) p);
    history.push(p);
  }}

  after -> Nonempty_Syntax_List, it, Syntax {{
    history.pop();
  }}

  before -> Nonempty_Syntax_List, next, Nonempty_Syntax_List {{
    Nonempty_Syntax_List it = (Nonempty_Syntax_List) history.peek();
    Nonempty_Syntax_List p = new Nonempty_Syntax_List();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_Syntax_List, next, Nonempty_Syntax_List {{
    history.pop();
  }}

  before -> Nonempty_ClassSpec_Commalist, it, ClassSpec {{
    Nonempty_ClassSpec_Commalist it = (Nonempty_ClassSpec_Commalist) history.peek();
    ClassSpec p = new ClassSpec();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_ClassSpec_Commalist, it, ClassSpec {{
    history.pop();
  }}

  before -> Nonempty_ClassSpec_Commalist, next, Nonempty_ClassSpec_Commalist {{
    Nonempty_ClassSpec_Commalist it = (Nonempty_ClassSpec_Commalist) history.peek();
    Nonempty_ClassSpec_Commalist p = new Nonempty_ClassSpec_Commalist();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_ClassSpec_Commalist, next, Nonempty_ClassSpec_Commalist {{
    history.pop();
  }}

}