projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename Node->StateNode
[sbp.git]
/
src
/
edu
/
berkeley
/
sbp
/
Parser.java
diff --git
a/src/edu/berkeley/sbp/Parser.java
b/src/edu/berkeley/sbp/Parser.java
index
95e3ba5
..
e5cd67c
100644
(file)
--- a/
src/edu/berkeley/sbp/Parser.java
+++ b/
src/edu/berkeley/sbp/Parser.java
@@
-296,7
+296,7
@@
public abstract class Parser<Token, NodeType> implements Serializable {
* possible from it
*
* A state corresponds to a set of Sequence.Pos's. Each
* possible from it
*
* A state corresponds to a set of Sequence.Pos's. Each
- * Node in the GSS has a State; the Node represents a set of
+ * StateNode in the GSS has a State; the StateNode represents a set of
* possible parses, one for each Pos in the State.
*
* Every state is either "doomed" or "normal". If a Pos
* possible parses, one for each Pos in the State.
*
* Every state is either "doomed" or "normal". If a Pos
@@
-311,10
+311,10
@@
public abstract class Parser<Token, NodeType> implements Serializable {
* Nodes with non-doomed states represent nodes which
* contribute to actual valid parses. Nodes with doomed
* States exist for no other purpose than to enable/disable
* Nodes with non-doomed states represent nodes which
* contribute to actual valid parses. Nodes with doomed
* States exist for no other purpose than to enable/disable
- * some future reduction from a non-doomed Node. Because of
+ * some future reduction from a non-doomed StateNode. Because of
* this, we "garbage-collect" Nodes with doomed states if
* there are no more non-doomed Nodes which they could
* this, we "garbage-collect" Nodes with doomed states if
* there are no more non-doomed Nodes which they could
- * affect (see Result, Reduction, and Node for details).
+ * affect (see Result, Reduction, and StateNode for details).
*
* Without this optimization, many seemingly-innocuous uses
* of positive and negative conjuncts can trigger O(n^2)
*
* Without this optimization, many seemingly-innocuous uses
* of positive and negative conjuncts can trigger O(n^2)
@@
-347,14
+347,14
@@
public abstract class Parser<Token, NodeType> implements Serializable {
Iterable<Pos> positions() { return hs; }
boolean canShift(Token t) { return oshifts!=null && oshifts.contains(t); }
Iterable<Pos> positions() { return hs; }
boolean canShift(Token t) { return oshifts!=null && oshifts.contains(t); }
- void invokeShifts(Token t, GSS.Phase phase, Node pred, Forest f) { oshifts.invoke(t, phase, pred, f); }
+ void invokeShifts(Token t, GSS.Phase phase, StateNode pred, Forest f) { oshifts.invoke(t, phase, pred, f); }
boolean canReduce(Token t) {
return oreductions != null && (t==null ? eofReductions.size()>0 : oreductions.contains(t)); }
boolean canReduce(Token t) {
return oreductions != null && (t==null ? eofReductions.size()>0 : oreductions.contains(t)); }
- void invokeEpsilonReductions(Token t, Node node) {
+ void invokeEpsilonReductions(Token t, StateNode node) {
if (t==null) for(Pos r : eofReductions) node.invoke(r, null, null);
else oreductions.invoke(t, node, null, null);
}
if (t==null) for(Pos r : eofReductions) node.invoke(r, null, null);
else oreductions.invoke(t, node, null, null);
}
- void invokeReductions(Token t, Node node, Result b) {
+ void invokeReductions(Token t, StateNode node, Result b) {
if (t==null) for(Pos r : eofReductions) node.invoke(r, b, null);
else oreductions.invoke(t, node, b, null);
}
if (t==null) for(Pos r : eofReductions) node.invoke(r, b, null);
else oreductions.invoke(t, node, b, null);
}