// Path: src/stone/Parser.java
// public static Parser rule() { return rule(null); }
// 
// Path: src/stone/ast/ClassBody.java
// public class ClassBody extends ASTList {
//     public ClassBody(List<ASTree> c) { super(c); }
// }
// 
// Path: src/stone/ast/ClassStmnt.java
// public class ClassStmnt extends ASTList {
//     public ClassStmnt(List<ASTree> c) { super(c); }
//     public String name() { return ((ASTLeaf)child(0)).token().getText(); }
//     public String superClass() {
//         if (numChildren() < 3)
//             return null;
//         else
//             return ((ASTLeaf)child(1)).token().getText();
//     }
//     public ClassBody body() { return (ClassBody)child(numChildren() - 1); }
//     public String toString() {
//         String parent = superClass();
//         if (parent == null)
//             parent = "*";
//         return "(class " + name() + " " + parent + " " + body() + ")";
//     }
// }
// 
// Path: src/stone/ast/Dot.java
// public class Dot extends Postfix {
//     public Dot(List<ASTree> c) { super(c); }
//     public String name() { return ((ASTLeaf)child(0)).token().getText(); }
//     public String toString() { return "." + name(); } 
// }


import static stone.Parser.rule;
import stone.ast.ClassBody;
import stone.ast.ClassStmnt;
import stone.ast.Dot;
package stone;

public class ClassParser extends ClosureParser {
    Parser member = rule().or(def, simple);
    Parser class_body = rule(ClassBody.class).sep("{").option(member)
                            .repeat(rule().sep(";", Token.EOL).option(member))
                            .sep("}");
// Path: src/stone/Parser.java
// public static Parser rule() { return rule(null); }
// 
// Path: src/stone/ast/ClassBody.java
// public class ClassBody extends ASTList {
//     public ClassBody(List<ASTree> c) { super(c); }
// }
// 
// Path: src/stone/ast/ClassStmnt.java
// public class ClassStmnt extends ASTList {
//     public ClassStmnt(List<ASTree> c) { super(c); }
//     public String name() { return ((ASTLeaf)child(0)).token().getText(); }
//     public String superClass() {
//         if (numChildren() < 3)
//             return null;
//         else
//             return ((ASTLeaf)child(1)).token().getText();
//     }
//     public ClassBody body() { return (ClassBody)child(numChildren() - 1); }
//     public String toString() {
//         String parent = superClass();
//         if (parent == null)
//             parent = "*";
//         return "(class " + name() + " " + parent + " " + body() + ")";
//     }
// }
// 
// Path: src/stone/ast/Dot.java
// public class Dot extends Postfix {
//     public Dot(List<ASTree> c) { super(c); }
//     public String name() { return ((ASTLeaf)child(0)).token().getText(); }
//     public String toString() { return "." + name(); } 
// }


// Path: src/stone/ClassParser.java
import static stone.Parser.rule;
import stone.ast.ClassBody;
import stone.ast.ClassStmnt;
import stone.ast.Dot;

package stone;

public class ClassParser extends ClosureParser {
    Parser member = rule().or(def, simple);
    Parser class_body = rule(ClassBody.class).sep("{").option(member)
                            .repeat(rule().sep(";", Token.EOL).option(member))
                            .sep("}");
    Parser defclass = rule(ClassStmnt.class).sep("class").identifier(reserved)