anchor.diff:  escape_char($d) -> $\d;                         % \d = DEL
   escape_char(C) -> C.
   
  -scan_number([C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
  -    scan_number(Cs, St, Line, Col, Toks, [C|Ncs]);
  -scan_number([$_,Next|Cs], St, Line, Col, Toks, [Prev|_]=Ncs) when
  +scan_number(Cs, St, Line, Col, Toks, {Ncs, Us}) ->
  +    scan_number(Cs, St, Line, Col, Toks, Ncs, Us).
  +
  +scan_number([C|Cs], St, Line, Col, Toks, Ncs, Us) when ?DIGIT(C) ->
  +    scan_number(Cs, St, Line, Col, Toks, [C|Ncs], Us);
  +scan_number([$_,Next|Cs], St, Line, Col, Toks, [Prev|_]=Ncs, _Us) when
         ?DIGIT(Next) andalso ?DIGIT(Prev) ->
  -    scan_number(Cs, St, Line, Col, Toks, [Next,$_|Ncs]);
  -scan_number([$.,C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
  -    scan_fraction(Cs, St, Line, Col, Toks, [C,$.|Ncs]);
  -scan_number([$.]=Cs, _St, Line, Col, Toks, Ncs) ->
  -    {more,{Cs,Col,Toks,Line,Ncs,fun scan_number/6}};
  -scan_number([$#|Cs]=Cs0, St, Line, Col, Toks, Ncs0) ->
  +    scan_number(Cs, St, Line, Col, Toks, [Next,$_|Ncs], with_underscore);
  +scan_number([$.,C|Cs], St, Line, Col, Toks, Ncs, Us) when ?DIGIT(C) ->
  +    scan_fraction(Cs, St, Line, Col, Toks, [C,$.|Ncs], Us);
  +scan_number([$.]=Cs, _St, Line, Col, Toks, Ncs, Us) ->
  +    {more,{Cs,Col,Toks,Line,{Ncs,Us},fun scan_number/6}};
  +scan_number([$#|Cs]=Cs0, St, Line, Col, Toks, Ncs0, Us) ->
       Ncs = lists:reverse(Ncs0),
  -    case catch list_to_integer(remove_digit_separators(Ncs)) of
  +    case catch list_to_integer(remove_digit_separators(Ncs, Us)) of
           B when B >= 2, B =< 1+$Z-$A+10 ->
               Bcs = Ncs++[$#],
  -            scan_based_int(Cs, St, Line, Col, Toks, {B,[],Bcs});
  +            scan_based_int(Cs, St, Line, Col, Toks, {B,[],Bcs}, no_underscore);
           B ->
               Len = length(Ncs),
               scan_error({base,B}, Line, Col, Line, incr_column(Col, Len), Cs0)
       end;
  -scan_number([]=Cs, _St, Line, Col, Toks, Ncs) ->
  -    {more,{Cs,Col,Toks,Line,Ncs,fun scan_number/6}};
  -scan_number(Cs, St, Line, Col, Toks, Ncs0) ->
  +scan_number([]=Cs, _St, Line, Col, Toks, Ncs, Us) ->
  +    {more,{Cs,Col,Toks,Line,{Ncs,Us},fun scan_number/6}};
  +scan_number(Cs, St, Line, Col, Toks, Ncs0, Us) ->
       Ncs = lists:reverse(Ncs0),
  -    case catch list_to_integer(remove_digit_separators(Ncs)) of
  +    case catch list_to_integer(remove_digit_separators(Ncs, Us)) of
           N when is_integer(N) ->
               tok3(Cs, St, Line, Col, Toks, integer, Ncs, N);
           _ ->
  
positive.code:             scan_error({illegal,integer}, Line, Col, Line, Ncol, Cs)
      end.
  
  scan_fraction([C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
      scan_fraction(Cs, St, Line, Col, Toks, [C|Ncs]);
  scan_fraction([$_,Next|Cs], St, Line, Col, Toks, [Prev|_]=Ncs) when
        ?DIGIT(Next) andalso ?DIGIT(Prev) ->
      scan_fraction(Cs, St, Line, Col, Toks, [Next,$_|Ncs]);
  scan_fraction([E|Cs], St, Line, Col, Toks, Ncs) when E =:= $e; E =:= $E ->
      scan_exponent_sign(Cs, St, Line, Col, Toks, [E|Ncs]);
  scan_fraction([]=Cs, _St, Line, Col, Toks, Ncs) ->
      {more,{Cs,Col,Toks,Line,Ncs,fun scan_fraction/6}};
  scan_fraction(Cs, St, Line, Col, Toks, Ncs) ->
      float_end(Cs, St, Line, Col, Toks, Ncs).
  
  scan_exponent_sign([C|Cs], St, Line, Col, Toks, Ncs) when C =:= $+; C =:= $- ->
      scan_exponent(Cs, St, Line, Col, Toks, [C|Ncs]);
  scan_exponent_sign([]=Cs, _St, Line, Col, Toks, Ncs) ->
      {more,{Cs,Col,Toks,Line,Ncs,fun scan_exponent_sign/6}};
  scan_exponent_sign(Cs, St, Line, Col, Toks, Ncs) ->
      scan_exponent(Cs, St, Line, Col, Toks, Ncs).
  
  scan_exponent([C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
      scan_exponent(Cs, St, Line, Col, Toks, [C|Ncs]);
  scan_exponent([$_,Next|Cs], St, Line, Col, Toks, [Prev|_]=Ncs) when
        ?DIGIT(Next) andalso ?DIGIT(Prev) ->
      scan_exponent(Cs, St, Line, Col, Toks, [Next,$_|Ncs]);
  scan_exponent([]=Cs, _St, Line, Col, Toks, Ncs) ->
      {more,{Cs,Col,Toks,Line,Ncs,fun scan_exponent/6}};
  scan_exponent(Cs, St, Line, Col, Toks, Ncs) ->
      float_end(Cs, St, Line, Col, Toks, Ncs).
  
  float_end(Cs, St, Line, Col, Toks, Ncs0) ->
      Ncs = lists:reverse(Ncs0),
      case catch list_to_float(remove_digit_separators(Ncs)) of
          F when is_float(F) ->
              tok3(Cs, St, Line, Col, Toks, float, Ncs, F);
          _ ->
  
negative.code: %%
  %% %CopyrightBegin%
  %%
  %% Copyright Ericsson AB 1996-2019. All Rights Reserved.
  %%
  %% Licensed under the Apache License, Version 2.0 (the "License");
  %% you may not use this file except in compliance with the License.
  