anchor.diff:  
   scan_endtag([], _Tag, Acc, L) ->
       {lists:reverse(Acc), [], L};
  +scan_endtag([$\r,$\n|R], Tag, Acc, L) ->
  +    scan_endtag(R, Tag, [$\n,$\r|Acc], L+1);
  +scan_endtag([C|R], Tag, Acc, L) when C=:=$\n; C=:=$\r ->
  +    scan_endtag(R, Tag, [C|Acc], L+1);
   scan_endtag(R=[$<,$/|R0], Tag, Acc, L0) ->
       case casecmp(Tag, R0) of
           {true, R1} ->
  
positive.code:         false ->
              scan_endtag(R0, Tag, Acc, L0)
      end;
  scan_endtag([C=$\n|R], Tag, Acc, L) ->
      scan_endtag(R, Tag, [C|Acc], L+1);
  scan_endtag([C=$\r|R], Tag, Acc, L) ->
      scan_endtag(R, Tag, [C|Acc], L+1);
  scan_endtag([C|R], Tag, Acc, L) ->
      scan_endtag(R, Tag, [C|Acc], L).
  
  %%
  
  casecmp([], R) -> {true, R};
  casecmp([C1|T1], [C2|T2]) ->
      C2low = lowercase_ch(C2),
      if C1 == C2low -> casecmp(T1,T2);
         true        -> false
      end.
  
  %%
  
  char_class($\n) -> nl;
  char_class($\r) -> nl;
  char_class($ )  -> space;
  char_class($\t) -> space;
  char_class(C) when C >= $a, C =< $z -> alpha;
  char_class(C) when C >= $A, C =< $Z -> alpha;
  char_class(C) when C >= $0, C =< $9 -> digit;
  char_class(_C)   -> other.
  
  %%
  
  skip_space([], L) ->
      {[], L};
  skip_space(R = [C|R0], L) ->
      case char_class(C) of
          nl ->
              skip_space(R0, L+1);
          space ->
              skip_space(R0, L);
          _ ->
              {R, L}
      end.
  
  %%
  
  skip_comment([], L) ->          {[], L};
  skip_comment([$-,$-,$>|R],L) -> {R,L};
  skip_comment([$\n|R],L) ->      skip_comment(R,L+1);
  skip_comment([$\r|R],L) ->      skip_comment(R,L+1);
  skip_comment([_C|R],L) ->        skip_comment(R,L).
  
  %%
  
  
negative.code: 
  scan_token([], Acc, L) ->
      {lists:reverse(Acc), [], L};
  scan_token([$\r,$\n|R], Acc, L) ->
      {lists:reverse(Acc), R, L+1};
  scan_token([C|R], Acc, L) when C=:=$\n; C=:=$\r ->
      {lists:reverse(Acc), R, L+1};
  scan_token([C|R], Acc, L) when C=:=$\s; C=:=$\t ->
      {lists:reverse(Acc), R, L};
  scan_token(R=[C|_], Acc, L) when C=:=$>; C=:=$<; C=:=$= ->
      {lists:reverse(Acc), R, L};
  scan_token([C|R], Acc, L) ->
      scan_token(R, [C|Acc], L).
  
  %%
  
  