From fdd72990fe6afa70b3acd09653e821bac0776cc4 Mon Sep 17 00:00:00 2001 From: Anders Nilsson <andersn@fiol> Date: Mon, 13 Feb 2006 10:31:25 +0100 Subject: [PATCH] Made it compile again. Will throw Exception though when run. --- .bzrignore | 1 + CompilerGeneration.jrag | 2 +- Rewrites.jrag | 10 ++++++++++ build.xml | 6 ++++++ owl.ast | 8 +++++++- 5 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 Rewrites.jrag diff --git a/.bzrignore b/.bzrignore index 03c15cc..db4cb17 100644 --- a/.bzrignore +++ b/.bzrignore @@ -2,3 +2,4 @@ parser/semantic.cache AST *.class +semantic.cache diff --git a/CompilerGeneration.jrag b/CompilerGeneration.jrag index aacdcba..a4c7a3c 100644 --- a/CompilerGeneration.jrag +++ b/CompilerGeneration.jrag @@ -19,5 +19,5 @@ aspect CompilerGeneration { } aspect Name { - syn String Element +// syn String Element } \ No newline at end of file diff --git a/Rewrites.jrag b/Rewrites.jrag new file mode 100644 index 0000000..8713d33 --- /dev/null +++ b/Rewrites.jrag @@ -0,0 +1,10 @@ +/* -*-Java-*- */ + +aspect RewriteClasses { +// rewrite OwlClass { +// when (isTopLevel()) +// to OwlClassDecl { + +// } +// } +} \ No newline at end of file diff --git a/build.xml b/build.xml index 8b773ac..a0c5b6c 100644 --- a/build.xml +++ b/build.xml @@ -83,6 +83,12 @@ <!-- <beaver file="parser/JavaParser.beaver" terminalNames="yes" compress="no" useSwitch="yes"/> --> </target> + <target name="test" depends="build"> + <java classname="GenCompiler" classpath="."> + <arg value="GripperOntology_experimental3.owl" /> + </java> + </target> + <!-- remove generated source files and .class files --> <target name="clean" depends="cleanGen"> <!-- delete all .class files recursively --> diff --git a/owl.ast b/owl.ast index fcd4326..410d028 100644 --- a/owl.ast +++ b/owl.ast @@ -48,4 +48,10 @@ XmlnsXsd : Attribute; XmlnsRdfs : Attribute; XmlnsOwl : Attribute; -Value ::= <STRING_LITERAL>; \ No newline at end of file +Value ::= <STRING_LITERAL>; + + +// Types generated by rewrite rules +abstract Class; +OwlClassDecl : Class ::= <Id:String> ; +OwlClassUse : Class ::= <Id:String> ; -- GitLab