[erlang-patches] Scan "=<<" as something useful

Anthony Ramine n.oxyde@REDACTED
Tue Apr 30 11:23:14 CEST 2013


Hello Kostis,

Do you really think this need to be changed if my patch is accepted? I wanted to fix an ambiguity that surprises people, not an ambiguity nobody encounters.

Regards,

-- 
Anthony Ramine

Le 29 avr. 2013 à 22:07, Kostis Sagonas a écrit :

> If the patch is to be accepted and some machinery is to be added to the scanner to intelligently break occurrences of =<<, =<<<<, ... into tokens, the same cleverness needs to be introduced to the cases of <<<, <<<<<, ... which currently also result in syntax errors:
> 
> Eshell V5.10.2  (abort with ^G)
> 1> 42=<<<42>>.
> true
> 2> 42<<<42>>.
> * 1: syntax error before: '<<'
> 2> 42< <<42>>.
> true
> 3> 42<<<<<42>>/binary>>.
> * 1: syntax error before: '<<'
> 3> 42< <<<<42>>/binary>>.
> true
> 
> The above is also a side-effect of maximal munch from left to right, which Anthony's current patch does not handle, if I am not mistaken. Otherwise, it would be inconsistent.




More information about the erlang-patches mailing list