Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Reusable Analysis
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
Reusable Analysis
Commits
2184c802
Commit
2184c802
authored
5 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
move ast to relast
extract helper class
parent
60a713e9
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
reusablecfg/build.gradle
+2
-2
2 additions, 2 deletions
reusablecfg/build.gradle
reusablecfg/src/main/jastadd/CFG.relast
+0
-0
0 additions, 0 deletions
reusablecfg/src/main/jastadd/CFG.relast
reusablecfg/src/main/jastadd/SimpleCFG.jrag
+0
-100
0 additions, 100 deletions
reusablecfg/src/main/jastadd/SimpleCFG.jrag
with
2 additions
and
102 deletions
reusablecfg/build.gradle
+
2
−
2
View file @
2184c802
...
@@ -129,7 +129,7 @@ task preprocess(type: JavaExec) {
...
@@ -129,7 +129,7 @@ task preprocess(type: JavaExec) {
args
=
[
args
=
[
"../tools/relast.jar"
,
"../tools/relast.jar"
,
"src/main/jastadd/CFG.ast"
,
"src/main/jastadd/CFG.
rel
ast"
,
"src/main/jastadd/ClassPathFilter.ast"
,
"src/main/jastadd/ClassPathFilter.ast"
,
"../extendj/java8/grammar/ConstructorReference.ast"
,
"../extendj/java8/grammar/ConstructorReference.ast"
,
"../extendj/java8/grammar/IntersectionCasts.ast"
,
"../extendj/java8/grammar/IntersectionCasts.ast"
,
...
@@ -163,7 +163,7 @@ task preprocess(type: JavaExec) {
...
@@ -163,7 +163,7 @@ task preprocess(type: JavaExec) {
]
]
inputs
.
files
file
(
"../extendj/java8/grammar/ConstructorReference.ast"
),
inputs
.
files
file
(
"../extendj/java8/grammar/ConstructorReference.ast"
),
file
(
"src/main/jastadd/CFG.ast"
),
file
(
"src/main/jastadd/CFG.
rel
ast"
),
file
(
"src/main/jastadd/ClassPathFilter.ast"
),
file
(
"src/main/jastadd/ClassPathFilter.ast"
),
file
(
"../extendj/java8/grammar/IntersectionCasts.ast"
),
file
(
"../extendj/java8/grammar/IntersectionCasts.ast"
),
file
(
"../extendj/java8/grammar/Lambda.ast"
),
file
(
"../extendj/java8/grammar/Lambda.ast"
),
...
...
This diff is collapsed.
Click to expand it.
reusablecfg/src/main/jastadd/CFG.ast
→
reusablecfg/src/main/jastadd/CFG.
rel
ast
+
0
−
0
View file @
2184c802
File moved
This diff is collapsed.
Click to expand it.
reusablecfg/src/main/jastadd/SimpleCFG.jrag
+
0
−
100
View file @
2184c802
...
@@ -59,106 +59,6 @@ aspect SimpleCFG {
...
@@ -59,106 +59,6 @@ aspect SimpleCFG {
eq CfgMarker.successors() = succ();
eq CfgMarker.successors() = succ();
/**
* Set that contains either one or two unique objects. The objects are
* compared with reference equality.
*/
class IdentityTupleSet<E> implements Set<E> {
final E a, b;
public IdentityTupleSet(E a, E b) {
this.a = a;
this.b = b;
}
@Override
public boolean add(E e) {
throw new UnsupportedOperationException();
}
@Override
public boolean addAll(Collection<? extends E> e) {
throw new UnsupportedOperationException();
}
@Override
public void clear() {
throw new UnsupportedOperationException();
}
@Override
public boolean contains(Object o) {
return o == a || o == b;
}
@Override
public boolean containsAll(Collection<?> c) {
for (Object o : c) {
if (!contains(o)) {
return false;
}
}
return true;
}
@Override
public int hashCode() {
return a.hashCode() + b.hashCode();
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public Iterator<E> iterator() {
return new Iterator<E>() {
int index = 0;
@Override
public boolean hasNext() {
return (a == b && index < 1)
|| (a != b && index < 2);
}
@Override
public E next() {
return ++index == 1 ? a : b;
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
@Override
public boolean remove(Object o) {
throw new UnsupportedOperationException();
}
@Override
public boolean removeAll(Collection<?> c) {
throw new UnsupportedOperationException();
}
@Override
public boolean retainAll(Collection<?> c) {
throw new UnsupportedOperationException();
}
@Override
public int size() {
return a == b ? 1 : 2;
}
@Override
public Object[] toArray() {
return new Object[] { a, b };
}
@Override
public <T> T[] toArray(T[] array) {
array[0] = (T) a;
array[1] = (T) b;
return array;
}
@Override
public String toString() {
if (a == b) {
return "[" + a + "]";
} else {
return "[" + a + ", " + b + "]";
}
}
}
/** Successors to this branch node. */
/** Successors to this branch node. */
inh Set<? extends CfgNode> CfgBranch.succ();
inh Set<? extends CfgNode> CfgBranch.succ();
...
...
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