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

Some fixes to be able to parse full v08a.owl. Still crashes though

parent cd2d4ee6
No related branches found
No related tags found
No related merge requests found
...@@ -10,3 +10,5 @@ siaras/Siaras.ast ...@@ -10,3 +10,5 @@ siaras/Siaras.ast
siaras/log.tmp siaras/log.tmp
*Jambalaya.properties *Jambalaya.properties
siaras/GeneratedAspects.jrag siaras/GeneratedAspects.jrag
testontologies/*.xmi
testontologies/*.pprj
...@@ -213,6 +213,7 @@ aspect GenRewrites { ...@@ -213,6 +213,7 @@ aspect GenRewrites {
public void OwlClassDecl.genRewrites(PrintStream pStream) { public void OwlClassDecl.genRewrites(PrintStream pStream) {
String ind = " "; String ind = " ";
int ix = 0; int ix = 0;
// Specialize ComplexElements to the actual class in the ontology
pStream.println(ind(1)+"rewrite ComplexElement {"); pStream.println(ind(1)+"rewrite ComplexElement {");
pStream.println(ind(2)+"when (getOwlIdentifier().getIDENTIFIER().equals(\""+ pStream.println(ind(2)+"when (getOwlIdentifier().getIDENTIFIER().equals(\""+
name()+"\") && !(this instanceof Thing))"); name()+"\") && !(this instanceof Thing))");
...@@ -250,6 +251,8 @@ aspect GenRewrites { ...@@ -250,6 +251,8 @@ aspect GenRewrites {
pStream.println(ind(3)+"return node;"); pStream.println(ind(3)+"return node;");
pStream.println(ind(2)+"}"); pStream.println(ind(2)+"}");
pStream.println(ind(1)+"}"); pStream.println(ind(1)+"}");
// Rearrange device nodes on the AST to get away from the
// current diagonal style from Protege
} }
} }
......
...@@ -175,7 +175,7 @@ SPECIAL_TOKEN : /* COMMENTS */ ...@@ -175,7 +175,7 @@ SPECIAL_TOKEN : /* COMMENTS */
<DEFAULT, BOUNDS> TOKEN : /* IDENTIFIERS */ <DEFAULT, BOUNDS> TOKEN : /* IDENTIFIERS */
{ {
< IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* > < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>|":")* >
| |
< #LETTER: < #LETTER:
[ [
...@@ -194,7 +194,9 @@ SPECIAL_TOKEN : /* COMMENTS */ ...@@ -194,7 +194,9 @@ SPECIAL_TOKEN : /* COMMENTS */
"\uf900"-"\ufaff", "\uf900"-"\ufaff",
"+", "+",
"-", "-",
"/" "/",
",",
"."
] ]
> >
| |
...@@ -228,8 +230,8 @@ SPECIAL_TOKEN : /* COMMENTS */ ...@@ -228,8 +230,8 @@ SPECIAL_TOKEN : /* COMMENTS */
| < LBRACKET : "[" > | < LBRACKET : "[" >
| < RBRACKET : "]" > | < RBRACKET : "]" >
| < SEMICOLON : ";" > | < SEMICOLON : ";" >
| < COMMA : "," > // | < COMMA : "," >
| < DOT : "." > // | < DOT : "." >
}// SEPARATORS }// SEPARATORS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment