diff --git a/CompilerGeneration.jrag b/CompilerGeneration.jrag
index 1e3f6a0f4f0902010cd6ca3b3bffb05cf26c1d30..8a31bd5906336d8e11822a4d48abb73cec251dd4 100644
--- a/CompilerGeneration.jrag
+++ b/CompilerGeneration.jrag
@@ -32,6 +32,15 @@ aspect Misc {
     }
 }
 
+aspect Subclasses {
+	static int Element.superClassNum = 0;
+	inh String Element.superClass();
+	// eq ComplexElement.getElement().superClass();
+	eq Start.getSpecification().superClass() = "ComplexElement";
+	// eq XsChoice.getElement(int i).superClass() = "Choice_"+superClassNum;
+	// eq XsSequence.getElement(int i).superClass() = "Choice_"+superClassNum;
+}
+
 aspect AbsGrammarGeneration {
     void ASTNode.genAbsGrammar(PrintStream pStream) {
 		for (int i=0; i<getNumChild(); i++) {
@@ -82,7 +91,7 @@ aspect AbsGrammarGeneration {
     void XsElement.genAbsGrammar(PrintStream pStream) {
         if (hasName()) { // If not, it's just a reference to an element declaration
             String name = fixName(name());
-            pStream.print(name + " : ComplexElement ::= ");
+            pStream.print(name + " : "+superClass()+" ::= ");
 			// for (Element e : getElements()) {
 			// 	e.genAbsGrammarNTA(pStream);
 			// }
diff --git a/tools/jastadd2.jar b/tools/jastadd2.jar
index 986eb3c61a4a8eb33929f73f5a135f5e7eac87c2..85492e57ab383c6e8c70567858d727b6c6cd7a19 100644
Binary files a/tools/jastadd2.jar and b/tools/jastadd2.jar differ