private String convert() {
    pushState(NORMAL);
    for (index = 0; index < glob.length(); index++) {
      currentState().process(this, glob.charAt(index));
    }
    currentState().finish(this);
    return builder.toString();
  }
Converts the glob to a regex one character at a time. A state stack (states) is maintained,
with the state at the top of the stack being the current state at any given time. The current
state is always used to process the next character. When a state processes a character, it may
pop the current state or push a new state as the current state. The resulting regex is written
to {@code builder}.
jimfs/src/main/java/com/google/common/jimfs/GlobToRegex.java