[erlang-questions] BNF/EBNF Grammar for Erlang
Kostis Sagonas
kostis@REDACTED
Sun Nov 13 18:40:08 CET 2011
On 11/13/11 19:26, Ryan Molden wrote:
>
> As an aside can you give me info/pointers on where to find info on the
> following terminals?
>
> ':-' This seems to be used around 'rules' (which I have never seen in
> any Erlang program I have looked at, but I am a newb). Examples or even
> just a name for this syntactic construct would be nice. My lexer token
> currently calls it RULETHINGY :)
>
> '..' Never seen this, but it is listed in the YRL file as a
> terminal. Name and meaning would be nice.
>
> '...' Never seen this, but it is listed in the YRL file as a
> terminal. Name and meaning would be nice.
The last two are used in the language of type declarations that Erlang
has. The first is used to declare integer ranges, as in:
-type small_int() :: 1..42.
and the second one to declare non-empty lists of some type, as in:
-type sil() :: [small_int(),...].
Kostis
More information about the erlang-questions
mailing list