« Bugzilla Issues Index

#1236 — 12.11: odd use of "[empty]"

In 5.1.6 "Grammar Notation", it says:
If the phrase “[empty]” appears as the right-hand side of a production,
it indicates that the production's right-hand side contains no terminals
or nonterminals.

But in 12.11 "The switch Statement",
under "Runtime Semantics: Evaluation",
rule 2 is headed by production:
CaseClause : case Expression : [empty]
and rule 4 by:
DefaultClause : default: [empty]

In these cases, "[empty]" does not appear *as* the the right-hand side of a production, but *in* the right-hand side, along with other symbols, which isn't a usage described in 5.1.6.

In these cases, it's apparently meant to be a placeholder for an omitted StatementList, but the spec normally handles that by simply not having anything there, i.e.:
CaseClause : case Expression :
DefaultClause : default :

fixed in rev 14 editor's draft

in Rev 14 draft