def _platform_patterns(self, platform='generic', compiled=False):
        """Return all the patterns for specific platform."""
        patterns = self._dict_compiled.get(platform, None) if compiled else self._dict_text.get(platform, None)
        if patterns is None:
            raise KeyError("Unknown platform: {}".format(platform))
        return patterns