Skip to content
Snippets Groups Projects
Commit a0328cb9 authored by Anders Nilsson's avatar Anders Nilsson
Browse files

New jastadd version

parent 79fa36af
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment