def get_bbq_patterns(pattern):
    """
    Return union and exception patterns
    """
    tokens = pattern.split(' ')
    bbq_patterns = []
    last_token = '+'
    in_range = True
    for idx, token in enumerate(tokens):
        if token == '+' or token == '-':
            last_token = token
            in_range = False
        else:
            if not in_range or idx == 0:
                bbq_patterns.append(last_token + token)
            else:
                bbq_patterns[-1] = bbq_patterns[-1] + ' ' + token
            in_range = True
    return bbq_patterns
