anchor.diff:  -export([sax/3
            , unit/0,unit/1
            , wget_parse/1,wget_print/1]).
  -
  --define(ok(X),$a=<X,X=<$z;$A=<X,X=<$Z;$0=<X,X=<$9;X==$_;X==$-;X==$:).
  --define(ws(X),X==$\s ;X==$\r;X==$\n;X==$\t).
  --define(endv(S),?ws(hd(S));hd(S)==$>;hd(S)==$/,hd(tl(S))==$>;hd(S)==$=).
  --define(dq(Z),Z==$").
  --define(sq(Z),Z==$').
   
   sax(Str,Fun,Acc) ->
     parse(Str,Fun,Acc).
  
positive.code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %% tokenizer
  
  tokenize(Str) when is_integer(hd(Str)) ->
    tokenize(tz(nil,Str));
  
  tokenize({TZ,Str}) ->
    tokenize(tz(TZ,Str));
  
negative.code: ff(text)  -> "(.*)<(.*)\$".
  
  ff(Str,P,Groups) ->
    case re:run(Str,P,[{capture,Groups,binary},dotall,caseless,ungreedy]) of
      {match,Ms} -> Ms;
      nomatch -> []
    end.
  
  ws(?d(X,Str)) when ?ws(X) -> ws(Str);
  ws(Str) -> Str.
  
  dc(Str) -> string:to_lower(Str).
  