anchor.diff:  	  Comments = erl_comment_scan:file(FName),
   	  SyntaxTree = refac_recomment:recomment_forms(Forms, Comments),
   	  Info = refac_syntax_lib:analyze_forms(SyntaxTree),
  -	  case lists:keysearch(errors,1,Info) of
  -	        {value,{errors, Error}} ->
  -	  	  {error, {"Syntax error in file: " ++ FName++".", Error}};
  -	      _ ->
  -		  AnnAST = annotate_bindings(FName, SyntaxTree, Info, 1),
  -		  if ByPassPreP -> {ok, {AnnAST, Info}};
  -		     true ->
  -			  case analyze_free_vars(AnnAST) of
  -			      {error, Reason} -> {error, Reason};
  -			      _ ->   {ok, {AnnAST, Info}}
  -			  end
  -		  end
  -	  end;
  +%% 	  case lists:keysearch(errors,1,Info) of
  +%% 	        {value,{errors, Error}} ->
  +%% 	  	  {error, {"Syntax error in file: " ++ FName++".", Error}};
  +%% 	      _ ->
  +	    AnnAST = annotate_bindings(FName, SyntaxTree, Info, 1),
  +	    if ByPassPreP -> 
  +		    {ok, {AnnAST, Info}};
  +	       true ->
  +		    case analyze_free_vars(AnnAST) of
  +			{error, Reason} -> {error, Reason};
  +			_ ->   {ok, {AnnAST, Info}}
  +		    end
  +	    end;
   	{error, Reason} -> {error, Reason}
       end.
  +
  +%%@spec add_tokens(FName::filename(), SyntaxTree::syntaxTree()) -> SyntaxTree()
  +%%@Attach tokens to each form in the AST.
  +add_tokens(FName, SyntaxTree) ->
  +    {ok, Bin} = file:read_file(FName),
  +    {ok, Toks,_} =refac_scan_with_layout:string(erlang:binary_to_list(Bin)),
  +    Fs = refac_syntax:form_list_elements(SyntaxTree),
  +    Fs1 = do_add_tokens(Toks, Fs),
  +    refac_syntax:copy_attrs(SyntaxTree, refac_syntax:form_list(Fs1)).
  +
  +do_add_tokens(Toks, Fs) ->
  +    do_add_tokens(Toks, lists:reverse(Fs), []).
  +
  +do_add_tokens([], [], NewFs) ->
  +     NewFs;
  +do_add_tokens(Toks, [F|Fs], NewFs)->
  +    StartPos =
  +	case refac_syntax:type(F) of 
  +	    error_marker ->
  +		case Fs of 
  +		    [] -> {1,1};
  +		    _ -> {_, {Line, _Col}} = get_range(hd(Fs)),  %% No consecutive error_marker, correct? 
  +			 {Line+1,1} %% Assume a form always starts from a new line.		      
  +		end;
  +	    _ -> case refac_syntax:get_precomments(F) of 
  +		     [] -> {Start, _End} = get_range(F),
  +			   Start;
  +		     [Com|_Tl] -> {Line, Col}=refac_syntax:get_pos(Com),
  +				  {Line, Col+1}
  +		 end
  +	end,
  +    {Toks1, Toks2} = lists:splitwith(fun(T) -> element(2,T) < StartPos end, Toks),
  +    {Toks11, Toks12} = lists:splitwith(fun(T) -> element(1,T) == whitespace end, lists:reverse(Toks1)),
  +    {FormToks, RemainToks} = case Toks12 of 
  +				 [] ->  {lists:reverse(Toks11)++Toks2,[]};
  +				 [H|_T] -> Line1 = element(1, element(2, H)), 
  +					   {Toks13, Toks14} = lists:splitwith(fun(T) -> element(1, element(2,T)) == Line1 end, lists:reverse(Toks11)),
  +					   {Toks14++Toks2, lists:reverse(Toks12)++Toks13}					
  +			     end,
  +    F1 =refac_syntax:add_ann({toks, FormToks}, F),
  +    do_add_tokens(RemainToks, Fs, [F1|NewFs]).
  +	    
  +	    
  +%% do_add_tokens(Toks, Fs) ->   
  +%%    F = fun(Form, RemToks) ->
  +%% 	       StartPos =case refac_syntax:get_precomments(Form) of 
  +%% 			     [] -> {Start, _End} = get_range(Form),
  +%% 				   Start;
  +%% 			     [Com|_Tl] -> {Line, Col}=refac_syntax:get_pos(Com),
  +%% 					  {Line, Col+1}
  +%% 			 end,
  +%% 	       io:format("StartPos:\n~p\n",[StartPos]),
  +%% 	       {Toks1, Toks2} = lists:splitwith(fun(T) -> element(2,T) < StartPos end, RemToks),
  +%% 	       {Toks11, Toks12} = lists:splitwith(fun(T) -> element(1,T) == whitespace end, lists:reverse(Toks1)),
  +%% 	       {FormToks, RemainToks} = case Toks12 of 
  +%% 					    [] ->  {lists:reverse(Toks11)++Toks2,[]};
  +%% 					    [H|_T] -> Line1 = element(1, element(2, H)), 
  +%% 						     {Toks13, Toks14} = lists:splitwith(fun(T) -> element(1, element(2,T)) == Line1 end, lists:reverse(Toks11)),
  +%% 						     {Toks14++Toks2, lists:reverse(Toks12)++Toks13}					
  +%% 					end,
  +%% 	       Form1 =refac_syntax:add_ann({toks, FormToks}, Form),
  +%% 	       {Form1, RemainToks}						
  +%%        end,
  +    
  +%%    {Fs1, []} =lists:mapfoldl(F, Toks, lists:reverse(Fs)),
  +%%     lists:reverse(Fs1).
  +		
  +
  +
  +%% ============================================================================
  +%% @spec get_toks(Node::syntaxTree())-> [Tok]
  +%%       
  +%%
  +%% @doc Return the token list annoated to a form.
  +
  +get_toks(Node) ->
  +    As = refac_syntax:get_ann(Node),
  +    case lists:keysearch(toks, 1, As) of
  +      {value, {toks, Toks}} -> Toks;
  +      _ -> []
  +    end.
  +		
  +     
   
   
   %%@spec analyze_free_vars(SyntaxTree::syntaxTree()) ->ok|{error, string()} 
  
positive.code: 	  Args = refac_syntax:attribute_arguments(Node),
  	  case Args of  
  	      none -> {S1, E1} = get_range(Name),
  		      refac_syntax:add_ann({range, {S1, E1}}, Node);
  	      _ -> case length(Args) >0 of 
  		       true ->  Arg = glast("refac_util:do_add_range,attribute", Args),
  				{S1, _E1} = get_range(Name),
  				{_S2, E2} = get_range(Arg),
  				refac_syntax:add_ann({range, {S1, E2}}, Node);
  		       _ ->  {S1, E1} = get_range(Name),
  			     refac_syntax:add_ann({range, {S1, E1}}, Node)
  		   end
  	  end;
        generator ->
  
negative.code: 		      case lookup(LibPlt, {M, Op, Arity}) of
  			{value, S} -> S;
  			_ ->
  			    case LocalPlt of 
  				none -> unknown;
  				_ -> case lookup(LocalPlt, {M, Op, Arity}) of
  					 {value, S} -> S;
  					 _ -> unknown
  				     end
  			    end
  		      end;
  		  _ -> unknown
  