Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
XMLSchemaCompiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
XMLSchemaCompiler
Commits
9308d174
Commit
9308d174
authored
15 years ago
by
Anders Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Added workarounds for JavaCC-related bugs in latest JastAdd.
parent
406f14dc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
WorkArounds.jrag
+15
-0
15 additions, 0 deletions
WorkArounds.jrag
examples/actors/xdf/MergeActors.jrag
+8
-1
8 additions, 1 deletion
examples/actors/xdf/MergeActors.jrag
examples/actors/xlim/Merge.jrag
+36
-0
36 additions, 0 deletions
examples/actors/xlim/Merge.jrag
with
59 additions
and
1 deletion
WorkArounds.jrag
0 → 100644
+
15
−
0
View file @
9308d174
/* -*-Java-*- */
/*
* Copyright (C) 2007 Anders Nilsson <anders.nilsson@cs.lth.se>
*
* This file is part of XmlSchemaCompiler.
*/
aspect Fixes {
int ASTNode.numChildren;
int ASTNode.numChildren() {return jjtGetNumChildren();}
int List.getNumNoTransformChild() {return getNumChildNoTransform();}
int Opt.getNumChildNoTransfrom() {return getNumChildNoTransform();}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
examples/actors/xdf/MergeActors.jrag
+
8
−
1
View file @
9308d174
...
...
@@ -40,6 +40,8 @@ aspect MergeActors {
}
i.merge(i.next);
i.setName(i.name()+"_"+i.next.name());
i.next.remove_me = true;
i.next.is$Final(false);
i.next = i.next.next;
}
}
...
...
@@ -73,11 +75,16 @@ aspect Misc {
}
aspect Rewrites {
boolean Co
nnection
.remove_me = false;
boolean Co
mplexElement
.remove_me = false;
rewrite Connection {
when (remove_me) to ComplexElement {
return new ComplexElement();
}
}
rewrite Instance
when (remove_me) to ComplexElement {
return new ComplexElement();
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
examples/actors/xlim/Merge.jrag
0 → 100644
+
36
−
0
View file @
9308d174
/* -*-Java-*- */
/*
* Copyright (C) 2009 Anders Nilsson <anders.nilsson@cs.lth.se>
*
* This file is part of Actors model compiler.
*/
import java.util.HashSet;
aspect Merge {
public void design.merge(design dest) {
HashSet<operation> ops = getOperations(new HashSet<operation>());
for (Element e : getElements()) {
if (e.isAction()) {
for (operation o : ops) {
((module) e).addElement(o);
}
}
}
}
}
aspect Operations {
syn HashSet<operation> Element.getOperations(HashSet<operation> ops) = ops;
eq ComplexElement.getOperations(HashSet<operation> ops) {
for (Element e : getElements()) {
ops = e.getOperations(ops);
}
return ops;
}
eq operation.getOperations(HashSet<operation> ops) {
ops.add(this);
return ops;
}
}
\ No newline at end of file
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