anchor.diff: -%% This module implements some of the parsing rules needed for
  +% This module implements some of the parsing rules needed for
   %% the BNF defined in RFC 3261 (chapter 25 page 218)
   %%
   %% Note: The functions in this module are assumed to conform STRICTLY
  
positive.code: %% hostname
  %% ipv4address:port
  %% ipv4address
  %% ipv6reference:port
  %% ipv6reference
  %%
  %% Descrip.: splits the string into it's two parts, a exception is
  %%           thrown if the Host or Port is malformed
  %% Returns : {Host, Port} | throw() if parse fails
  %%           Host = string()
  %%           Port = string() | none
  %%           throw() = {error, Reason} | {'EXIT',Reason}
  %%--------------------------------------------------------------------
  parse_hostport(HostPort) ->
      H = hd(HostPort),
  
negative.code: 		true ->
  		    %% probably a ipv4 address
  		    case catch parse_ipv4hostport(HostPort) of
  			{ok, Host, Port} when is_list(Host), is_integer(Port); Port == none ->
  			    {Host, Port};
  			_ ->
  			    %% was not IPv4 address, try to parse as IPv6 address without
  