anchor.diff:  		 _ ->
   		     []
   	     end,
  -    {EncObj,ObjSetImm} =
  -	case TableConsInfo of
  -	    #simpletableattributes{usedclassfield=Used,
  -				   uniqueclassfield=Unique} when Used /= Unique ->
  -		{false,[]};
  -	    %% ObjectSet, name of the object set in constraints
  -	    %% 
  -	    %%{ObjectSet,AttrN,N,UniqueFieldName} -> %% N is index of attribute that determines constraint
  -	    #simpletableattributes{objectsetname=ObjectSet,
  -				   c_name=AttrN,
  -				   c_index=N,
  -				   usedclassfield=UniqueFieldName,
  -				   uniqueclassfield=UniqueFieldName,
  -				   valueindex=ValueIndex0
  -				  } -> %% N is index of attribute that determines constraint
  -		{Module,ObjSetName} = ObjectSet,
  -		#typedef{typespec=#'ObjectSet'{gen=Gen}} =
  -		    asn1_db:dbget(Module, ObjSetName),
  -		case Gen of
  -		    true ->
  -			ValueIndex = ValueIndex0 ++ [{N+1,top}],
  -			Val = make_var(val),
  -			{ObjSetImm0,Dst} = enc_dig_out_value(ValueIndex, Val),
  -			{{AttrN,Dst},ObjSetImm0};
  -		    false ->
  -			{false,[]}
  -		end;
  -	    _  ->
  -		case D#type.tablecinf of
  -		    [{objfun,_}|_] ->
  -			%% when the simpletableattributes was at an outer
  -			%% level and the objfun has been passed through the
  -			%% function call
  -			{{"got objfun through args",{var,"ObjFun"}},[]};
  -		    _ ->
  -			{false,[]}
  -		end
  -	end,
  +    {EncObj,ObjSetImm} = enc_table(Gen, TableConsInfo, D),
       ImmSetExt =
   	case Ext of
   	    {ext,_Pos,NumExt2} when NumExt2 > 0 ->
  
positive.code:     emit([".",nl]).
  
  gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
      {ExtAddGroup,TmpCompList,TableConsInfo} =
  	case D#type.def of
  	    #'SEQUENCE'{tablecinf=TCI,components=CL,extaddgroup=ExtAddGroup0} ->
  		{ExtAddGroup0,CL,TCI};
  	    #'SET'{tablecinf=TCI,components=CL} ->
  		{undefined,CL,TCI}
  	end,
  
      CompList = case ExtAddGroup of
  		   undefined ->
  		       TmpCompList;
  		   _ when is_integer(ExtAddGroup) ->
  		       %% This is a fake SEQUENCE representing an ExtensionAdditionGroup
  		       %% Reset the textual order so we get the right
  		       %% index of the components
  		       [Comp#'ComponentType'{textual_order=undefined}||
  			   Comp<-TmpCompList]
  	       end,
      ExternalImm =
  	case Typename of
  	    ['EXTERNAL'] ->
  
negative.code: value_match1(Value,[{VI,_}|VIs],Acc,Depth) ->
      value_match1(Value,VIs,Acc++lists:concat(["element(",VI,","]),Depth+1).
  
  enc_dig_out_value(_Gen, [], Value) ->
      {[],Value};
  enc_dig_out_value(Gen, [{N,_}|T], Value) ->
      {Imm0,Dst0} = enc_dig_out_value(Gen, T, Value),
      {Imm,Dst} = asn1ct_imm:enc_element(N, Dst0),
      {Imm0++Imm,Dst}.
  
  