parameters: (data, allow_quoted_string=False)
return_statement: return extension_list
docstring: Parses Sec-WebSocket-Extensions header value returns a list of
      ExtensionParameter objects.
  
      Leading LWSes must be trimmed.
docstring_summary: Parses Sec-WebSocket-Extensions header value returns a list of
      ExtensionParameter objects.
docstring_tokens: Parses Sec - WebSocket - Extensions header value returns a list of ExtensionParameter objects .
function: def parse_extensions(data, allow_quoted_string=False):
      """Parses Sec-WebSocket-Extensions header value returns a list of
      ExtensionParameter objects.
  
      Leading LWSes must be trimmed.
      """
  
      state = http_header_util.ParsingState(data)
  
      extension_list = []
      while True:
          extension = _parse_extension(state, allow_quoted_string)
          if extension is not None:
              extension_list.append(extension)
  
          http_header_util.consume_lwses(state)
  
          if http_header_util.peek(state) is None:
              break
  
          if not http_header_util.consume_string(state, ','):
              raise ExtensionParsingException(
                  'Failed to parse Sec-WebSocket-Extensions header: '
                  'Expected a comma but found %r' %
                  http_header_util.peek(state))
  
          http_header_util.consume_lwses(state)
  
      if len(extension_list) == 0:
          raise ExtensionParsingException(
              'No valid extension entry found')
  
      return extension_list
function_tokens: def parse_extensions ( data , allow_quoted_string = False ) : state = http_header_util . ParsingState ( data ) extension_list = [ ] while True : extension = _parse_extension ( state , allow_quoted_string ) if extension is not None : extension_list . append ( extension ) http_header_util . consume_lwses ( state ) if http_header_util . peek ( state ) is None : break if not http_header_util . consume_string ( state , ',' ) : raise ExtensionParsingException ( 'Failed to parse Sec-WebSocket-Extensions header: ' 'Expected a comma but found %r' % http_header_util . peek ( state ) ) http_header_util . consume_lwses ( state ) if len ( extension_list ) == 0 : raise ExtensionParsingException ( 'No valid extension entry found' ) return extension_list