code: def _parse_option(cls, token):
          
          description = ""
          validator = None
  
          if " : " in token:
              token, description = tuple(token.split(" : ", 2))
  
              token = token.strip()
  
              description = description.strip()
  
          # Checking validator:
          matches = re.match(r"(.*)\((.*?)\)", token)
          if matches:
              token = matches.group(1).strip()
              validator = matches.group(2).strip()
  
          shortcut = None
  
          matches = re.split(r"\s*\|\s*", token, 2)
  
          if len(matches) > 1:
              shortcut = matches[0].lstrip("-")
              token = matches[1]
          else:
              token = token.lstrip("-")
  
          default = None
          mode = Option.NO_VALUE
  
          if token.endswith("=*"):
              mode = Option.MULTI_VALUED
              token = token.rstrip("=*")
          elif token.endswith("=?*"):
              mode = Option.MULTI_VALUED
              token = token.rstrip("=?*")
          elif token.endswith("=?"):
              mode = Option.OPTIONAL_VALUE
              token = token.rstrip("=?")
          elif token.endswith("="):
              mode = Option.REQUIRED_VALUE
              token = token.rstrip("=")
  
          matches = re.match(r"(.+)(=[?*]*)(.+)", token)
          if matches:
              token = matches.group(1)
              operator = matches.group(2)
              default = matches.group(3)
  
              if operator == "=*":
                  mode = Option.REQUIRED_VALUE | Option.MULTI_VALUED
              elif operator == "=?*":
                  mode = Option.MULTI_VALUED
              elif operator == "=?":
                  mode = Option.OPTIONAL_VALUE
              elif operator == "=":
                  mode = Option.REQUIRED_VALUE
  
          return _option(token, shortcut, mode, description, default)
docs: Parse an option expression.
  
          :param token: The option expression
          :type token: str
  
          :rtype: InputOption