I've been wondering what's the meaning of "alternative" in ecma262.
i've seen that the term "alternative" was used many times in the spec.
here are some examples:
quote taken from this section
so, in this example, the nonterminal ForStatement actually has four alternative right-hand sides.
quote taken from this section
A production that has multiple alternative definitions will typically have a distinct algorithm for each alternative
quote taken from this section
a production that has multiple alternative definitions will typically have for each alternative a distinct algorithm for each applicable named static semantic rule.
what does it mean "production that has multiple alternative definitions" ?
i assume that alternative mean the right hand side of a production, here is a simple picture that shows what i mean.
on the picture we can see that the area covered by Pink is the whole Production.
and the area covered by Red is the Nonterminal
finally i'm assuming that the area covered by purple is the Alternative
A production that has multiple alternative definitions will typically have a distinct algorithm for each alternative
however it's still doesn't sounds right, because how can a one individual production have multiple alternatives ?