X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FGSS.java;h=81e4909300a2beaadcf0ffe27624cb17a480040c;hp=7666ec2fccbec02265934bc2a595c25c2cc50c69;hb=c1a7dcf0dd5b839d82215263d0f57470e905a73d;hpb=36d88939587827b1cea9ab842ec70bd168a08be1
diff --git a/src/edu/berkeley/sbp/GSS.java b/src/edu/berkeley/sbp/GSS.java
index 7666ec2..81e4909 100644
--- a/src/edu/berkeley/sbp/GSS.java
+++ b/src/edu/berkeley/sbp/GSS.java
@@ -24,7 +24,7 @@ class GSS {
int numReductions = 0;
/** corresponds to a positions between tokens the input stream; same as Tomita's U_i's */
- class Phase implements Invokable, IntegerMappable, GraphViz.ToGraphViz, Iterable {
+ class Phase implements Invokable, IntegerMappable, GraphViz.ToGraphViz /*, Iterable*/ {
// FIXME: right now, these are the performance bottleneck
private HashMapBag performed = new HashMapBag();
@@ -128,7 +128,7 @@ class GSS {
for(StateNode n : h) n.check();
}
numOldNodes = hash.size();
- for(StateNode n : hash.values()) {
+ for(StateNode n : hash) {
if (token == null && n.state().isAccepting()) {
if (finalResult==null) finalResult = new Forest.Many();
for(ResultNode r : n)
@@ -209,7 +209,7 @@ class GSS {
public int size() { return hash==null ? 0 : hash.size(); }
public int pos() { return pos; }
public Tok getToken() { return token; }
- public Iterator iterator() { return hash.iterator(); }
+ //public Iterator iterator() { return hash.iterator(); }
public GSS getGSS() { return GSS.this; }
// GraphViz //////////////////////////////////////////////////////////////////////////////
@@ -229,8 +229,10 @@ class GSS {
FileOutputStream fos = new FileOutputStream(filename);
PrintWriter p = new PrintWriter(new OutputStreamWriter(fos));
GraphViz gv = new GraphViz();
+ /*
for(Object n : this)
((StateNode)n).toGraphViz(gv);
+ */
gv.dump(p);
p.flush();
p.close();