def METHOD_NAME(tokens):
    current = []
    for token in tokens:
        if token.startswith('-') and current:
            yield Subcommand(current[0], current[1], current[2:])
            current = []
        current.append(token)
    if current:
        yield Subcommand(current[0], current[1], current[2:])