From 03cfb563262d56f685cdd0feab54d748a4f8c999 Mon Sep 17 00:00:00 2001 From: Anders Nilsson <anders.nilsson@cs.lth.se> Date: Wed, 6 Dec 2006 15:51:52 +0100 Subject: [PATCH] Some fixes to be able to parse full v08a.owl. Still crashes though --- .bzrignore | 2 ++ CompilerGeneration.jrag | 3 +++ siaras/Siaras.jjt | 10 ++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.bzrignore b/.bzrignore index 4266a76..8e820b5 100644 --- a/.bzrignore +++ b/.bzrignore @@ -10,3 +10,5 @@ siaras/Siaras.ast siaras/log.tmp *Jambalaya.properties siaras/GeneratedAspects.jrag +testontologies/*.xmi +testontologies/*.pprj diff --git a/CompilerGeneration.jrag b/CompilerGeneration.jrag index ce6772f..39fb59c 100644 --- a/CompilerGeneration.jrag +++ b/CompilerGeneration.jrag @@ -213,6 +213,7 @@ aspect GenRewrites { public void OwlClassDecl.genRewrites(PrintStream pStream) { String ind = " "; int ix = 0; + // Specialize ComplexElements to the actual class in the ontology pStream.println(ind(1)+"rewrite ComplexElement {"); pStream.println(ind(2)+"when (getOwlIdentifier().getIDENTIFIER().equals(\""+ name()+"\") && !(this instanceof Thing))"); @@ -250,6 +251,8 @@ aspect GenRewrites { pStream.println(ind(3)+"return node;"); pStream.println(ind(2)+"}"); pStream.println(ind(1)+"}"); + // Rearrange device nodes on the AST to get away from the + // current diagonal style from Protege } } diff --git a/siaras/Siaras.jjt b/siaras/Siaras.jjt index 55d562f..47f2cd1 100644 --- a/siaras/Siaras.jjt +++ b/siaras/Siaras.jjt @@ -175,7 +175,7 @@ SPECIAL_TOKEN : /* COMMENTS */ <DEFAULT, BOUNDS> TOKEN : /* IDENTIFIERS */ { - < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* > + < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>|":")* > | < #LETTER: [ @@ -194,7 +194,9 @@ SPECIAL_TOKEN : /* COMMENTS */ "\uf900"-"\ufaff", "+", "-", - "/" + "/", + ",", + "." ] > | @@ -228,8 +230,8 @@ SPECIAL_TOKEN : /* COMMENTS */ | < LBRACKET : "[" > | < RBRACKET : "]" > | < SEMICOLON : ";" > - | < COMMA : "," > - | < DOT : "." > +// | < COMMA : "," > +// | < DOT : "." > }// SEPARATORS -- GitLab