public boolean matchDigits() {
    int k = idx;
    char c;
    
    while ((c = buf[k]) >= '0' && c <= '9') {
      k++;
    }
    if (k > idx) {
      idx = k;
      return true;
    } else {
      return false;
    }
  }