Skip to content
Snippets Groups Projects
Commit 1b7f8f43 authored by Administrator's avatar Administrator
Browse files

Trying to fix bitrot

parent 1c17b2cb
No related branches found
No related tags found
No related merge requests found
...@@ -102,6 +102,8 @@ aspect AbsGrammarGeneration { ...@@ -102,6 +102,8 @@ aspect AbsGrammarGeneration {
// Thing is handled explicitly // Thing is handled explicitly
return; return;
} }
System.out.println(name());
dumpTree(" ",System.out);
pStream.print(name()); pStream.print(name());
pStream.print(" : "+getSuperClass().name()); pStream.print(" : "+getSuperClass().name());
pStream.print(" ::="); pStream.print(" ::=");
......
/* -*-Java-*- */ /* -*-Java-*- */
/* /*
* Copyright (C) 2006,2010 Anders Nilsson <anders.nilsson@control.lth.se> * Copyright (C) 2006,2010,2014 Anders Nilsson <anders.nilsson@control.lth.se>
* *
* This file is part of OntologyCompiler. * This file is part of OntologyCompiler.
* *
......
...@@ -30,6 +30,7 @@ aspect MiscUtilities { ...@@ -30,6 +30,7 @@ aspect MiscUtilities {
syn lazy String Attribute.trim() { syn lazy String Attribute.trim() {
String s = getValue().getSTRING_LITERAL(); String s = getValue().getSTRING_LITERAL();
s.replaceAll("&iml;","");
if (s.indexOf('"') == 0) { if (s.indexOf('"') == 0) {
s = s.substring(1,s.length()-1).trim(); s = s.substring(1,s.length()-1).trim();
} }
...@@ -226,7 +227,12 @@ aspect MiscUtilities { ...@@ -226,7 +227,12 @@ aspect MiscUtilities {
return (ComplexElement) e; return (ComplexElement) e;
} }
syn boolean Declaration.isClassDecl() = getElement(0).isClass(); syn boolean Declaration.isClassDecl() {
dumpTree(" ",System.out);
return getElement(0).isClass();
}
eq OwlClassDecl.isClassDecl() = true;
eq OwlClassUse.isClassDecl() = false;
eq ClassDeclaration.isClassDecl() = false; eq ClassDeclaration.isClassDecl() = false;
eq IndividualDeclaration.isClassDecl() = false; eq IndividualDeclaration.isClassDecl() = false;
syn boolean Declaration.isIndividualDecl() = getElement(0).isIndividual(); syn boolean Declaration.isIndividualDecl() = getElement(0).isIndividual();
...@@ -243,20 +249,22 @@ aspect MiscUtilities { ...@@ -243,20 +249,22 @@ aspect MiscUtilities {
aspect RewriteClasses { aspect RewriteClasses {
rewrite Declaration { // rewrite OClass {
when (isClassDecl()) // when (isClassDecl())
to ClassDeclaration { // to ClassDeclaration {
ClassDeclaration c = new ClassDeclaration(); // System.out.println(getId());
c.setElementList(getElementList()); // ClassDeclaration c = new ClassDeclaration();
return c;
}
// when (isIndividualDecl())
// to IndividualDeclaration {
// IndividualDeclaration c = new IndividualDeclaration();
// c.setElementList(getElementList()); // c.setElementList(getElementList());
// c.setAttributeList(getAttributeList());
// return c; // return c;
// } // }
} // // when (isIndividualDecl())
// // to IndividualDeclaration {
// // IndividualDeclaration c = new IndividualDeclaration();
// // c.setElementList(getElementList());
// // return c;
// // }
// }
rewrite OwlClass { rewrite OwlClass {
when (isTopLevel()) when (isTopLevel())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment