code: @Override
      public final boolean incrementToken() throws IOException {
  
  
          if (!done) {
              if (readTerm()) return true;
          }
  
          if (done) {
              resetVariable();
              if (!input.incrementToken()) {
                  return false;
              }
              done = false;
          }
          readTerm();
          return true;
      }
docs: TODO refactor, merge code