anchor.diff:  
   Rules.
   %% Bracketed Comments using #| foo |#
  -#\|[^\|]*\|+([^#\|][^\|]*\|+)*# : block_comment(string:substr(TokenChars, 3)).
  +#{D}*\|[^\|]*\|+([^#\|][^\|]*\|+)*# :
  +        block_comment(string:substr(TokenChars, 3)).
  +
   %% Separators
  -#[bB]\(         :    {token,{'#B(',TokenLine}}.
  -#[mM]\(         :    {token,{'#M(',TokenLine}}.
  -#\(             :    {token,{'#(',TokenLine}}.
  -#`              :    {token,{'#`',TokenLine}}.
  -#;              :    {token,{'#;',TokenLine}}.
  -#,              :    {token,{'#,',TokenLine}}.
  -#,@             :    {token,{'#,@',TokenLine}}.
   '               :    {token,{'\'',TokenLine}}.
   `               :    {token,{'`',TokenLine}}.
   ,               :    {token,{',',TokenLine}}.
   ,@              :    {token,{',@',TokenLine}}.
   \.              :    {token,{'.',TokenLine}}.
   [][()}{]        :    {token,{list_to_atom(TokenChars),TokenLine}}.
  +
  +#{D}*[bB]\(     :    {token,{'#B(',TokenLine}}.
  +#{D}*[mM]\(     :    {token,{'#M(',TokenLine}}.
  +#{D}*\(         :    {token,{'#(',TokenLine}}.
  +#{D}*\.         :    {token,{'#.',TokenLine}}.
  +
  +#{D}*`          :    {token,{'#`',TokenLine}}.
  +#{D}*;          :    {token,{'#;',TokenLine}}.
  +#{D}*,          :    {token,{'#,',TokenLine}}.
  +#{D}*,@         :    {token,{'#,@',TokenLine}}.
  +
   %% Characters
  -#\\(x{H}+|.)    :    char_token(string:substr(TokenChars, 3), TokenLine).
  +#{D}*\\(x{H}+|.) :   char_token(skip_past(TokenChars, $\\, $\\), TokenLine).
  +
  +%% Based numbers
  +#{D}*\*{SYM}+   :    base_token(skip_past(TokenChars, $*, $*), 2, TokenLine).
  +#{D}*[bB]{SYM}+ :    base_token(skip_past(TokenChars, $b, $B), 2, TokenLine).
  +#{D}*[oO]{SYM}+ :    base_token(skip_past(TokenChars, $o, $O), 8, TokenLine).
  +#{D}*[dD]{SYM}+ :    base_token(skip_past(TokenChars, $d, $D), 10, TokenLine).
  +#{D}*[xX]{SYM}+ :    base_token(skip_past(TokenChars, $x, $X), 16, TokenLine).
  +#{D}*[rR]{SYM}+ :
  +        %% Scan over digit chars to get base.
  +        {Base,[_|Ds]} = base1(tl(TokenChars), 10, 0),
  +        base_token(Ds, Base, TokenLine).
  +
   %% String
   "(\\x{H}+;|\\.|[^"\\])*" :
  -            %% Strip quotes.
  -            S = string:substr(TokenChars, 2, TokenLen - 2),
  -            {token,{string,TokenLine,chars(S)}}.
  +        %% Strip quotes.
  +        S = string:substr(TokenChars, 2, TokenLen - 2),
  +        {token,{string,TokenLine,chars(S)}}.
   %% Binary string
   #"(\\x{H}+;|\\.|[^"\\])*" :
  -            %% Strip quotes.
  -            S = string:substr(TokenChars, 3, TokenLen - 3),
  -            Bin = unicode:characters_to_binary(chars(S), utf8, utf8),
  -            {token,{binary,TokenLine,Bin}}.
  +        %% Strip quotes.
  +        S = string:substr(TokenChars, 3, TokenLen - 3),
  +        Bin = unicode:characters_to_binary(chars(S), utf8, utf8),
  +        {token,{binary,TokenLine,Bin}}.
   %% Symbols
   \|(\\x{H}+;|\\.|[^|\\])*\| :
  -            %% Strip quotes.
  -            S = string:substr(TokenChars, 2, TokenLen - 2),
  -            symbol_token(chars(S), TokenLine).
  +        %% Strip quotes.
  +        S = string:substr(TokenChars, 2, TokenLen - 2),
  +        symbol_token(chars(S), TokenLine).
   %% Funs
  -#'{SSYM}{SYM}*/{D}+    :
  -            %% Strip sharpsign single-quote.
  -            FunStr = string:substr(TokenChars,3),
  -            {token,{'#\'',TokenLine,FunStr}}.
  -%% Based numbers
  -#[bB]{B}+    :    base_token(string:substr(TokenChars, 3), 2, TokenLine).
  -#[oO]{O}+    :    base_token(string:substr(TokenChars, 3), 8, TokenLine).
  -#[dD]{D}+    :    base_token(string:substr(TokenChars, 3), 10, TokenLine).
  -#[xX]{H}+    :    base_token(string:substr(TokenChars, 3), 16, TokenLine).
  -#([0]?[2-9]|[12][0-9]|3[0-6])[rR]{B36}+ :
  -    %% Have to scan all possible digit chars and fail if wrong.
  -    {Base,[_|Ds]} = base1(string:substr(TokenChars, 2), 10, 0),
  -    base_token(Ds, Base, TokenLine).
  -
  +#'{SSYM}{SYM}*/{D}+ :
  +        %% Strip sharpsign single-quote.
  +        FunStr = string:substr(TokenChars,3),
  +        {token,{'#\'',TokenLine,FunStr}}.
   %% Atoms
  -[+-]?{D}+        :
  -    case catch {ok,list_to_integer(TokenChars)} of
  -        {ok,I} -> {token,{number,TokenLine,I}};
  -        _ -> {error,"illegal integer"}
  -    end.
  +[+-]?{D}+       :
  +        case catch {ok,list_to_integer(TokenChars)} of
  +            {ok,I} -> {token,{number,TokenLine,I}};
  +            _ -> {error,"illegal integer"}
  +        end.
   [+-]?{D}+\.{D}+([eE][+-]?{D}+)? :
  -    case catch {ok,list_to_float(TokenChars)} of
  -        {ok,F} -> {token,{number,TokenLine,F}};
  -        _ -> {error,"illegal float"}
  -    end.
  +        case catch {ok,list_to_float(TokenChars)} of
  +            {ok,F} -> {token,{number,TokenLine,F}};
  +            _ -> {error,"illegal float"}
  +        end.
   {SSYM}{SYM}*    :
  -    symbol_token(TokenChars, TokenLine).
  -{WS}+        :    skip_token.
  +        symbol_token(TokenChars, TokenLine).
  +{WS}+           :    skip_token.
   
   Erlang code.
   %% Copyright (c) 2008-2013 Robert Virding
  
positive.code: escape_char($s) -> $\s;                %\s = SPC
  escape_char($d) -> $\d;                %\d = DEL
  escape_char(C) -> C.
  
negative.code: chars([C|Cs]) -> [C|chars(Cs)];
  chars([]) -> [].
  
  hex_char(C) when C >= $0, C =< $9 -> true;
  hex_char(C) when C >= $a, C =< $f -> true;
  hex_char(C) when C >= $A, C =< $F -> true;
  