checkpoint
[sbp.git] / src / edu / berkeley / sbp / misc / CartesianInput.java
index a78df9a..3af71f1 100644 (file)
@@ -13,12 +13,12 @@ public abstract class CartesianInput<Token> implements Input<Token> {
     public abstract boolean isCR();
 
     long then = 0;
-    private CartesianLocation location = new CartesianLocation(1, 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.line;
-        int col   = location.col;
+        int line  = location.getRow();
+        int col   = location.getCol();
         Token t = next();
         if (t==null) return null;
         String s = "  line "+line+", col " + col;
@@ -35,7 +35,7 @@ public abstract class CartesianInput<Token> implements Input<Token> {
         } else {
             col++;
         }
-        location = new CartesianLocation(line, col);
+        location = new Input.Location.Cartesian(col, line);
         return t;
     }
 }