anchor.diff:              {error, Error}
       end;
   
  -parse(Terms, Syntax, Opts) when is_map(Terms) ->
  -    parse(maps:to_list(Terms), Syntax, Opts).
  -
  -
  -%% @doc
  --spec add_defaults(map(), syntax()) ->
  -    syntax().
  -
  -add_defaults(Defaults, Syntax) ->
  -    Base = maps:get('__defaults', Syntax, #{}),
  -    Syntax#{'__defaults' => maps:merge(Base, Defaults)}.
  -
  -
  -%% @doc
  -add_mandatory(List, Syntax) ->
  -    Base = maps:get('__mandatory', Syntax, []),
  -    Syntax#{'__mandatory' => List++Base}.
  -
  -
  -
  -%% @doc Deep merge of two dictionaries
  --spec map_merge(map(), map()) ->
  -    map().
  -
  -map_merge(Update, Map) ->
  -    do_map_merge(maps:to_list(Update), Map).
  -
  -
  -%% @private
  -do_map_merge([], Map) ->
  -    Map;
  -
  -do_map_merge([{Key, Val}|Rest], Map) when is_map(Val) ->
  -    Val2 = maps:get(Key, Map, #{}),
  -    Map2 = map_merge(Val, Val2),
  -    do_map_merge(Rest, Map#{Key=>Map2});
  -
  -do_map_merge([{Key, Val}|Rest], Map) ->
  -    do_map_merge(Rest, Map#{Key=>Val}).
  -
  -
  -
  -%% ===================================================================
  -%% Parse
  -%% ===================================================================
  -
  -
  -
  -%% @private
  --spec do_parse([{term(), term()}], #parse{}) ->
  -    {ok, #parse{}} | {error, error()}.
  -
  -do_parse([], Parse) ->
  -    case parse_defaults(Parse) of
  -        {ok, #parse{ok_exp=Exp}=Parse2} ->
  -            {ok, Parse2#parse{ok_exp=lists:reverse(Exp)}};
  -        {error, Error} ->
  -            {error, Error}
  -    end;
  -
  -do_parse([{Key, Val}|Rest], Parse) ->
  +do_parse([{Key, Val} | Rest], Parse) ->
       case do_parse_key(Key, Val, Parse) of
           {ok, Parse2} ->
               do_parse(Rest, Parse2);
  
positive.code: 
  spec({integer, Min, Max}, Val) ->
      case nklib_util:to_integer(Val) of
          error -> 
              error;
          Int when 
              (Min==none orelse Int >= Min) andalso
              (Max==none orelse Int =< Max) ->
              {ok, Int};
          _ ->
              error
  
negative.code:     unknown.
  
  
  
  %% ===================================================================
  %% Private
  %% ===================================================================
  
  
  %% @private
  do_parse_map([]) ->
      ok;
  
  do_parse_map([{Key, Val} | Rest]) ->
      case is_binary(Key) orelse is_atom(Key) of
          true when is_map(Val) ->
              case do_parse_map(maps:to_list(Val)) of
  