parameters: (self, decl)
docstring: Get the signature for a given function declaration.
docstring_summary: Get the signature for a given function declaration.
docstring_tokens: Get the signature for a given function declaration .
function: def get_signature(self, decl):
  		"""Get the signature for a given function declaration."""
  		# poor man's scanner :-)
  		tokens = re.sub(r'[,()]', lambda m: ' ' + m.group(0) + ' ', decl).split()
  
  		tokens, ret_type = self.get_type(tokens)
  
  		name = tokens[0]
  
  		self.m_intrinsic_mods[name] = self.curr_module
  
  		if tokens[1] != '(':
  			error("unknown token '" + tokens[1] + "' while processing '" + decl + "': '(' expected")
  			sys.exit(1)
  
  		tokens = tokens[2:]
  
  		args = []
  
  		if tokens[0] != ')':
  			while True:
  				tokens, t = self.get_type(tokens)
  				args.append(t)
  
  				# throw away the name
  				tokens = tokens[1:]
  
  				if tokens[0] == '=':
  					# default argument
  					tokens = self.skip_until({',':None, ')':None}, tokens[1:])
  				if tokens[0] == ')':
  					break
  				if tokens[0] != ',':
  					error("unknown token '" + tokens[1] + "' while processing '"
  						  + decl + "': ',' expected")
  					sys.exit(1)
  				# skip the comma
  				tokens = tokens[1:]
  
  		signature = self.create_signature(ret_type, args)
  
  		if self.debug:
  			print("%s %s" % (decl, signature))
  
  		if self.is_supported(self.curr_module, name, signature):
  			# insert the new signature for the given name
  			sigs = self.m_intrinsics.setdefault(name, {})
  			sigs[signature] = True
  
  			# remember the signature (without return type)
  			_, params = self.split_signature(signature)
  			self.m_signatures["_".join(params)] = True
  		else:
  			warning("Cannot generate code for %s" % decl)
function_tokens: def get_signature ( self , decl ) : # poor man's scanner :-) tokens = re . sub ( r'[,()]' , lambda m : ' ' + m . group ( 0 ) + ' ' , decl ) . split ( ) tokens , ret_type = self . get_type ( tokens ) name = tokens [ 0 ] self . m_intrinsic_mods [ name ] = self . curr_module if tokens [ 1 ] != '(' : error ( "unknown token '" + tokens [ 1 ] + "' while processing '" + decl + "': '(' expected" ) sys . exit ( 1 ) tokens = tokens [ 2 : ] args = [ ] if tokens [ 0 ] != ')' : while True : tokens , t = self . get_type ( tokens ) args . append ( t ) # throw away the name tokens = tokens [ 1 : ] if tokens [ 0 ] == '=' : # default argument tokens = self . skip_until ( { ',' : None , ')' : None } , tokens [ 1 : ] ) if tokens [ 0 ] == ')' : break if tokens [ 0 ] != ',' : error ( "unknown token '" + tokens [ 1 ] + "' while processing '" + decl + "': ',' expected" ) sys . exit ( 1 ) # skip the comma tokens = tokens [ 1 : ] signature = self . create_signature ( ret_type , args ) if self . debug : print ( "%s %s" % ( decl , signature ) ) if self . is_supported ( self . curr_module , name , signature ) : # insert the new signature for the given name sigs = self . m_intrinsics . setdefault ( name , { } ) sigs [ signature ] = True # remember the signature (without return type) _ , params = self . split_signature ( signature ) self . m_signatures [ "_" . join ( params ) ] = True else : warning ( "Cannot generate code for %s" % decl )