       status.tokenizer = T.Body
       return .SymCBSet
     } else if stream.eatLowerCase() {
-      if stream.matchMinus() {
-        status.tokenizer = T.SetLowerCaseMinus
-        return .SetLowerChar
-      }
-      return inText()
+      return handleFirstSetChar(T.SetLowerCaseMinus, type: .SetLowerChar)
     } else if stream.eatUpperCase() {
-      if stream.matchMinus() {
-        status.tokenizer = T.SetUpperCaseMinus
-        return .SetUpperChar
-      }
-      return inText()
+      return handleFirstSetChar(T.SetUpperCaseMinus, type: .SetUpperChar)
     } else if stream.eatDigit() {
-      if stream.matchMinus() {
-        status.tokenizer = T.SetDigitMinus
-        return .SetDigitChar
-      }
-      return inText()
+      return handleFirstSetChar(T.SetDigitMinus, type: .SetDigitChar)
     } else if stream.next() != nil {
       return .Name
     }

    return inOptionalName()
  }

  func inSetMinusChar() -> FileGlobTokenType {
    stream.next()
    status.tokenizer = T.Set

  }

  func inSetLowerCaseMinus() -> FileGlobTokenType {
    stream.eatMinus()
    if stream.matchLowerCase() >= 0 {
      status.tokenizer = T.SetMinusChar
      return .SymMinusSet
    } else if stream.matchCloseBracket() {
      status.tokenizer = T.SetClose
      return .SetChar
    }
    return inText()
  }

  func inSetUpperCaseMinus() -> FileGlobTokenType {
    stream.eatMinus()
    if stream.matchUpperCase() >= 0 {
      status.tokenizer = T.SetMinusChar
      return .SymMinusSet
    } else if stream.matchCloseBracket() {
      status.tokenizer = T.SetClose
      return .SetChar
    }
    return inText()
  }

  func inSetDigitMinus() -> FileGlobTokenType {
    stream.eatMinus()
    if stream.matchDigit() >= 0 {
      status.tokenizer = T.SetMinusChar
      return .SymMinusSet
    } else if stream.matchCloseBracket() {
      status.tokenizer = T.SetClose
      return .SetChar
    }
    return inText()
  }

  func handleFirstSetChar(t: Tokenizer, type: FileGlobTokenType)
      -> FileGlobTokenType {
    if stream.matchMinus() {
      status.tokenizer = t
      return type
    } else if stream.matchCloseBracket() {
      status.tokenizer = T.SetClose
      return .SetChar
    }
    status.tokenizer = T.SetChar
    return .SetChar
  }

  func inSet() -> FileGlobTokenType {
