             }
         }
         strings += str
+    }
+    func push(var strings: String) -> (String, String) {
+        let result = strings[strings.startIndex..<strings.startIndex.successor()]
+        strings.removeAtIndex(strings.startIndex)
+        return (result, strings)
     }
     func slishWord(regular: String) -> (RegularBase, String) {
         var (next, r) = self.push(regular)

        while (0 < regular.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)) {
            var (s, r) = self.push(regular)
            regular = r
        }
    }
    func push(var strings: String) -> (String, String) {
        let result = strings[strings.startIndex..<strings.startIndex.successor()]
        strings.removeAtIndex(strings.startIndex)
        return (result, strings)
    }
    /*
    NSString *result = [string substringToIndex:1];
    [string deleteCharactersInRange:(NSRange){0, 1}];
    return result;
    }
    
    str = [NSMutableArray array];
    while (regular.length != 0) {
    NSMutableString *s = [self push:regular].mutableCopy;
    if ([s isEqualToString:@"\\"]) {
    id next = [self slishWord:regular];
    if ([next isKindOfClass:[NSMutableString class]]) {
    [str addObject:[RegularOneString generat:s]];
    [str addObject:[RegularOneString generat:next]];
    } else {
    [str addObject:next];
    }
    } else if ([s isEqualToString:@"*"]) {
    str[str.count - 1] = [RegularRepeatZero generat:str.lastObject];
    } else if ([s isEqualToString:@"+"]) {
    str[str.count - 1] = [RegularRepeatOne generat:str.lastObject];
    } else if ([s isEqualToString:@"?"]) {
    str[str.count - 1] = [RegularQuestion generat:str.lastObject];
    } else if ([s isEqualToString:@"."]){
    [str addObject:[RegularAll generat]];
    } else if ([s isEqualToString:@"("]) {
    [str addObject:[RegularGroupStart generate]];
    } else if ([s isEqualToString:@"|"]) {
    [str addObject:[RegularOR generate]];
    } else if ([s isEqualToString:@")"]) {
    NSInteger i = str.count - 1;
    for (; 0 <= i; i--) {
    if ([str[i] isKindOfClass:[RegularGroupStart class]]) {
    break;
    }
    }
    [str removeObjectAtIndex:i];
    NSRange renge = (NSRange){i, str.count - i};
    NSArray *group = [str subarrayWithRange:renge];
    [str removeObjectsInRange:renge];
    [str addObject:[RegularGroup generate:group]];
    } else {
    [str addObject:[RegularOneString generat:s]];
    }
*/
    func spliteOr() {
        for var i = 0, _len = str.count; i < _len ; i++ {
            var regular = str[i]

        case "\\":
            return (RegularBackslash(), r)
        default:
            return (RegularOneString(string: next), r);
        }
    }
}

class RegularOr: RegularBase {
}
class RegularOneString: RegularBase {
    let s: String
    init(string: String) {
        s = string
        super.init()
    }
}
class RegularWord: RegularBase {
    override init() {
        super.init()
    }
}
class RegularAlphabet: RegularWord {
}
class RegularWords: RegularWord {
}
class RegularSpaceSet: RegularWord {
}
class RegularHorizontalTab: RegularWord {
}
class RegularVerticalTab: RegularWord {
}
class RegularNewline: RegularWord {
}
class RegularReturn: RegularWord {
}
class RegularBackSpace: RegularWord {
}
class RegularFormFeed: RegularWord {
}
class RegularBell: RegularWord {
}
class RegularEscape: RegularWord {
}
class RegularNumber: RegularWord {
}
class RegularBackslash: RegularWord {
}
class RegularRepeat: RegularBase {
    let r: RegularBase
    init(regular :RegularBase) {
        r = regular
        super.init()
    }
}
class RegularRepeatZero: RegularRepeat {
}
class RegularRepeatOne: RegularRepeat {
}
class RegularQuestion: RegularRepeat {
}
class RegularAll: RegularBase {
}
class RegularGroupStart: RegularBase {
}
class RegularOR: RegularBase {
}
class RegularGroup: RegularBase {
    let group: Array<RegularBase>
    init(group: Array<RegularBase>) {
        self.group = group
        super.init()
    }
}

/*

@implementation RegularOneString {
    NSString *string;
