code: def state_category(value):
          
          if value == re.sre_parse.CATEGORY_DIGIT:
              return (yield '0')
  
          if value == re.sre_parse.CATEGORY_WORD:
              return (yield 'x')
docs: Parse categories.