yay, new boolean resolution approach works
[sbp.git] / src / edu / berkeley / sbp / tib / Tib.java
index 9ec8bd8..401d9c0 100644 (file)
@@ -50,8 +50,8 @@ public class Tib implements Token.Stream<CharToken> {
     boolean indenting = true;
     int indentation = 0;
     private ArrayList<Integer> istack = new ArrayList<Integer>();
-    public CharToken next(int numstates) throws IOException {
-        CharToken ret = nextc(numstates);
+    public CharToken next(int numstates, int resets, int waits) throws IOException {
+        CharToken ret = nextc(numstates, resets);
         if      (ret==CharToken.left)  System.out.print("\033[31m{\033[0m");
         else if (ret==CharToken.right) System.out.print("\033[31m}\033[0m");
         else if (ret==null) return null;
@@ -60,7 +60,7 @@ public class Tib implements Token.Stream<CharToken> {
     }
 
     CharToken waitingBrace = null;
-    public CharToken nextc(int numstates) throws IOException {
+    public CharToken nextc(int numstates, int resets) throws IOException {
         char c;
         if (waitingBrace != null) {
             CharToken ret = waitingBrace;
@@ -85,7 +85,7 @@ public class Tib implements Token.Stream<CharToken> {
         else         _col++;
         if (indenting) {
             if (c==' ') { indentation++; return done(c); }
-            if (c=='\n') { indentation = 0; if (blank) return nextc(numstates); blank = true; waiting = true; waitingChar='\n'; return new CharToken('\n'); }
+            if (c=='\n') { indentation = 0; if (blank) return nextc(numstates, resets); blank = true; waiting = true; waitingChar='\n'; return new CharToken('\n'); }
             int last = istack.size()==0 ? -1 : istack.get(istack.size()-1);
             if (indentation==last) {
                 if (blank) {