archives

« Bugzilla Issues Index

#1598 — production mis-matches


[The Version of this bug should be Rev 16.]

In a few cases (I believe this bug lists all of them),
a production appearing in a Static Semantics section
does not match the production as defined in a Syntax section.

--------------------

13.1 / Syntax
says:
FunctionBody : FunctionStatementList

which is not matched by:

13.1.1.1 / Static Semantics: VarDeclaredNames / rule 2
FunctionBody : [empty]

13.1.1.1 / Static Semantics: VarDeclaredNames / rule 3
FunctionBody : StatementList

13.1.1.2 / Runtime Semantics: EvaluateBody / rule 1
FunctionBody : FunctionStatementList_opt

In the first two, just change 'FunctionBody' to 'FunctionStatementList'.

For the third, delete the "opt".
Also. in the associated algorithm, step 2 says:
If FunctionStatementList is not present, then return
NormalCompletion(undefined).
but FunctionStatementList isn't optional, so can't be absent.
Change the condition to something like:
If the FunctionStatementList derives [empty], ...

(Mind you, I'm not sure why FunctionStatementList exists.
The spec used to say
FunctionBody : StatementList_opt
and I can't see any reason why that wouldn't still work.)

--------------------

13.3 / Syntax
says:
MethodDefinition :
PropertyName ( StrictFormalParameters ) { FunctionBody }

which is not matched by:

13.3.1.1 / Static Semantics: PropName / rule 1
MethodDefinition :
PropertyName ( FormalParameters ) { FunctionBody }

13.3.1.1 / Static Semantics: ReferencesSuper / rule 1
MethodDefinition :
PropertyName ( FormalParameters ) { FunctionBody }

Change "FormalParameters" to "StrictFormalParameters" in those
two productions, and also in the algorithm that accompanies
the second.

--------------------

13.4 / Syntax
says:
GeneratorMethod :
* PropertyName ( StrictFormalParameters ) { FunctionBody }

which is not matched by:

13.4.1.1 / Static Semantics: PropName / rule 1
GeneratorMethod :
* PropertyName ( FormalParameters ) { FunctionBody }

13.4.1.1 / Static Semantics: ReferencesSuper / rule 1
GeneratorMethod :
* PropertyName ( FormalParameters ) { FunctionBody }

As in the above group.

--------------------


fixed in rev19 editor's draft


fixed in rev19