checkpoint
[sbp.git] / src / edu / berkeley / sbp / misc / CartesianInput.java
diff --git a/src/edu/berkeley/sbp/misc/CartesianInput.java b/src/edu/berkeley/sbp/misc/CartesianInput.java
deleted file mode 100644 (file)
index 3af71f1..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-package edu.berkeley.sbp.misc;
-import java.io.*;
-import java.util.*;
-import java.lang.reflect.*;
-import java.lang.ref.*;
-import edu.berkeley.sbp.*;
-import edu.berkeley.sbp.Input.Location;
-import edu.berkeley.sbp.util.*;
-
-public abstract class CartesianInput<Token> implements Input<Token> {
-
-    public abstract Token   next() throws IOException;
-    public abstract boolean isCR();
-
-    long then = 0;
-    private Input.Location.Cartesian location = new Input.Location.Cartesian(0, 1);
-    public  Input.Location    getLocation() { return location; }
-
-    public Token next(int numstates, int resets, int waits) throws IOException {
-        int line  = location.getRow();
-        int col   = location.getCol();
-        Token t = next();
-        if (t==null) return null;
-        String s = "  line "+line+", col " + col;
-        while(s.length() < 20) s += " ";
-        s += "[ambiguity level: " + (numstates-1) + "] [resets: " + resets + "] [waits: " + waits + "]";
-        long now = System.currentTimeMillis();
-        if (now-then > 10) {
-            then = now;
-            System.out.print(s + "                                \r");
-        }
-        if (isCR()) { 
-            line++;
-            col = 1;
-        } else {
-            col++;
-        }
-        location = new Input.Location.Cartesian(col, line);
-        return t;
-    }
-}