[erlang-questions] erl_scan issues

Éric Pailleau eric.pailleau@REDACTED
Tue Apr 21 14:04:25 CEST 2015

I suppose because a dot, as well any further blanks and a newline is the normal end of an Erlang term.
Using scan for another purpose may result in this unespected behaviour. 

Le 21 avr. 2015 13:53, Vlad Dumitrescu <vladdu55@REDACTED> a écrit :
> Hi!
> I found some unexpected behaviour for erl_scan and I hope someone can shed a light as to if it's supposed to be like that or it's a bug. IMHO the latter applies.
> > erl_scan:string("a. b",{1,1},[return,text]).
> {ok,[{atom,[{line,1},{column,1},{text,"a"}],a},
>      {dot,[{line,1},{column,2},{text,". "}]},
>      {atom,[{line,1},{column,4},{text,"b"}],b}],
>     {1,5}}
> In short, the first newline or whitespace after a dot is included in the textual representation of the token. Why would anyone have that?
> regards,
> Vlad

More information about the erlang-questions mailing list