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

Commit 1b7f8f43 authored by Anders Nilsson's avatar Anders Nilsson

Trying to fix bitrot

parent 1c17b2cb
......@@ -102,6 +102,8 @@ aspect AbsGrammarGeneration {
// Thing is handled explicitly
return;
}
System.out.println(name());
dumpTree(" ",System.out);
pStream.print(name());
pStream.print(" : "+getSuperClass().name());
pStream.print(" ::=");
......
/* -*-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.
*
......
......@@ -30,6 +30,7 @@ aspect MiscUtilities {
syn lazy String Attribute.trim() {
String s = getValue().getSTRING_LITERAL();
s.replaceAll("&iml;","");
if (s.indexOf('"') == 0) {
s = s.substring(1,s.length()-1).trim();
}
......@@ -226,7 +227,12 @@ aspect MiscUtilities {
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 IndividualDeclaration.isClassDecl() = false;
syn boolean Declaration.isIndividualDecl() = getElement(0).isIndividual();
......@@ -243,20 +249,22 @@ aspect MiscUtilities {
aspect RewriteClasses {
rewrite Declaration {
when (isClassDecl())
to ClassDeclaration {
ClassDeclaration c = new ClassDeclaration();
c.setElementList(getElementList());
return c;
}
// when (isIndividualDecl())
// to IndividualDeclaration {
// IndividualDeclaration c = new IndividualDeclaration();
// c.setElementList(getElementList());
// return c;
// }
}
// rewrite OClass {
// when (isClassDecl())
// to ClassDeclaration {
// System.out.println(getId());
// ClassDeclaration c = new ClassDeclaration();
// c.setElementList(getElementList());
// c.setAttributeList(getAttributeList());
// return c;
// }
// // when (isIndividualDecl())
// // to IndividualDeclaration {
// // IndividualDeclaration c = new IndividualDeclaration();
// // c.setElementList(getElementList());
// // return c;
// // }
// }
rewrite OwlClass {
when (isTopLevel())
......
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