[php-langspec][Issue #232] - Describe list expression differently to remove some constraits

[email protected] Sat, 22 Dec 2018 00:57:37 +0000
Newsgroups php.standards
Message-ID <[email protected]>
You can view the Issue on github:
https://github.com/php/php-langspec/issues/232

Opened By: zhujinxuan
Issue Description:
Hi, I think it is perhaps better to document the `list-expression` in this way, which automatically ensures there is at least one valid element:

```
list-intrinsic:
   list   (   list-expression-list   )

list-expression-list:
  commas? list-element commas?
  commas? list-element , list-expression-list?

commas:
  ,
  , commas

list-element
   expression   =>   list-or-variable
   list-or-variable
```

Then we can remove the following constraints documentation:
> At least one of the elements of the list-expression-list must be non-empty.

I think this makes the document a bit neater and parser can write the list parser just by reading the expression.