anchor.diff:  %% Purpose : Lisp Flavoured Erlang translator.
   
   %%% Translate LFE code to/from vanilla Erlang AST.
  +%%%
  +%%% Note that we don't really check code here as such, we assume the
  +%%% input is correct. If there is an error in the input we just fail.
  +%%% This allows us to accept forms which are actually illegal but we
  +%%% may special case, for example functions call in patterns which
  +%%% will become macro expansions.
   
   -module(lfe_trans).
   
  
positive.code: 
  -import(lists, [map/2,foldl/3,mapfoldl/3,foldr/3,splitwith/2]).
  
  -import(ordsets, [add_element/2,is_element/2,intersection/2]).
  -import(orddict, [store/3,is_key/2,find/2]).
  
  -define(Q(E), [quote,E]).			%We do a lot of quoting
  
  -record(fstate, {vc=0				%Variable counter
  		}).
  
  %% from_expr(AST) -> Sexpr.
  %% from_expr(AST, Variables) -> {Sexpr,Variables}.
  
negative.code: from_cls(Fun, Vt0, St0, [C|Cs]) ->
      {Lc,Vtc,St1} = Fun(C, Vt0, St0),
      {Lcs,Vtcs,St2} = from_cls(Fun, Vt0, St1, Cs),
      {[Lc|Lcs],ordsets:intersection(Vtc, Vtcs),St2}.
  
  from_eq_tests(Gs) -> [ ['=:=',V,V1] || {V,V1} <- Gs ].
  
  