<list> := [<type>] "[" <listItems> [","] "]" <listItems> := "," | (<expr> ("," <expr>)*)
The <list> rule seems to allow the list literal [ , , ]
[ , , ]
But that gives a compile error:
Expected ']', not ','
I think that's a grammar glitch; this might be more accurate:
<list> := [<type>] "[" <listItems> "]" <listItems> := "," | (<expr> ("," <expr>)*) [","]
<listItems> can be either:
Doubled-comma definitely not allowed, surely.
Kevin is right - that is just a grammar doc problem (the parser is right). I pushed a fix to the docs
Login or Signup to reply.
Jens Tue 10 Apr 2012
The <list> rule seems to allow the list literal
[ , , ]
But that gives a compile error:
KevinKelley Tue 10 Apr 2012
I think that's a grammar glitch; this might be more accurate:
<listItems> can be either:
Doubled-comma definitely not allowed, surely.
brian Sat 14 Apr 2012
Kevin is right - that is just a grammar doc problem (the parser is right). I pushed a fix to the docs