Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

515 lines (511 sloc) 30.641 kB
This text is copied out of ECMAScript Edition 3 Final, 24 Mar 2000.
SourceCharacter :: See section 6
any Unicode character
InputElementDiv :: See section 6
WhiteSpace
LineTerminator
Comment
Token
DivPunctuator
InputElementRegExp :: See section 6
WhiteSpace
LineTerminator
Comment
Token
RegularExpressionLiteral
WhiteSpace :: See section 7.2
<TAB>
<VT>
<FF>
<SP>
<NBSP>
<USP>
LineTerminator :: See section 7.3
<LF>
<CR>
<LS>
<PS>
Comment :: See section 7.4
MultiLineComment
SingleLineComment
MultiLineComment :: See section 7.4
/* MultiLineCommentCharsopt */
MultiLineCommentChars :: See section 7.4
MultiLineNotAsteriskChar MultiLineCommentCharsopt
* PostAsteriskCommentCharsopt
PostAsteriskCommentChars :: See section 7.4
MultiLineNotForwardSlashOrAsteriskChar MultiLineCommentCharsopt
* PostAsteriskCommentCharsopt
MultiLineNotAsteriskChar :: See section 7.4
SourceCharacter but not asterisk *
MultiLineNotForwardSlashOrAsteriskChar :: See section 7.4
SourceCharacter but not forward-slash / or asterisk *
SingleLineComment :: See section 7.4
// SingleLineCommentCharsopt
SingleLineCommentChars :: See section 7.4
SingleLineCommentChar SingleLineCommentCharsopt
SingleLineCommentChar :: See section 7.4
SourceCharacter but not LineTerminator
Token :: See section 7.5
ReservedWord
Identifier
Punctuator
NumericLiteral
StringLiteral
ReservedWord :: See section 7.5.1
Keyword
FutureReservedWord
NullLiteral
BooleanLiteral
Keyword :: one of See section 7.5.2
break else new var
case finally return void
catch for switch while
continue function this with
default if throw
delete in try
do instanceof typeof
FutureReservedWord :: one of See section 7.5.3
abstract enum int short
boolean export interface static
byte extends long super
char final native synchronized
class float package throws
const goto private transient
debugger implements protected volatile
double import public
Identifier :: See section 7.6
IdentifierName but not ReservedWord
IdentifierName :: See section 7.6
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart :: See section 7.6
UnicodeLetter
$
_
UnicodeEscapeSequence
IdentifierPart :: See section 7.6
IdentifierStart
UnicodeCombiningMark
UnicodeDigit
UnicodeConnectorPunctuation
UnicodeEscapeSequence
UnicodeLetter See section 7.6
any character in the Unicode categories “Uppercase letter (Lu)”, “Lowercase letter (Ll)”, “Titlecase letter (Lt)”,
“Modifier letter (Lm)”, “Other letter (Lo)”, or “Letter number (Nl)”.
UnicodeCombiningMark See section 7.6
any character in the Unicode categories “Non-spacing mark (Mn)” or “Combining spacing mark (Mc)”
UnicodeDigit See section 7.6
any character in the Unicode category “Decimal number (Nd)”
UnicodeConnectorPunctuation See section 7.6
any character in the Unicode category “Connector punctuation (Pc)”
UnicodeEscapeSequence :: See section 7.6
\u HexDigit HexDigit HexDigit HexDigit
HexDigit :: one of See section 7.6
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
Punctuator :: one of See section 7.7
{ } ( ) [ ]
. ; , < > <=
>= == != === !==
+ - * % ++ --
<< >> >>> & | ^
! ~ && || ? :
= += -= *= %= <<=
>>= >>>= &= |= ^=
{ } ( ) [ ]
DivPunctuator :: one of See section 7.7
/ /=
Literal :: See section 7.8
NullLiteral
BooleanLiteral
NumericLiteral
StringLiteral
NullLiteral :: See section 7.8.1
null
BooleanLiteral :: See section 7.8.2
true
false
NumericLiteral :: See section 7.8.3
DecimalLiteral
HexIntegerLiteral
DecimalLiteral :: See section 7.8.3
DecimalIntegerLiteral . DecimalDigitsopt ExponentPartopt
. DecimalDigits ExponentPartopt
DecimalIntegerLiteral ExponentPartopt
DecimalIntegerLiteral :: See section 7.8.3
0
NonZeroDigit DecimalDigitsopt
DecimalDigits :: See section 7.8.3
DecimalDigit
DecimalDigits DecimalDigit
DecimalDigit :: one of See section 7.8.3
0 1 2 3 4 5 6 7 8 9
ExponentIndicator :: one of See section 7.8.3
e E
SignedInteger :: See section 7.8.3
DecimalDigits
+ DecimalDigits
- DecimalDigits
HexIntegerLiteral :: See section 7.8.3
0x HexDigit
0X HexDigit
HexIntegerLiteral HexDigit
StringLiteral :: See section 7.8.4
" DoubleStringCharactersopt "
' SingleStringCharactersopt '
DoubleStringCharacters :: See section 7.8.4
DoubleStringCharacter DoubleStringCharactersopt
SingleStringCharacters :: See section 7.8.4
SingleStringCharacter SingleStringCharactersopt
DoubleStringCharacter :: See section 7.8.4
SourceCharacter but not double-quote " or backslash \ or LineTerminator
\ EscapeSequence
SingleStringCharacter :: See section 7.8.4
SourceCharacter but not single-quote ' or backslash \ or LineTerminator
\ EscapeSequence
EscapeSequence :: See section 7.8.4
CharacterEscapeSequence
0 [lookahead ∉ DecimalDigit]
HexEscapeSequence
UnicodeEscapeSequence
CharacterEscapeSequence :: See section 7.8.4
SingleEscapeCharacter
NonEscapeCharacter
SingleEscapeCharacter :: one of See section 7.8.4
' " \ b f n r t v
EscapeCharacter :: See section 7.8.4
SingleEscapeCharacter
DecimalDigit
x
u
HexEscapeSequence :: See section 7.8.4
x HexDigit HexDigit
UnicodeEscapeSequence :: See section 7.8.4
u HexDigit HexDigit HexDigit HexDigit
RegularExpressionLiteral :: See section 7.8.5
/ RegularExpressionBody / RegularExpressionFlags
RegularExpressionBody :: See section 7.8.5
RegularExpressionFirstChar RegularExpressionChars
RegularExpressionChars :: See section 7.8.5
[empty]
RegularExpressionChars RegularExpressionChar
RegularExpressionFirstChar :: See section 7.8.5
NonTerminator but not * or \ or /
BackslashSequence
RegularExpressionChar :: See section 7.8.5
NonTerminator but not \ or /
BackslashSequence
BackslashSequence :: See section 7.8.5
\ NonTerminator
NonTerminator :: See section 7.8.5
SourceCharacter but not LineTerminator
RegularExpressionFlags :: See section 7.8.5
[empty]
RegularExpressionFlags IdentifierPart
A.2 Number Conversions
StringNumericLiteral ::: See section 9.3.1
StrWhiteSpaceopt
StrWhiteSpaceopt StrNumericLiteral StrWhiteSpaceopt
StrWhiteSpace ::: See section 9.3.1
StrWhiteSpaceChar StrWhiteSpaceopt
StrWhiteSpaceChar ::: See section 9.3.1
<TAB>
<SP>
<NBSP>
<FF>
<VT>
<CR>
<LF>
<LS>
<PS>
<USP>
StrNumericLiteral ::: See section 9.3.1
StrDecimalLiteral
HexIntegerLiteral
StrDecimalLiteral ::: See section 9.3.1
StrUnsignedDecimalLiteral
+ StrUnsignedDecimalLiteral
- StrUnsignedDecimalLiteral
StrUnsignedDecimalLiteral ::: See section 9.3.1
Infinity
DecimalDigits . DecimalDigitsopt ExponentPartopt
. DecimalDigits ExponentPartopt
DecimalDigits ExponentPartopt
DecimalDigits ::: See section 9.3.1
DecimalDigit
DecimalDigits DecimalDigit
DecimalDigit ::: one of See section 9.3.1
0 1 2 3 4 5 6 7 8 9
ExponentPart ::: See section 9.3.1
ExponentIndicator SignedInteger
ExponentIndicator ::: one of See section 9.3.1
e E
SignedInteger ::: See section 9.3.1
DecimalDigits
+ DecimalDigits
- DecimalDigits
HexIntegerLiteral ::: See section 9.3.1
0x HexDigit
0X HexDigit
HexIntegerLiteral HexDigit
HexDigit ::: one of See section 9.3.1
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
A.3 Expressions
PrimaryExpression : See section 11.1
this
Identifier
Literal
ArrayLiteral
ObjectLiteral
( Expression )
ArrayLiteral : See section 11.1.4
[ Elisionopt ]
[ ElementList ]
[ ElementList , Elisionopt ]
ElementList : See section 11.1.4
Elisionopt AssignmentExpression
ElementList , Elisionopt AssignmentExpression
Elision : See section 11.1.4
,
Elision ,
ObjectLiteral : See section 11.1.5
{ }
{ PropertyNameAndValueList }
PropertyNameAndValueList : See section 11.1.5
PropertyName : AssignmentExpression
PropertyNameAndValueList , PropertyName : AssignmentExpression
PropertyName : See section 11.1.5
Identifier
StringLiteral
NumericLiteral
MemberExpression : See section 11.2
PrimaryExpression
FunctionExpression
MemberExpression [ Expression ]
MemberExpression . Identifier
new MemberExpression Arguments
NewExpression : See section 11.2
MemberExpression
new NewExpression
CallExpression : See section 11.2
MemberExpression Arguments
CallExpression Arguments
CallExpression [ Expression ]
CallExpression . Identifier
Arguments : See section 11.2
()
( ArgumentList )
ArgumentList : See section 11.2
AssignmentExpression
ArgumentList , AssignmentExpression
LeftHandSideExpression : See section 11.2
NewExpression
CallExpression
PostfixExpression : See section 11.3
LeftHandSideExpression
LeftHandSideExpression [no LineTerminator here] ++
LeftHandSideExpression [no LineTerminator here] --
UnaryExpression : See section 11.4
PostfixExpression
delete UnaryExpression
void UnaryExpression
typeof UnaryExpression
++ UnaryExpression
-- UnaryExpression
+ UnaryExpression
- UnaryExpression
~ UnaryExpression
! UnaryExpression
MultiplicativeExpression : See section 11.5
UnaryExpression
MultiplicativeExpression * UnaryExpression
MultiplicativeExpression / UnaryExpression
MultiplicativeExpression % UnaryExpression
AdditiveExpression : See section 11.6
MultiplicativeExpression
AdditiveExpression + MultiplicativeExpression
AdditiveExpression - MultiplicativeExpression
ShiftExpression : See section 11.7
AdditiveExpression
ShiftExpression << AdditiveExpression
ShiftExpression >> AdditiveExpression
ShiftExpression >>> AdditiveExpression
RelationalExpression : See section 11.8
ShiftExpression
RelationalExpression < ShiftExpression
RelationalExpression > ShiftExpression
RelationalExpression <= ShiftExpression
RelationalExpression >= ShiftExpression
RelationalExpression instanceof ShiftExpression
RelationalExpression in ShiftExpression
RelationalExpressionNoIn : See section 11.8
ShiftExpression
RelationalExpressionNoIn < ShiftExpression
RelationalExpressionNoIn > ShiftExpression
RelationalExpressionNoIn <= ShiftExpression
RelationalExpressionNoIn >= ShiftExpression
RelationalExpressionNoIn instanceof ShiftExpression
EqualityExpression : See section 11.9
RelationalExpression
EqualityExpression == RelationalExpression
EqualityExpression != RelationalExpression
EqualityExpression === RelationalExpression
EqualityExpression !== RelationalExpression
EqualityExpressionNoIn : See section 11.9
RelationalExpressionNoIn
EqualityExpressionNoIn == RelationalExpressionNoIn
EqualityExpressionNoIn != RelationalExpressionNoIn
EqualityExpressionNoIn === RelationalExpressionNoIn
EqualityExpressionNoIn !== RelationalExpressionNoIn
BitwiseANDExpression : See section 11.10
EqualityExpression
BitwiseANDExpression & EqualityExpression
BitwiseANDExpressionNoIn : See section 11.10
EqualityExpressionNoIn
BitwiseANDExpressionNoIn & EqualityExpressionNoIn
BitwiseXORExpression : See section 11.10
BitwiseANDExpression
BitwiseXORExpression ^ BitwiseANDExpression
BitwiseXORExpressionNoIn : See section 11.10
BitwiseANDExpressionNoIn
BitwiseXORExpressionNoIn ^ BitwiseANDExpressionNoIn
BitwiseORExpression : See section 11.10
BitwiseXORExpression
BitwiseORExpression | BitwiseXORExpression
BitwiseORExpressionNoIn : See section 11.10
BitwiseXORExpressionNoIn
BitwiseORExpressionNoIn | BitwiseXORExpressionNoIn
LogicalANDExpression : See section 11.11
BitwiseORExpression
LogicalANDExpression && BitwiseORExpression
LogicalANDExpressionNoIn : See section 11.11
BitwiseORExpressionNoIn
LogicalANDExpressionNoIn && BitwiseORExpressionNoIn
LogicalORExpression : See section 11.11
LogicalANDExpression
LogicalORExpression || LogicalANDExpression
LogicalORExpressionNoIn : See section 11.11
LogicalANDExpressionNoIn
LogicalORExpressionNoIn || LogicalANDExpressionNoIn
ConditionalExpression : See section 11.12
LogicalORExpression
LogicalORExpression ? AssignmentExpression : AssignmentExpression
ConditionalExpressionNoIn : See section 11.12
LogicalORExpressionNoIn
LogicalORExpressionNoIn ? AssignmentExpressionNoIn : AssignmentExpressionNoIn
AssignmentExpression : See section 11.13
ConditionalExpression
LeftHandSideExpression AssignmentOperator AssignmentExpression
AssignmentExpressionNoIn : See section 11.13
ConditionalExpressionNoIn
LeftHandSideExpression AssignmentOperator AssignmentExpressionNoIn
AssignmentOperator : one of See section 11.13
= *= /= %= += -= <<= >>= >>>= &= ^= |=
Expression : See section 11.14
AssignmentExpression
Expression , AssignmentExpression
ExpressionNoIn : See section 11.14
AssignmentExpressionNoIn
ExpressionNoIn , AssignmentExpressionNoIn
A.4 Statements
Statement : See section 12
Block
VariableStatement
EmptyStatement
ExpressionStatement
IfStatement
IterationStatement
ContinueStatement
BreakStatement
ReturnStatement
WithStatement
LabelledStatement
SwitchStatement
ThrowStatement
TryStatement
Block : See section 12.1
{ StatementListopt }
StatementList : See section 12.1
Statement
StatementList Statement
VariableStatement : See section 12.2
var VariableDeclarationList ;
VariableDeclarationList : See section 12.2
VariableDeclaration
VariableDeclarationList , VariableDeclaration
VariableDeclarationListNoIn : See section 12.2
VariableDeclarationNoIn
VariableDeclarationListNoIn , VariableDeclarationNoIn
VariableDeclaration : See section 12.2
Identifier Initialiseropt
VariableDeclarationNoIn : See section 12.2
Identifier InitialiserNoInopt
Initialiser : See section 12.2
= AssignmentExpression
InitialiserNoIn : See section 12.2
= AssignmentExpressionNoIn
EmptyStatement : See section 12.3
;
ExpressionStatement : See section 12.4
Expression ;
[lookahead ∉ {{, function}]
IfStatement : See section 12.5
if ( Expression ) Statement else Statement
if ( Expression ) Statement
IterationStatement : See section 12.6
do Statement while ( Expression );
while ( Expression ) Statement
for (ExpressionNoInopt; Expressionopt ; Expressionopt ) Statement
for ( var VariableDeclarationListNoIn; Expressionopt ; Expressionopt ) Statement
for ( LeftHandSideExpression in Expression ) Statement
for ( var VariableDeclarationNoIn in Expression ) Statement
ContinueStatement : See section 12.7
continue [no LineTerminator here] Identifieropt ;
BreakStatement : See section 12.8
break [no LineTerminator here] Identifieropt ;
ReturnStatement : See section 12.9
return [no LineTerminator here] Expressionopt ;
WithStatement : See section 12.10
with ( Expression ) Statement
SwitchStatement : See section 12.11
switch ( Expression ) CaseBlock
CaseBlock : See section 12.11
{ CaseClausesopt }
{ CaseClausesopt DefaultClause CaseClausesopt }
CaseClauses : See section 12.11
CaseClause
CaseClauses CaseClause
CaseClause : See section 12.11
case Expression : StatementListopt
DefaultClause : See section 12.11
default : StatementListopt
LabelledStatement : See section 12.12
Identifier : Statement
ThrowStatement : See section 12.13
throw [no LineTerminator here] Expression ;
TryStatement : See section 12.14
try Block Catch
try Block Finally
try Block Catch Finally
Catch : See section 12.14
catch (Identifier ) Block
Finally : See section 12.14
finally Block
A.5 Functions and Programs
FunctionDeclaration : See section 13
function Identifier ( FormalParameterListopt ) { FunctionBody }
FunctionExpression : See section 13
function Identifieropt ( FormalParameterListopt ) { FunctionBody }
FormalParameterList : See section 13
Identifier
FormalParameterList , Identifier
FunctionBody : See section 13
SourceElements
Program : See section 14
SourceElements
SourceElements : See section 14
SourceElement
SourceElements SourceElement
SourceElement :
Statement
FunctionDeclaration
Jump to Line
Something went wrong with that request. Please try again.