Terminals
General tokens: Identifier   Number   RegularExpression   String   VirtualSemicolon
Punctuation tokens: !   !=   !==   %   %=   &   &&   &&=   &=   (   )   *   *=   +   ++   +=   ,   -   --   -=   .   ...   /   /=   :   ::   ;   <   <<   <<=   <=   =   ==   ===   >   >=   >>   >>=   >>>   >>>=   ?   @   [   ]   ^   ^=   ^^   ^^=   {   |   |=   ||   ||=   }   ~
Future punctuation tokens: #   ->
Reserved words: break   case   catch   class   const   continue   default   delete   do   else   eval   extends   false   final   finally   for   function   if   in   instanceof   new   null   package   private   public   return   super   switch   this   throw   true   try   typeof   var   while   with
Future reserved words: abstract   debugger   enum   export   goto   implements   import   interface   native   protected   static   synchronized   throws   transient   volatile
Non-reserved words: box   constructor   field   get   language   local   method   override   set   version
Expressions
  {allowIn, noIn}
Identifiers
Identifier 
	Identifier
|	box
|	constructor
|	field
|	get
|	language
|	local
|	method
|	set
|	override
|	version
QualifiedIdentifier 
	Identifier
|	QualifiedIdentifier :: Identifier
|	ParenthesizedExpression :: Identifier
Primary Expressions
PrimaryExpression 
	null
|	true
|	false
|	Number
|	Number [no line break] String
|	String
|	this
|	super
|	QualifiedIdentifier
|	? Identifier
|	RegularExpression
|	ParenthesizedExpression
|	ParenthesizedExpression [no line break] String
|	ArrayLiteral
|	ObjectLiteral
|	FunctionExpression
ParenthesizedExpression  ( ExpressionallowIn )
Function Expressions
FunctionExpression 
	AnonymousFunction
|	NamedFunction
Object Literals
ObjectLiteral 
	{ }
|	{ FieldList }
FieldList 
	LiteralField
|	FieldList , LiteralField
LiteralField  FieldName : AssignmentExpressionallowIn
FieldName 
	QualifiedIdentifier
|	String
|	Number
Array Literals
ArrayLiteral  [ ElementList ]
ElementList 
	LiteralElement
|	ElementList , LiteralElement
LiteralElement 
	«empty»
|	AssignmentExpressionallowIn
Postfix Unary Operators
PostfixExpression 
	FullPostfixExpression
|	ShortNewExpression
FullPostfixExpression 
	PrimaryExpression
|	FullNewExpression
|	FullPostfixExpression MemberOperator
|	FullPostfixExpression Arguments
|	PostfixExpression [no line break] ++
|	PostfixExpression [no line break] --
FullNewExpression  new FullNewSubexpression Arguments
ShortNewExpression  new ShortNewSubexpression
FullNewSubexpression 
	PrimaryExpression
|	FullNewSubexpression MemberOperator
|	FullNewExpression
ShortNewSubexpression 
	FullNewSubexpression
|	ShortNewExpression
MemberOperator 
	[ ArgumentList ]
|	. QualifiedIdentifier
|	. ParenthesizedExpression
|	@ QualifiedIdentifier
|	@ ParenthesizedExpression
Arguments  ( ArgumentList )
ArgumentList 
	«empty»
|	ArgumentListPrefix
|	NamedArgumentListPrefix
ArgumentListPrefix 
	AssignmentExpressionallowIn
|	ArgumentListPrefix , AssignmentExpressionallowIn
NamedArgumentListPrefix 
	LiteralField
|	ArgumentListPrefix , LiteralField
|	NamedArgumentListPrefix , LiteralField
Prefix Unary Operators
UnaryExpression 
	PostfixExpression
|	delete PostfixExpression
|	typeof UnaryExpression
|	eval UnaryExpression
|	++ PostfixExpression
|	-- PostfixExpression
|	+ UnaryExpression
|	- UnaryExpression
|	~ UnaryExpression
|	! UnaryExpression
Multiplicative Operators
MultiplicativeExpression 
	UnaryExpression
|	MultiplicativeExpression * UnaryExpression
|	MultiplicativeExpression / UnaryExpression
|	MultiplicativeExpression % UnaryExpression
Additive Operators
AdditiveExpression 
	MultiplicativeExpression
|	AdditiveExpression + MultiplicativeExpression
|	AdditiveExpression - MultiplicativeExpression
Bitwise Shift Operators
ShiftExpression 
	AdditiveExpression
|	ShiftExpression << AdditiveExpression
|	ShiftExpression >> AdditiveExpression
|	ShiftExpression >>> AdditiveExpression
Relational Operators
RelationalExpressionallowIn 
	ShiftExpression
|	RelationalExpressionallowIn < ShiftExpression
|	RelationalExpressionallowIn > ShiftExpression
|	RelationalExpressionallowIn <= ShiftExpression
|	RelationalExpressionallowIn >= ShiftExpression
|	RelationalExpressionallowIn instanceof ShiftExpression
|	RelationalExpressionallowIn in ShiftExpression
RelationalExpressionnoIn 
	ShiftExpression
|	RelationalExpressionnoIn < ShiftExpression
|	RelationalExpressionnoIn > ShiftExpression
|	RelationalExpressionnoIn <= ShiftExpression
|	RelationalExpressionnoIn >= ShiftExpression
|	RelationalExpressionnoIn instanceof ShiftExpression
Equality Operators
EqualityExpression 
	RelationalExpression
|	EqualityExpression == RelationalExpression
|	EqualityExpression != RelationalExpression
|	EqualityExpression === RelationalExpression
|	EqualityExpression !== RelationalExpression
Binary Bitwise Operators
BitwiseAndExpression 
	EqualityExpression
|	BitwiseAndExpression & EqualityExpression
BitwiseXorExpression 
	BitwiseAndExpression
|	BitwiseXorExpression ^ BitwiseAndExpression
|	BitwiseXorExpression ^ *
|	BitwiseXorExpression ^ ?
BitwiseOrExpression 
	BitwiseXorExpression
|	BitwiseOrExpression | BitwiseXorExpression
|	BitwiseOrExpression | *
|	BitwiseOrExpression | ?
Binary Logical Operators
LogicalAndExpression 
	BitwiseOrExpression
|	LogicalAndExpression && BitwiseOrExpression
LogicalXorExpression 
	LogicalAndExpression
|	LogicalXorExpression ^^ LogicalAndExpression
LogicalOrExpression 
	LogicalXorExpression
|	LogicalOrExpression || LogicalXorExpression
Conditional Operator
ConditionalExpression 
	LogicalOrExpression
|	LogicalOrExpression ? AssignmentExpression : AssignmentExpression
NonAssignmentExpression 
	LogicalOrExpression
|	LogicalOrExpression ? NonAssignmentExpression : NonAssignmentExpression
Assignment Operators
AssignmentExpression 
	ConditionalExpression
|	PostfixExpression = AssignmentExpression
|	PostfixExpression CompoundAssignment AssignmentExpression
CompoundAssignment 
	*=
|	/=
|	%=
|	+=
|	-=
|	<<=
|	>>=
|	>>>=
|	&=
|	^=
|	|=
|	&&=
|	^^=
|	||=
Expressions
Expression 
	AssignmentExpression
|	Expression , AssignmentExpression
OptionalExpression 
	ExpressionallowIn
|	«empty»
Type Expressions
TypeExpression  NonAssignmentExpression
Statements
  {abbrev, abbrevNonEmpty, abbrevNoShortIf, full}
TopStatement 
	Statement
|	LanguageDeclaration
Statement 
	AnnotatedDefinition
|	EmptyStatement
|	ExpressionStatement Semicolon
|	AnnotatedBlock
|	LabeledStatement
|	IfStatement
|	SwitchStatement
|	DoStatement Semicolon
|	WhileStatement
|	ForStatement
|	WithStatement
|	ContinueStatement Semicolon
|	BreakStatement Semicolon
|	ReturnStatement Semicolon
|	ThrowStatement Semicolon
|	TryStatement
Semicolonabbrev 
	;
|	VirtualSemicolon
|	«empty»
SemicolonabbrevNonEmpty 
	;
|	VirtualSemicolon
|	«empty»
SemicolonabbrevNoShortIf 
	;
|	VirtualSemicolon
|	«empty»
Semicolonfull 
	;
|	VirtualSemicolon
Empty Statement
EmptyStatementabbrev 
	;
|	«empty»
EmptyStatementabbrevNonEmpty  ;
EmptyStatementabbrevNoShortIf  ;
EmptyStatementfull  ;
Expression Statement
ExpressionStatement  [lookahead{function, {}] ExpressionallowIn
Block
AnnotatedBlock 
	Block
|	Visibility [no line break] Block
Block  { TopStatements }
TopStatements 
	TopStatementabbrev
|	TopStatementsPrefix TopStatementabbrevNonEmpty
TopStatementsPrefix 
	TopStatementfull
|	TopStatementsPrefix TopStatementfull
Labeled Statements
LabeledStatement  Identifier : Statement
If Statement
IfStatementabbrev 
	if ParenthesizedExpression Statementabbrev
|	if ParenthesizedExpression StatementabbrevNoShortIf else Statementabbrev
IfStatementabbrevNonEmpty 
	if ParenthesizedExpression StatementabbrevNonEmpty
|	if ParenthesizedExpression StatementabbrevNoShortIf else StatementabbrevNonEmpty
IfStatementfull 
	if ParenthesizedExpression Statementfull
|	if ParenthesizedExpression StatementabbrevNoShortIf else Statementfull
IfStatementabbrevNoShortIf  if ParenthesizedExpression StatementabbrevNoShortIf else StatementabbrevNoShortIf
Switch Statement
SwitchStatement 
	switch ParenthesizedExpression { }
|	switch ParenthesizedExpression { CaseGroups LastCaseGroup }
CaseGroups 
	«empty»
|	CaseGroups CaseGroup
CaseGroup  CaseGuards CaseStatementsPrefix
LastCaseGroup  CaseGuards CaseStatements
CaseGuards 
	CaseGuard
|	CaseGuards CaseGuard
CaseGuard 
	case ExpressionallowIn :
|	default :
CaseStatements 
	Statementabbrev
|	CaseStatementsPrefix StatementabbrevNonEmpty
CaseStatementsPrefix 
	Statementfull
|	CaseStatementsPrefix Statementfull
Do-While Statement
DoStatement  do StatementabbrevNonEmpty while ParenthesizedExpression
While Statement
WhileStatement  while ParenthesizedExpression Statement
For Statements
ForStatement 
	for ( ForInitializer ; OptionalExpression ; OptionalExpression ) Statement
|	for ( ForInBinding in ExpressionallowIn ) Statement
ForInitializer 
	«empty»
|	ExpressionnoIn
|	VariableDefinitionKind VariableBindingListnoIn
ForInBinding 
	PostfixExpression
|	VariableDefinitionKind VariableBindingnoIn
With Statement
WithStatement  with ParenthesizedExpression Statement
Continue and Break Statements
ContinueStatement  continue [no line break] OptionalLabel
BreakStatement  break [no line break] OptionalLabel
OptionalLabel 
	«empty»
|	Identifier
Return Statement
ReturnStatement  return [no line break] OptionalExpression
Throw Statement
ThrowStatement  throw [no line break] ExpressionallowIn
Try Statement
TryStatement 
	try AnnotatedBlock CatchClauses
|	try AnnotatedBlock FinallyClause
|	try AnnotatedBlock CatchClauses FinallyClause
CatchClauses 
	CatchClause
|	CatchClauses CatchClause
CatchClause  catch ( TypedIdentifierallowIn ) AnnotatedBlock
FinallyClause  finally AnnotatedBlock
Definitions
AnnotatedDefinition 
	Visibility [no line break] Definition
|	Definition
Definition 
	VariableDefinition Semicolon
|	FunctionDefinition
|	MemberDefinition
|	ClassDefinition
Visibility Specifications
Visibility 
	ParenthesizedExpression
|	local
|	box
|	private
|	package
|	public
|	Identifier
Variable Definition
VariableDefinition  VariableDefinitionKind VariableBindingListallowIn
VariableDefinitionKind 
	var
|	const
VariableBindingList 
	VariableBinding
|	VariableBindingList , VariableBinding
VariableBinding  TypedIdentifier VariableInitializer
TypedIdentifier 
	Identifier
|	Identifier : TypeExpression
VariableInitializer 
	«empty»
|	= AssignmentExpression
Function Definition
FunctionDefinition 
	NamedFunction
|	AccessorFunction
AnonymousFunction  function FunctionSignature Block
NamedFunction  function Identifier FunctionSignature Block
AccessorFunction 
	function get [no line break] Identifier FunctionSignature Block
|	function set [no line break] Identifier FunctionSignature Block
FunctionSignature  ParameterSignature ResultSignature
ParameterSignature  ( Parameters )
Parameters 
	«empty»
|	RestParameter
|	RequiredParameters
|	OptionalParameters
|	RequiredParameters , RestParameter
|	OptionalParameters , RestParameter
RequiredParameters 
	RequiredParameter
|	RequiredParameters , RequiredParameter
OptionalParameters 
	OptionalParameter
|	RequiredParameters , OptionalParameter
|	OptionalParameters , OptionalParameter
RequiredParameter  TypedIdentifierallowIn
OptionalParameter  TypedIdentifierallowIn = AssignmentExpressionallowIn
RestParameter 
	...
|	... TypedIdentifierallowIn
|	... TypedIdentifierallowIn = AssignmentExpressionallowIn
ResultSignature 
	«empty»
|	: TypeExpressionallowIn
Class Member Definitions
MemberDefinition 
	FieldDefinition Semicolon
|	MethodDefinition
|	ConstructorDefinition
FieldDefinition  field [no line break] VariableBindingListallowIn
MethodDefinition 
	ConcreteMethodDefinition
|	AbstractMethodDefinition
ConcreteMethodDefinition  MethodPrefix [no line break] MethodName FunctionSignature Block
AbstractMethodDefinition  MethodPrefix [no line break] MethodName FunctionSignature Semicolon
MethodPrefix 
	method
|	override [no line break] method
|	final [no line break] method
|	final [no line break] override [no line break] method
MethodName 
	Identifier
|	get [no line break] Identifier
|	set [no line break] Identifier
ConstructorDefinition  constructor [no line break] ConstructorName ParameterSignature Block
ConstructorName 
	new
|	Identifier
Class Definition
ClassDefinition 
	class Identifier Superclasses Block
|	class extends TypeExpressionallowIn Block
Superclasses 
	«empty»
|	extends TypeExpressionallowIn
Language Declaration
LanguageDeclaration  language LanguageId LanguageIdList LanguageAlternatives LanguageSemicolon
LanguageSemicolonabbrev 
	;
|	«empty»
LanguageSemicolonabbrevNonEmpty 
	;
|	«empty»
LanguageSemicolonfull  ;
LanguageAlternatives 
	«empty»
|	LanguageAlternatives | LanguageIdList
LanguageIdList 
	«empty»
|	LanguageIdList LanguageId
LanguageId 
	Identifier
|	Number
Programs
Program  TopStatements