14 Program
Syntax
- Program :
- SourceElements
- SourceElements :
- SourceElement
SourceElements SourceElement
- SourceElement :
- Statement FunctionDeclaration
Semantics
The production Program : SourceElements is evaluated as follows:
- Process SourceElements for function declarations.
- Evaluate SourceElements.
- Return Result(2).
The production SourceElements : SourceElement is processed for function declarations as follows:
1. Process SourceElement for function declarations.
The production SourceElements : SourceElement is evaluated as follows:
- Evaluate SourceElement.
- Return Result(1).
The production SourceElements : SourceElements SourceElement is processed for function declarations as follows:
- Process SourceElements for function declarations.
- Process SourceElement for function declarations.
The production SourceElements : SourceElements SourceElement is evaluated as follows:
- Evaluate SourceElements.
- Evaluate SourceElement.
- If Result(2) is a value completion, return Result(2).
- Return Result(1).
The production SourceElement : Statement is processed for function declarations by taking no action.
The production SourceElement : Statement is evaluated as follows:
- Evaluate Statement .
- Return Result(1).
The production SourceElement : FunctionDeclaration is processed for function declarations as follows:
1. Process FunctionDeclaration for function declarations.
The production SourceElement : FunctionDeclaration is evaluated as follows:
1. Return "normal completion".