private static byte[] buildBitFlags() {
    final byte[] ret = new byte[CHARCNT];
    int index = 0;
    for (int i = 0; i < VALCONST.length; i++) {
      // v represents the roles a character can play.
      final byte v = VALCONST[i];
      // l is the number of consecutive chars that have the same
      // roles 'v'
      int l = LENCONST[i];
      // we need to give the next 'l' chars the role bits 'v'
      while (--l >= 0) {
        ret[index++] = v;
      }
    }
    return ret;
  }
private static byte[] buildBitFlags()