Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OwlCompiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Nilsson
OwlCompiler
Commits
1b7f8f43
Commit
1b7f8f43
authored
11 years ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
Trying to fix bitrot
parent
1c17b2cb
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CompilerGeneration.jrag
+2
-0
2 additions, 0 deletions
CompilerGeneration.jrag
Names.jrag
+1
-1
1 addition, 1 deletion
Names.jrag
Rewrites.jrag
+23
-15
23 additions, 15 deletions
Rewrites.jrag
with
26 additions
and
16 deletions
CompilerGeneration.jrag
+
2
−
0
View file @
1b7f8f43
...
@@ -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(" ::=");
...
...
This diff is collapsed.
Click to expand it.
Names.jrag
+
1
−
1
View file @
1b7f8f43
/* -*-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.
*
*
...
...
This diff is collapsed.
Click to expand it.
Rewrites.jrag
+
23
−
15
View file @
1b7f8f43
...
@@ -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())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment