anchor.diff:  			fun({RecName, RecSize}) ->
   				?AST({'?a(RecName)', '?a(RecSize)'})
   			end, Records))])].
  +
  +make_getters_setters(TaggedSpecs, PredefRecords, ModName) ->
  +    RecNames = lists:foldl(
  +                 fun({Tag, #elem{result = Result, module = Mod}}, Acc)
  +		       when Mod == ModName ->
  +                         try
  +                             [H|_]= tuple_to_list(Result),
  +                             true = is_atom(H),
  +                             false = is_label(H),
  +                             dict:append(H, Tag, Acc)
  +                         catch _:_ ->
  +                                 Acc
  +                         end;
  +		    (_, Acc) ->
  +			 Acc
  +                 end, dict:new(), TaggedSpecs),
  +    {Getters, Setters} =
  +        lists:foldl(
  +          fun({Tag, #elem{result = Result}}, {Acc1, Acc2}) ->
  +                  try
  +                      [H|T]= tuple_to_list(Result),
  +                      true = is_atom(H),
  +                      false = is_label(H),
  +                      [Tag|_] = dict:fetch(H, RecNames),
  +		      Fields = case dict:find(H, PredefRecords) of
  +				   {ok, Fs} ->
  +				       [FName || {FName, _} <- Fs];
  +				   error ->
  +				       [label_to_record_field(F) || F <- T]
  +			       end,
  +		      case lists:member(sub_els, Fields) of
  +			  false ->
  +			      {Acc1, Acc2};
  +			  true ->
  +			      {[erl_syntax:clause(
  +				  [record_fields_to_vars(H, Fields)],
  +				  none,
  +				  [?AST(_sub_els)])|Acc1],
  +			       [erl_syntax:clause(
  +				  [record_fields_to_vars(H, Fields, [{sub_els, ?AST(_)}]),
  +				   ?AST(_sub_els)],
  +				  none,
  +				  [record_fields_to_vars(
  +				     H, Fields, [{sub_els, ?AST(_sub_els)}])])|Acc2]}
  +		      end
  +		  catch _:_ ->
  +			 {Acc1, Acc2}
  +                  end
  +          end, {[], []}, TaggedSpecs),
  +    case {Getters, Setters} of
  +	{[], []} ->
  +	    [];
  +	_ ->
  +	    [erl_syntax:function(?AST(get_els), Getters),
  +	     erl_syntax:function(?AST(set_els), Setters)]
  +    end.
   
   elem_to_AST(#elem{name = Name, xmlns = XMLNS, cdata = CData,
                     result = Result, attrs = Attrs, refs = _Refs} = Elem,
  
positive.code:     Decoders = make_decoders(TaggedElems, ParentMod, ModName),
      Encoders = make_encoders(TaggedElems, ModName),
      Printer = make_printer(TaggedElems, PredefRecords, ModName, ParentMod),
      Compile = erl_syntax:attribute(?AST(compile), [?AST(export_all)]),
      LocalFunForms = make_local_funs(FunDeps, TaggedElems, ModName),
      NewAST = Decoders ++ Encoders ++ Printer ++ LocalFunForms ++ AST,
      ResultAST = erl_syntax:form_list([Hdr, Module, Compile|NewAST]),
      file:write_file(
        filename:join([ErlDirName, ModNameErl]),
  
negative.code:             list_to_atom(T)
      end.
  
  record_fields_to_vars(Name, Fields) ->
      record_fields_to_vars(Name, Fields, []).
  
  record_fields_to_vars(Name, Fields, Replace) ->
      FList = lists:map(
  	      fun(Field) ->
  		      case lists:keyfind(Field, 1, Replace) of
  			  {_, AbstractVal} ->
  			      AbstractVal;
  			  false ->
  			      erl_syntax:variable(
  				[$_|atom_to_list(Field)])
  		      end
  	      end, Fields),
      erl_syntax:tuple([erl_syntax:atom(Name)|FList]).
  
  prepare_label(Label, Name) when is_atom(Name) ->
      prepare_label(Label, erlang:atom_to_binary(Name, utf8));
  prepare_label(Label, Name) ->
  