X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2Fmisc%2FCartesianInput.java;fp=src%2Fedu%2Fberkeley%2Fsbp%2Fmisc%2FCartesianInput.java;h=3af71f1b96e7fbf82de203e5c000c253cf99e68f;hb=ac3843911c47a601ffd679d2e075b519d3a18d6a;hp=a78df9a5bcaf896fd39861e3f765c12497d0b2d1;hpb=e74711e9cb411d80137ebd1f8d9b3bc9a0886f60;p=sbp.git diff --git a/src/edu/berkeley/sbp/misc/CartesianInput.java b/src/edu/berkeley/sbp/misc/CartesianInput.java index a78df9a..3af71f1 100644 --- a/src/edu/berkeley/sbp/misc/CartesianInput.java +++ b/src/edu/berkeley/sbp/misc/CartesianInput.java @@ -13,12 +13,12 @@ public abstract class CartesianInput implements Input { 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 implements Input { } else { col++; } - location = new CartesianLocation(line, col); + location = new Input.Location.Cartesian(col, line); return t; } }