[erlang-questions] sytax of atoms

Robert Virding robert.virding@REDACTED
Sun Apr 15 19:16:42 CEST 2007


Sigh. I'm easy :-) :

[a-z][A-Za-z0-9_-@]*
'(\\\^.|\\.|[^'])*'

The dot should not be there because, as Richard Carlsson pointed out, 
that a.b is actually tokenised as three tokens 'a' '.' 'b' and then 
combined in the parser*. N.B. no spaces allowed after '.'.

Robert

* For those interested the actual scan is {atom,1,a},{'.',1},{atom,1,b}.

Julian Fondren wrote:
> On 4/15/07, Robert Virding <robert.virding@REDACTED> wrote:
>> As regular expressions for leex:
>>
>> [a-z][A-Za-z0-9_-.]*
>> '(\\\^.|\\.|[^'])*'
> 
> counterexample: a@REDACTED
> 



More information about the erlang-questions mailing list