   }
 
   func inSetLowerCaseMinus() -> FileGlobTokenType {
-    if stream.eatMinus() && stream.matchLowerCase() >= 0 {
+    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 {
-    if stream.eatMinus() && stream.matchUpperCase() >= 0 {
+    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 {
-    if stream.eatMinus() && stream.matchDigit() >= 0 {
+    stream.eatMinus()
+    if stream.matchDigit() >= 0 {
       status.tokenizer = T.SetMinusChar
       return .SymMinusSet
-    }
-    return inText()
+    } 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 {

        return inOptionalName()
      case .OptionalNameMaybeEmpty:
        return inOptionalNameMaybeEmpty()
      case .SetMinusChar:
        return inSetMinusChar()
      case .SetLowerCaseMinus:

  case OptionalNameComma
  case OptionalName
  case OptionalNameMaybeEmpty
  case SetChar
  case SetClose
  case SetMinusChar
  case SetLowerCaseMinus
  case SetUpperCaseMinus
