Gitlab service upgraded. Please report any problems to dl_gitadmin@cs.lth.se

Commit a0328cb9 authored by Anders Nilsson's avatar Anders Nilsson

New jastadd version

parent 79fa36af
......@@ -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);
// }
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment