parameters: (value)
return_statement: return mtoken, value
docstring: token = [CFWS] 1*ttext [CFWS]
  
      The RFC equivalent of ttext is any US-ASCII chars except space, ctls, or
      tspecials.  We also exclude tabs even though the RFC doesn't.
  
      The RFC implies the CFWS but is not explicit about it in the BNF.
docstring_summary: token = [CFWS] 1*ttext [CFWS]
docstring_tokens: token = [ CFWS ] 1 * ttext [ CFWS ]
function: def get_token(value):
      """token = [CFWS] 1*ttext [CFWS]
  
      The RFC equivalent of ttext is any US-ASCII chars except space, ctls, or
      tspecials.  We also exclude tabs even though the RFC doesn't.
  
      The RFC implies the CFWS but is not explicit about it in the BNF.
  
      """
      mtoken = Token()
      if value and value[0] in CFWS_LEADER:
          token, value = get_cfws(value)
          mtoken.append(token)
      if value and value[0] in TOKEN_ENDS:
          raise errors.HeaderParseError(
              "expected token but found '{}'".format(value))
      token, value = get_ttext(value)
      mtoken.append(token)
      if value and value[0] in CFWS_LEADER:
          token, value = get_cfws(value)
          mtoken.append(token)
      return mtoken, value
function_tokens: def get_token ( value ) : mtoken = Token ( ) if value and value [ 0 ] in CFWS_LEADER : token , value = get_cfws ( value ) mtoken . append ( token ) if value and value [ 0 ] in TOKEN_ENDS : raise errors . HeaderParseError ( "expected token but found '{}'" . format ( value ) ) token , value = get_ttext ( value ) mtoken . append ( token ) if value and value [ 0 ] in CFWS_LEADER : token , value = get_cfws ( value ) mtoken . append ( token ) return mtoken , value