I'm observing the python grammar listed in the manual and considering the outputs of their form of EBNF, specifically with varargslist:
varargslist: (vfpdef ['=' test] (',' vfpdef ['=' test])* [',' [
'*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]]
| '**' vfpdef [',']]]
| '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]]
| '**' vfpdef [',']
Though I'm specifically interested in this section:
['*' [vfpdef] (',' vfpdef ['=' test])* ]
Which I interpret as:
[ [ non-terminal1 ] ( non-terminal2) ]
I realize that both
non-terminal1 (non-terminal2)
(non-terminal2)
Are valid options in this form, but does this include:
non-terminal1
as well? The wiki page for EBNF states
That is, everything that is set within the square brackets may be
present just once, or not at all
but does this group everything within the square brackets as one entity that may appear only once, or is the option selective, for example:
[ [non-terminal1] [(non-terminal2)] ]