The production Program : SourceElementsopt is evaluated as follows:
NOTE The processes for initiating the evaluation of a Program and for dealing with the result of such an evaluation are defined by an ECMAScript implementation and not by this specification.
The production SourceElements : SourceElements SourceElement is evaluated as follows:
The production SourceElement : Statement is evaluated as follows:
The production SourceElement : FunctionDeclaration is evaluated as follows:
A Directive Prologue is the longest sequence of ExpressionStatement productions occurring as the initial SourceElement productions of a Program or FunctionBody and where each ExpressionStatement in the sequence consists entirely of a StringLiteral token followed a semicolon. The semicolon may appear explicitly or may be inserted by automatic semicolon insertion. A Directive Prologue may be an empty sequence.
A Use Strict Directive is an ExpressionStatement in a Directive Prologue whose StringLiteral is either the exact character sequences
"use strict" or
'use strict'. A Use Strict Directive may not contain an EscapeSequence or LineContinuation.
A Directive Prologue may contain more than one Use Strict Directive. However, an implementation may issue a warning if this occurs.
NOTE The ExpressionStatement productions of a Directive Prologue are evaluated normally during evaluation of the containing SourceElements production. Implementations may define implementation specific meanings for ExpressionStatement productions which are not a Use Strict Directive and which occur in a Directive Prologue. If an appropriate notification mechanism exists, an implementation should issue a warning if it encounters in a Directive Prologue an ExpressionStatement that is not a Use Strict Directive or which does not have a meaning defined by the implementation.