projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactoring to eliminate Token.result()
[sbp.git]
/
src
/
edu
/
berkeley
/
sbp
/
GSS.java
diff --git
a/src/edu/berkeley/sbp/GSS.java
b/src/edu/berkeley/sbp/GSS.java
index
d8c0fd4
..
2d9f6ff
100644
(file)
--- a/
src/edu/berkeley/sbp/GSS.java
+++ b/
src/edu/berkeley/sbp/GSS.java
@@
-123,7
+123,7
@@
class GSS {
}
/** perform all shift operations, adding promoted nodes to <tt>next</tt> */
}
/** perform all shift operations, adding promoted nodes to <tt>next</tt> */
- public void shift(Phase next) {
+ public void shift(Phase next, Forest result) {
closed = true;
Forest res = null;
boolean ok = false;
closed = true;
Forest res = null;
boolean ok = false;
@@
-137,7
+137,7
@@
class GSS {
if (!n.holder.valid()) continue;
if (token == null) continue;
for(Parser.Table.State st : n.state.getShifts(token)) {
if (!n.holder.valid()) continue;
if (token == null) continue;
for(Parser.Table.State st : n.state.getShifts(token)) {
- if (res == null) res = Forest.create(token.getLocation(), token.result(), null, null, false, false);
+ if (res == null) res = result;
next.newNode(n, res, st, true, this);
ok = true;
}
next.newNode(n, res, st, true, this);
ok = true;
}