def get_executables(rule_name, rule):
    """For every possible fallback, yield: alias, file match, fallback"""
    if 'fallback' in rule:
        yield rule_name, rule_name, rule['fallback']
        if 'alias' in rule:
            yield rule['alias'], rule_name, rule['fallback']
    elif 'executables' in rule:
        for entry in rule['executables']:
            if 'match' in entry and 'fallback' in entry:
                yield entry['match'], entry['match'], entry['fallback']
                if 'alias' in entry:
                    yield entry['alias'], entry['match'], entry['fallback']
