Commit a0328cb9 authored by Anders Nilsson's avatar Anders Nilsson
Browse files

New jastadd version

parent 79fa36af
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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);
			// }
−9.71 KiB (582 KiB)

File changed.

No diff preview for this file type.