anchor.diff:  -include_lib("eunit/include/eunit.hrl").
   -endif.
   
  -
  -
  +%% -------------------------------------------------------------------
  +%% Parser state record
  +%% -------------------------------------------------------------------
   -record(state, {
  -                last_space = true,
  -                prefix = <<>>,
  -                command = <<>>,
  -                args = [],
  -                accumulator = <<>>
  +                last_space = true   :: boolean(),
  +                prefix = <<>>       :: binary(),
  +                command = <<>>      :: binary(),
  +                args = []           :: [binary()],
  +                accumulator = <<>>  :: binary()
                  }).
   
   %%--------------------------------------------------------------------
  
positive.code:             parse_args(hd(Args), #state{prefix=Prefix, command=Command})
      end.
  
  parse_args(<<>>, #state{accumulator = Acc} = State) when size(Acc) =:= 0 ->
      % End of arguments, build the final proplist for this packet
      [
  
negative.code: parse(<<":", Packet/binary>>) ->
      % Packet with prefix, extract it
      [Prefix | Tail] = re:split(Packet, " +", [{parts, 2}]),
      case Tail of
          [] ->
              % A single prefix without a command?!?!?!
              throw(malformed_packet);
          _ ->
              parse_command(hd(Tail), Prefix)
      end;
  parse(Packet) ->
      % Packet without prefix, fall to parse_command
      parse_command(Packet, <<>>).
  
  %% ===================================================================
  %% Internal functions
  %% ===================================================================
  
  %% -------------------------------------------------------------------
  %% IRC parser - second stage: parse command
  %% -------------------------------------------------------------------
  -spec parse_command(Packet::binary(), Prefix::binary()) -> [proplists:property()].
  parse_command(Packet, Prefix) ->
      [Command | Args] = re:split(Packet, " +", [{parts, 2}]),
      case Args of
  