anchor.diff:    validate(tests()).
   
   validate([]) -> [];
  -validate([{Str,Toks}|Vs]) -> 
  +validate([{Str,Toks}|Vs]) ->
     [try Toks = sax(Str,fun(T,A)-> A++[T] end, []),Str
      catch C:R -> {C,R,erlang:get_stacktrace(),Str}
      end|validate(Vs)].
  
positive.code: 
  ff(What,Str) -> ff(What,Str,0,Str).
  
  ff(script,<<"</script>",Str/binary>>,N,Bin) -> 
    {Scr,_} = split_binary(Bin,N),
    {{tag,""},<<"/script>",Str/binary>>,{text,Scr}};
  ff(style,<<"</style>",Str/binary>>,N,Bin) -> 
    {Scr,_} = split_binary(Bin,N),
    {{tag,""},<<"/style>",Str/binary>>,{text,Scr}};
  ff(text,<<"<",Str/binary>>,N,Bin) -> 
    {Scr,_} = split_binary(Bin,N),
    {{tag,""},ws(Str),{text,Scr}};
  ff(_,<<>>,_,Str) -> 
    {{text,Str},"",eof};
  ff(What,<<_,Str/binary>>,N,Bin) -> 
    ff(What,Str,N+1,Bin).
  
  ws(?d(X,Str)) when ?ws(X) -> ws(Str);
  
negative.code: parse(Str,Fun,Acc) ->
    parse({Fun,Acc,[]},tokenize(Str)).
  
  parse({Fun,Acc,Stack}=State,[{Token,T}]) ->
    case Token of
      eof -> eof(unroll(Stack,{Fun,Acc,[]}));
      _   -> parse(maybe_emit(Token,State),tokenize(T))
  