def split_rules(lines):
    """
    Take a list of lines and group them by bunches separated with blank lines
    """
    rule = []
    for l in lines:
        if l:
            rule.append(l)
        elif rule:
            yield rule
            rule = []
    if rule:
        yield rule
