projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no longer need to thread a Grammar through Parser.Table
[sbp.git]
/
src
/
edu
/
berkeley
/
sbp
/
Result.java
diff --git
a/src/edu/berkeley/sbp/Result.java
b/src/edu/berkeley/sbp/Result.java
index
d333f41
..
6054fa1
100644
(file)
--- a/
src/edu/berkeley/sbp/Result.java
+++ b/
src/edu/berkeley/sbp/Result.java
@@
-1,8
+1,9
@@
-// Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
+// Copyright 2006-2007 all rights reserved; see LICENSE file for BSD-style license
package edu.berkeley.sbp;
import edu.berkeley.sbp.util.*;
package edu.berkeley.sbp;
import edu.berkeley.sbp.util.*;
-import edu.berkeley.sbp.Sequence.Position;
+import edu.berkeley.sbp.Sequence.Pos;
+import edu.berkeley.sbp.Sequence.Pos;
import java.util.*;
final class Result implements GraphViz.ToGraphViz {
import java.util.*;
final class Result implements GraphViz.ToGraphViz {
@@
-40,21
+41,21
@@
final class Result implements GraphViz.ToGraphViz {
parent.removeChild(this);
while(children.size() > 0)
for(Node n : children) {
parent.removeChild(this);
while(children.size() > 0)
for(Node n : children) {
- children.remove(n);
+ removeChild(n);
n.removeResult(this);
break;
}
}
n.removeResult(this);
break;
}
}
- public Result(Forest f, Node parent, Position reduction) {
+ public Result(Forest f, Node parent, Pos reduction) {
this(f, parent, reduction, null);
}
this(f, parent, reduction, null);
}
- public Result(Forest f, Node parent, Position reduction, GSS.Phase target) {
+ public Result(Forest f, Node parent, Pos reduction, GSS.Phase target) {
this.f = f;
this.parent = parent;
if (parent != null) parent.addChild(this);
if (reduction == null) return;
this.f = f;
this.parent = parent;
if (parent != null) parent.addChild(this);
if (reduction == null) return;
- Parser.Table.State state0 = (Parser.Table.State)parent.state().gotoSetNonTerminals.get(reduction.owner());
+ Parser.Table.State state0 = (Parser.Table.State)parent.state().gotoSetNonTerminals.get(reduction);
target.newNodeFromReduction(this, state0, reduction);
}
target.newNodeFromReduction(this, state0, reduction);
}