[erlang-questions] Are newlines significant in Erlang grammar?
Wed Dec 21 00:51:40 CET 2011
On Tue, Dec 20, 2011 at 6:39 PM, Jeff Schultz <>wrote:
> On Tue, Dec 20, 2011 at 01:33:18PM -0500, Daniel Dormont wrote:
> > Actually that's an interesting point. Is there really no other place in
> > Erlang grammar where whitespace is required? My gut instinct tells me
> > must be a few, because every language has a few right? I mean, if nothing
> > else to separate two identifiers? But thinking a little more, I realize
> > Erlang doesn't have "identifiers" in the sense most other languages do
> > even then, there's always some sort of punctuation. Is this period
> > the only exception?
> Erlang has operators that are alphabetic. X orelse Y really does
> need the whitespace. And 1.5 is not the same thing as 1 . 5.
> Ah of course. I knew I was missing something. Just a brain fart.
> Handling whitespace is a job for the lexer. Just ensure that the '.'
> <whitespace> sequence produces an end-of-term token instead of some
> dot token and treat other unquoted whitespace as a token terminator.
> Jeff Schultz
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions