> Hi,
>
> I have a small suggestion w.r.t. the language specs of Neko:
>
> one of the alternatives for "expr" is:
>
> { ident1 => expr1 , ident2 => expr2 ... }
>
> if I'm correct, the comma is optional. People may think the "..." is a token
> as well (as some languages, such as Lua have that token too)
> Then, this would be a more formal and precise way of writing:
>
> "{"( ident => expr [","])* "}"
>
> (this says, zero or more times an identifier/arrow/expression tuple, followed
> by an optional comma, all of them within braces)
>
> (furthermore, it would also be better to denote tokens that occur literally,
> such as the "{", within quotes, in order to be able to differentiate them
> from
> BNF syntax, which for instance also uses "(" for grouping, as above)
I agree that the current specification is a bit far from classic BNF
notation, but it's a quite difficult to express the differences between
tokens and grammar rules with ASCII text only and while keeping the
syntax picture accessible to people that are not familiar with such rules.
Nicolas
--
Neko : One VM to run them all
(http://nekovm.org)