def state_category(value):
        """Parse categories."""
        if value == re.sre_parse.CATEGORY_DIGIT:
            return (yield '0')

        if value == re.sre_parse.CATEGORY_WORD:
            return (yield 'x')