Notação BNF da gramática de javascript
Autor: viagemdacomputacao | Publicado: 2012-05-04T13:29:00-03:00

Para estudar bem a linguagem temos que entender bem ela, resolvi dar uma ollhadinha se achava a notação bnf (Baccus Formal Normal) de javascript


De acordo com:
https://github.com/luqui/jsexp/blob/7e1ad367545ee482a16a5712a0a7f2a17604d8f5/grammars/javascript.js 


var javascript_grammar = {

&nbsp;&nbsp;&nbsp;&nbsp;program: [ [ 'stmts' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;stmts: [ [ ], 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'stmt', 'more_stmts' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;more_stmts: [ [ ], 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ /^;/, 'stmts' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;stmt: [ [ 'var_decl' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'expr' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'block' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'return_stmt' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'void_stmt' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'for_stmt' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'foreach_stmt' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'if_stmt' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'function_stmt' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;return_stmt: [ [ 'return_keyword', /^\s+/, 'expr' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;void_stmt: [ [ 'void_keyword', /^\s+/, 'expr' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;function_stmt: [ [ 'function_keyword', /^\s+/, 'identifier', /^\(/, 'arg_list', /^\)/, 'block' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;// TODO what is the syntactic class of the first clause?

&nbsp;&nbsp;&nbsp;&nbsp;for_stmt: [ [ 'for_keyword', /^\(/, 'stmt', /^;/, 'expr', /^;/, 'expr', /^\)/, 'stmt' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;foreach_stmt: [ [ 'for_keyword', /^\(/, 'foreach_var_decl', /^\s+/, 'in_keyword', 'expr', /^\)/, 'stmt' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;if_stmt: [ [ 'if_keyword', /^\(/, 'expr', /^\)/, 'stmt', 'else_clause' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;else_clause: [ [ ], [ 'else_keyword', 'stmt' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;foreach_var_decl: [ [ 'var_keyword', 'identifier' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'identifier' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;var_decl: [ [ 'var_keyword', /^\s+/, 'initializer_list' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;initializer_list: [ [ 'initializer' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'initializer_list', /^,/, 'initializer' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;initializer: [ [ 'identifier', /^=/, 'expr' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;identifier: [ [ /^[a-zA-Z_$][\w$]*/ ] ],




&nbsp;&nbsp;&nbsp;&nbsp;expr: [ [ 'assignment_expr' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;assignment_expr: [ [ 'operator_expr' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'operator_expr', 'assignment_operator', 'assignment_expr' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;assignment_operator: [ [ /^[+*\/%-]?=/ ] ],




&nbsp;&nbsp;&nbsp;&nbsp;// not modeling all precedence levels

&nbsp;&nbsp;&nbsp;&nbsp;operator_expr: [ [ 'unary_expr' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'unary_expr', 'operator', 'operator_expr' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;operator: [ [ /^(\+|-|\*|\/|%|==|!=|&gt;|&gt;=|&lt;|&lt;=|===|!==|\|\||&amp;&amp;|in)/ ] ],




&nbsp;&nbsp;&nbsp;&nbsp;unary_expr: [ [ 'atomic_expr' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'prefix_operator', 'unary_expr' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;prefix_operator: [ [ /^(\+\+|--|\+|-|!)/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;postfix_operator: [ [ /^(\+\+|--)/ ] ],




&nbsp;&nbsp;&nbsp;&nbsp;atomic_expr: [ [ 'literal' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'function_expr' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'array_expr' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'object_expr' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'index_expr' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'funcall_expr' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'variable' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ /^\(/, 'expr', /^\)/ ] ],




&nbsp;&nbsp;&nbsp;&nbsp;literal: [ [ floating_point_regexp ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ /^"/, 'dq_string', /^"/ ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ /^'/, 'sq_string', /^'/ ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ /\//, 'slash_string', /\// ] ],




&nbsp;&nbsp;&nbsp;&nbsp;dq_string: [ [ /^[^"\\]*(\\.[^"\\]*)*/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;sq_string: [ [ /^[^'\\]*(\\.[^'\\]*)*/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;slash_string: [ [ /^[^\/\\]*(\\.[^\/\\]*)*/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;function_expr: [ [ 'function_keyword', /^\(/, 'arg_list', /^\)/, 'block' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;arg_list: [ [ ], [ 'identifier', 'more_arg_list' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;more_arg_list: [ [ ], [ /^,/, 'identifier', 'more_arg_list' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;block: [ [ 'open_brace', 'stmts', /^\}/ ] ],




&nbsp;&nbsp;&nbsp;&nbsp;array_expr: [ [ /^\[/, 'expr_list', /^\]/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;expr_list: [ [ ], [ 'expr', 'more_expr_list' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;more_expr_list: [ [ ], [ /^,/, 'expr', 'more_expr_list' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;object_expr: [ [ 'open_brace', 'property_list', /^\}/ ] ],




&nbsp;&nbsp;&nbsp;&nbsp;property_list: [ [ ], [ 'property_kv', 'more_property_list' ] ],

&nbsp;&nbsp;&nbsp;&nbsp;more_property_list: [ [ ], [ /^,/, 'property_kv', 'more_property_list' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;property_kv: [ [ 'property_key', /^:/, 'expr' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;property_key: [ [ 'identifier' ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'literal' ] ],   // not exactly right.  eg. regexes can't be keys




&nbsp;&nbsp;&nbsp;&nbsp;index_expr: [ [ 'atomic_expr', /^\[/, 'expr', /^\]/ ],

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ 'atomic_expr', /^\./, 'identifier' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;funcall_expr: [ [ 'atomic_expr', /^\(/, 'expr_list', /^\)/ ] ],




&nbsp;&nbsp;&nbsp;&nbsp;variable: [ [ 'identifier' ] ],




&nbsp;&nbsp;&nbsp;&nbsp;var_keyword: [ [ /^var/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;function_keyword: [ [ /^function/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;return_keyword: [ [ /^return/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;void_keyword: [ [ /^void/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;for_keyword: [ [ /^for/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;in_keyword: [ [ /^in/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;if_keyword: [ [ /^if/ ] ],

&nbsp;&nbsp;&nbsp;&nbsp;else_keyword: [ [ /^else/ ] ],




&nbsp;&nbsp;&nbsp;&nbsp;open_brace: [ [ /^{/ ] ],

};



http://javascript.comsci.us/syntax/statement/bnf.html

    

      
BNF

executable-statement
labeled-statement
unlabeled-statement
simple-statement
::= ::= 
structured-statement
::= ::= ::= ::= 
block-statement-list
block-statement
  compound-statement  
::= '{'  '}'
  do-statement  
::= 'do'  'while' '('  ')'
  expression-statement  
::=  ';'
for-statement
  if-statement  
::= 'if' '('  ')' 
  if-else-statement  
::= 'if' '('  ')'  'else' 
jump-statement
::= ::= ::= 
return-statement
::= 'return' ';'::= 'return'  ';'
  switch-statement  
::= 'switch' '('  ')' '{'  '}'
  while-statement  
::= 'while' '('  ')' &nbsp;&nbsp;http://javascript.comsci.us/syntax/statement/index.html&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notação BNF do php:&nbsp;http://php.comsci.us/syntax/statement/bnf.php 



::= ::= 

::= ::= ::= 

::= ::= ::= ::= ::= ::= 

::= ::= ::= 

::= ::= ::= ::= 

::= ::= ::= ::= 

::= 'break' ';'::= 'break'  ';'

::= '{'  '}'

::= 'continue' ';'::= 'continue'  ';'

::= 'do'  'while' '('  ')' ';'

::= 'for' '('  ';'  ';'  ')' 

::= 'if' '('  ')' 

::= 'if' '('  ')'  'else' 

::= 'if' '('  ')'  ::= 'if' '('  ')'   

::= 'return'  ';'::= 'return'  ';'::= 'return' ';'

::= 'switch' '('  ')' '{'  '}'

::= 'while' '('  ')' &nbsp;&nbsp;&nbsp;Do Sql:http://savage.net.au/SQL/sql-2003-2.bnf.html http://savage.net.au/SQL/sql-92.bnf.htmlhttp://savage.net.au/SQL/index.htmlhttp://en.wikipedia.org/wiki/Syntax_diagram/&nbsp;http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Formhttp://www.flickr.com/photos/nicksieger/280662871/http://blog.nicksieger.com/articles/2006/10/27/visualization-of-rubys-grammarAinda de acordo com&nbsp; o anexo da Standard ECMA-262&nbsp;ECMAScript Language&nbsp; Specification 5.1 Edition / June 2011:http://www.ecma-international.org/publications/standards/Ecma-262.htmA.1 Lexical GrammarSourceCharacter :: See clause 6any Unicode code unit InputElementDiv :: See clause 7WhiteSpace LineTerminator Comment Token DivPunctuator InputElementRegExp :: See clause 7WhiteSpace LineTerminator Comment Token RegularExpressionLiteral WhiteSpace :: See 7.2       LineTerminator :: See 7.3    LineTerminatorSequence :: See 7.3  [lookahead   ] &nbsp;  &nbsp;  &nbsp;   Comment :: MultiLineComment SingleLineComment MultiLineComment :: See 7.4/* MultiLineCommentCharsopt */ MultiLineCommentChars :: See 7.4MultiLineNotAsteriskChar MultiLineCommentCharsopt * PostAsteriskCommentCharsopt PostAsteriskCommentChars :: See 7.4MultiLineNotForwardSlashOrAsteriskChar MultiLineCommentCharsopt * PostAsteriskCommentCharsopt MultiLineNotAsteriskChar :: See 7.4SourceCharacter but not * MultiLineNotForwardSlashOrAsteriskChar :: See 7.4SourceCharacter but not one of / or * SingleLineComment :: See 7.4// SingleLineCommentCharsopt SingleLineCommentChars :: See 7.4SingleLineCommentChar SingleLineCommentCharsopt SingleLineCommentChar :: See 7.4SourceCharacter but not LineTerminator Token :: See 7.5IdentifierName Punctuator NumericLiteral StringLiteral Identifier :: See 7.6IdentifierName but not ReservedWord IdentifierName :: See 7.6IdentifierStart IdentifierName IdentifierPart IdentifierStart :: UnicodeLetter $ _ \ UnicodeEscapeSequence IdentifierPart ::IdentifierStartUnicodeCombiningMarkUnicodeDigitUnicodeConnectorPunctuationSee 7.6UnicodeLetter ::See 7.6any character in the Unicode categories ―Uppercase letter (Lu)‖, ―Lowercase letter(Ll)‖, ―Titlecase letter (Lt)‖, ―Modifier letter (Lm)‖, ―Other letter (Lo)‖, or ―Letternumber (Nl)‖.UnicodeCombiningMark ::See 7.6any character in the Unicode categories ―Non-spacing mark (Mn)‖ or ―Combiningspacing mark (Mc)‖UnicodeDigit :: See 7.6any character in the Unicode category ―Decimal number (Nd)‖ UnicodeConnectorPunctuation :: See 7.6any character in the Unicode category ―Connector punctuation (Pc)‖ ReservedWord :: See 7.6.1Keyword FutureReservedWord NullLiteral BooleanLiteral Keyword :: one of do instanceof typeofbreak else new varcase finally return voidcatch for switch whilecontinue function this withdebugger if throw default in try delete See 7.6.1.1FutureReservedWord :: one of enum extends superclass export import const See 7.6.1.2The following tokens are also considered to be FutureReservedWords when parsing strict modecode (see 10.1.1).implementsinterfaceyieldletpackageprivateprotectedpublicstaticPunctuator :: one of{}See 7.7( ) [ ]&lt;=. ; , &lt; &gt; &gt;= == != === !== + - * % ++ --&lt;&lt; &gt;&gt; &gt;&gt;&gt; &amp; | ^! ~ &amp;&amp; || ? := += -= *= %= &lt;&lt;=&gt;&gt;= &gt;&gt;&gt;= &amp;= |= ^= DivPunctuator :: one of See 7.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; / &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /= Literal :: See 7.8NullLiteral BooleanLiteral NumericLiteral StringLiteral RegularExpressionLiteral NullLiteral :: See 7.8.1null BooleanLiteral :: See 7.8.2true false NumericLiteral :: See 7.8.3DecimalLiteral HexIntegerLiteral DecimalLiteral :: See 7.8.3DecimalIntegerLiteral . DecimalDigitsopt ExponentPartopt . DecimalDigits ExponentPartopt DecimalIntegerLiteral ExponentPartopt DecimalIntegerLiteral :: See 7.8.30 NonZeroDigit DecimalDigitsopt DecimalDigits :: See 7.8.3DecimalDigit DecimalDigits DecimalDigit DecimalDigit :: one of0 1 2 3 4 5 6&nbsp; 7 8 9NonZeroDigit :: one of1 2 3 4 5See 7.8.36789ExponentPart :: See 7.8.3ExponentIndicator SignedInteger ExponentIndicator :: one of See 7.8.3e E SignedInteger :: See 7.8.3DecimalDigits + DecimalDigits - DecimalDigits HexIntegerLiteral :: See 7.8.30x HexDigit 0X HexDigit HexIntegerLiteral HexDigit HexDigit :: one of See 7.8.30 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F StringLiteral :: See 7.8.4" DoubleStringCharactersopt " ' SingleStringCharactersopt ' DoubleStringCharacters :: See 7.8.4DoubleStringCharacter DoubleStringCharactersopt SingleStringCharacters :: See 7.8.4SingleStringCharacter SingleStringCharactersopt DoubleStringCharacter :: See 7.8.4SourceCharacter but not one of " or \ or LineTerminator \ EscapeSequence LineContinuation SingleStringCharacter :: See 7.8.4SourceCharacter but not one of ' or \ or LineTerminator \ EscapeSequence LineContinuation LineContinuation :: See 7.8.4\ LineTerminatorSequence EscapeSequence :: See 7.8.4CharacterEscapeSequence 0 [lookahead  DecimalDigit] &nbsp; HexEscapeSequence &nbsp; UnicodeEscapeSequence CharacterEscapeSequence :: See 7.8.4SingleEscapeCharacter NonEscapeCharacter SingleEscapeCharacter :: one of' " \ b f n r t vNonEscapeCharacter :: See 7.8.4SourceCharacter but not one of EscapeCharacter or LineTerminator EscapeCharacter :: See 7.8.4SingleEscapeCharacter DecimalDigit x u HexEscapeSequence :: See 7.8.4x HexDigit HexDigit UnicodeEscapeSequence :: See 7.8.4u HexDigit HexDigit HexDigit HexDigit RegularExpressionLiteral :: See 7.8.5/ RegularExpressionBody / RegularExpressionFlags RegularExpressionBody :: See 7.8.5RegularExpressionFirstChar RegularExpressionChars RegularExpressionChars :: See 7.8.5[empty]RegularExpressionChars RegularExpressionCharRegularExpressionFirstChar :: See 7.8.5RegularExpressionNonTerminator but not one of * or \ or / or [ RegularExpressionBackslashSequence RegularExpressionClass RegularExpressionChar :: See 7.8.5RegularExpressionNonTerminator but not \ or / or [ RegularExpressionBackslashSequence RegularExpressionClass RegularExpressionBackslashSequence :: See 7.8.5\ RegularExpressionNonTerminator RegularExpressionNonTerminator :: See 7.8.5SourceCharacter but not LineTerminator RegularExpressionClass :: See 7.8.5[ RegularExpressionClassChars ] RegularExpressionClassChars :: See 7.8.5[empty]RegularExpressionClassChars RegularExpressionClassCharRegularExpressionClassChar ::RegularExpressionNonTerminator but not ] or \RegularExpressionBackslashSequencegularExpressionFlags ::See 7.8.5[empty]RegularExpressionFlags IdentifierPartA.2 Number ConversionsStringNumericLiteral ::: See 9.3.1StrWhiteSpaceopt StrWhiteSpaceopt StrNumericLiteral StrWhiteSpaceopt StrWhiteSpace ::: See 9.3.1StrWhiteSpaceChar StrWhiteSpaceopt StrWhiteSpaceChar ::: See 9.3.1WhiteSpace LineTerminator StrNumericLiteral ::: See 9.3.1StrDecimalLiteral HexIntegerLiteral StrDecimalLiteral ::: See 9.3.1StrUnsignedDecimalLiteral + StrUnsignedDecimalLiteral - StrUnsignedDecimalLiteral StrUnsignedDecimalLiteral ::: See 9.3.1Infinity DecimalDigits . DecimalDigitsopt ExponentPartopt . DecimalDigits ExponentPartopt DecimalDigits ExponentPartopt DecimalDigits ::: See 9.3.1DecimalDigit DecimalDigits DecimalDigit DecimalDigit ::: one of0 1 2 3 4See 9.3.156789ExponentPart ::: See 9.3.1ExponentIndicator SignedInteger ExponentIndicator ::: one of See 9.3.1e E SignedInteger ::: DecimalDigits + DecimalDigits - DecimalDigits HexIntegerLiteral ::: See 9.3.10x HexDigit 0X HexDigit HexIntegerLiteral HexDigit HexDigit ::: one of See 9.3.10 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F A.3 ExpressionsPrimaryExpression : See 11.1this Identifier Literal ArrayLiteral ObjectLiteral ( Expression ) ArrayLiteral : See 11.1.4[ Elisionopt ] [ ElementList ] [ ElementList , Elisionopt ] ElementList : See 11.1.4Elisionopt AssignmentExpression ElementList , Elisionopt AssignmentExpression Elision : See 11.1.4, Elision , ObjectLiteral : See 11.1.5{ } { PropertyNameAndValueList } { PropertyNameAndValueList , } PropertyNameAndValueList : See 11.1.5PropertyAssignment PropertyNameAndValueList , PropertyAssignment PropertyAssignment : See 11.1.5PropertyName : AssignmentExpression get PropertyName ( ) { FunctionBody } set PropertyName ( PropertySetParameterList ) { FunctionBody } PropertyName : See 11.1.5IdentifierName StringLiteral NumericLiteral PropertySetParameterList : Identifier MemberExpression : See 11.2PrimaryExpression FunctionExpression MemberExpression [ Expression ] MemberExpression . IdentifierName new MemberExpression Arguments NewExpression : See 11.2MemberExpression new NewExpression CallExpression : See 11.2MemberExpression Arguments CallExpression Arguments CallExpression [ Expression ] CallExpression . IdentifierName Arguments : See 11.2() ( ArgumentList ) ArgumentList : See 11.2AssignmentExpression ArgumentList , AssignmentExpression LeftHandSideExpression : See 11.2NewExpression CallExpression PostfixExpression : See 11.3LeftHandSideExpression LeftHandSideExpression [no LineTerminator here] ++ LeftHandSideExpression [no LineTerminator here] -- UnaryExpression : See 11.4PostfixExpression delete UnaryExpression void UnaryExpression typeof UnaryExpression ++ UnaryExpression -- UnaryExpression + UnaryExpression - UnaryExpression ~ UnaryExpression ! UnaryExpression MultiplicativeExpression : UnaryExpression MultiplicativeExpression * UnaryExpression MultiplicativeExpression / UnaryExpression MultiplicativeExpression % UnaryExpression AdditiveExpression : See 11.6MultiplicativeExpression AdditiveExpression + MultiplicativeExpression AdditiveExpression - MultiplicativeExpression ShiftExpression : See 11.7AdditiveExpression ShiftExpression &lt;&lt; AdditiveExpression ShiftExpression &gt;&gt; AdditiveExpression ShiftExpression &gt;&gt;&gt; AdditiveExpression RelationalExpression : See 11.8ShiftExpression RelationalExpression &lt; ShiftExpression RelationalExpression &gt; ShiftExpression RelationalExpression &lt;= ShiftExpression RelationalExpression &gt;= ShiftExpression RelationalExpression instanceof ShiftExpression RelationalExpression in ShiftExpression RelationalExpressionNoIn : See 11.8ShiftExpression RelationalExpressionNoIn &lt; ShiftExpression RelationalExpressionNoIn &gt; ShiftExpression RelationalExpressionNoIn &lt;= ShiftExpression RelationalExpressionNoIn &gt;= ShiftExpression RelationalExpressionNoIn instanceof ShiftExpression EqualityExpression : See 11.9RelationalExpression EqualityExpression == RelationalExpression EqualityExpression != RelationalExpression EqualityExpression === RelationalExpression EqualityExpression !== RelationalExpression EqualityExpressionNoIn : See 11.9RelationalExpressionNoIn EqualityExpressionNoIn == RelationalExpressionNoIn EqualityExpressionNoIn != RelationalExpressionNoIn EqualityExpressionNoIn === RelationalExpressionNoIn EqualityExpressionNoIn !== RelationalExpressionNoIn BitwiseANDExpression : See 11.10EqualityExpression BitwiseANDExpression &amp; EqualityExpression BitwiseANDExpressionNoIn : EqualityExpressionNoIn BitwiseANDExpressionNoIn &amp; EqualityExpressionNoIn BitwiseXORExpression : See 11.10BitwiseANDExpression BitwiseXORExpression ^ BitwiseANDExpression BitwiseXORExpressionNoIn : See 11.10BitwiseANDExpressionNoIn BitwiseXORExpressionNoIn ^ BitwiseANDExpressionNoIn BitwiseORExpression : See 11.10BitwiseXORExpression BitwiseORExpression | BitwiseXORExpression BitwiseORExpressionNoIn : See 11.10BitwiseXORExpressionNoIn BitwiseORExpressionNoIn | BitwiseXORExpressionNoIn LogicalANDExpression : See 11.11BitwiseORExpression LogicalANDExpression &amp;&amp; BitwiseORExpression LogicalANDExpressionNoIn : See 11.11BitwiseORExpressionNoIn LogicalANDExpressionNoIn &amp;&amp; BitwiseORExpressionNoIn LogicalORExpression : See 11.11LogicalANDExpression LogicalORExpression || LogicalANDExpression LogicalORExpressionNoIn : See 11.11LogicalANDExpressionNoIn LogicalORExpressionNoIn || LogicalANDExpressionNoIn ConditionalExpression : See 11.12LogicalORExpression LogicalORExpression ? AssignmentExpression : AssignmentExpression ConditionalExpressionNoIn : See 11.12LogicalORExpressionNoIn LogicalORExpressionNoIn ? AssignmentExpression : AssignmentExpressionNoIn AssignmentExpression : See 11.13ConditionalExpression LeftHandSideExpression = AssignmentExpression LeftHandSideExpression AssignmentOperator AssignmentExpression AssignmentExpressionNoIn : ConditionalExpressionNoIn LeftHandSideExpression = AssignmentExpressionNoIn LeftHandSideExpression AssignmentOperator AssignmentExpressionNoInAssignmentOperator : one of*=/=%=+=See 11.13-=&lt;&lt;=&gt;&gt;=&gt;&gt;&gt;= &amp;=^=|=Expression : See 11.14AssignmentExpression Expression , AssignmentExpression ExpressionNoIn : See 11.14AssignmentExpressionNoIn ExpressionNoIn , AssignmentExpressionNoIn A.4 StatementsStatement : See clause 12Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement Block : See 12.1{ StatementListopt }StatementList : See 12.1Statement StatementList Statement VariableStatement : See 12.2var VariableDeclarationList ; VariableDeclarationList : See 12.2VariableDeclaration VariableDeclarationList , VariableDeclaration VariableDeclarationListNoIn : See 12.2VariableDeclarationNoIn VariableDeclarationListNoIn , VariableDeclarationNoIn VariableDeclaration : See 12.2Identifier Initialiseropt VariableDeclarationNoIn : See 12.2Identifier InitialiserNoInopt &nbsp;Initialiser : See 12.2= AssignmentExpression InitialiserNoIn : See 12.2= AssignmentExpressionNoIn EmptyStatement : See 12.3; ExpressionStatement :[lookahead  {{, function}] ExpressionSee 12.4;IfStatement : See 12.5if ( Expression ) Statement else Statement if ( Expression ) Statement IterationStatement : See 12.6do 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 12.7continue ; continue [no LineTerminator here] Identifier ; BreakStatement : See 12.8break ; break [no LineTerminator here] Identifier ; ReturnStatement : See 12.9return ; return [no LineTerminator here] Expression ; WithStatement : See 12.10with ( Expression ) Statement SwitchStatement : See 12.11switch ( Expression ) CaseBlock CaseBlock : See 12.11{ CaseClausesopt } { CaseClausesopt DefaultClause CaseClausesopt } CaseClauses : See 12.11CaseClause CaseClauses CaseClause CaseClause : See 12.11case Expression : StatementListopt DefaultClause : See 12.11default : StatementListopt LabelledStatement : See 12.12Identifier : Statement ThrowStatement : See 12.13throw [no LineTerminator here] Expression ; TryStatement : See 12.14try Block Catch try Block Finally try Block Catch Finally Catch : See 12.14catch ( Identifier ) Block Finally : See 12.14finally Block DebuggerStatement : See 12.15debugger ; A.5 Functions and ProgramsFunctionDeclaration : See clause 13function Identifier ( FormalParameterListopt ) { FunctionBody } FunctionExpression : See clause 13function Identifieropt ( FormalParameterListopt ) { FunctionBody } FormalParameterList : See clause 13Identifier FormalParameterList , Identifier FunctionBody : See clause 13SourceElementsopt Program : See clause 14SourceElementsopt SourceElements : See clause 14SourceElement SourceElements SourceElement SourceElement :StatementFunctionDeclarationSee clause 14A.6 Universal Resource Identifier Character Classesuri :::See 15.1.3uriCharactersopturiCharacters ::: See 15.1.3uriCharacter uriCharactersopt uriCharacter ::: See 15.1.3uriReserved uriUnescaped uriEscaped uriReserved ::: one of; / ? : @See 15.1.3&amp;=+$,uriUnescaped ::: See 15.1.3uriAlpha DecimalDigit uriMark uriEscaped ::: See 15.1.3% HexDigit HexDigit uriAlpha ::: one of e f g h ia b c d E F G H IA B C D uriMark ::: one of ~ * ' ( )- _ . ! jJkKlLmMnNoOpPqQrRsStTuUSee 15.1.3v w xV W XyYzZSee 15.1.3A.7 Regular ExpressionsPattern :: See 15.10.1Disjunction Disjunction :: See 15.10.1Alternative Alternative | Disjunction Alternative :: See 15.10.1[empty]Alternative TermTerm :: See 15.10.1Assertion Atom Atom Quantifier Assertion :: See 15.10.1^ $ \ b \ B ( ? = Disjunction ) ( ? ! Disjunction ) Quantifier :: See 15.10.1QuantifierPrefix QuantifierPrefix ? QuantifierPrefix :: See 15.10.1* + ? { DecimalDigits } { DecimalDigits , } { DecimalDigits , DecimalDigits } Atom :: See 15.10.1PatternCharacter . \ AtomEscape CharacterClass ( Disjunction ) ( ? : Disjunction ) PatternCharacter :: See 15.10.1SourceCharacter but not one of- ^ $ \ . * + ? ( )[]{}|AtomEscape :: See 15.10.1DecimalEscape CharacterEscape CharacterClassEscape CharacterEscape :: See 15.10.1ControlEscape c ControlLetter HexEscapeSequence UnicodeEscapeSequence IdentityEscape ControlEscape :: one of See 15.10.1f n r t v ControlLetter :: one ofa b c d eA B C D EfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUSee 15.10.1v w xV W XIdentityEscape :: See 15.10.1SourceCharacter but not IdentifierPart   CharacterClassEscape :: one of See 15.10.1d D s S w W CharacterClass :: See 15.10.1[ [lookahead  {^}] ClassRanges ] &nbsp; [ ^ ClassRanges ] ClassRanges :: zZSee 15.10.1DecimalEscape :: DecimalIntegerLiteral [lookahead  DecimalDigit] yYSee 15.10.1[empty]NonemptyClassRangesNonemptyClassRanges :: See 15.10.1ClassAtom ClassAtom NonemptyClassRangesNoDash ClassAtom – ClassAtom ClassRanges NonemptyClassRangesNoDash :: See 15.10.1ClassAtom ClassAtomNoDash NonemptyClassRangesNoDash ClassAtomNoDash – ClassAtom ClassRanges ClassAtom :: See 15.10.1- ClassAtomNoDash ClassAtomNoDash :: See 15.10.1SourceCharacter but not one of \ or ] or - \ ClassEscape ClassEscape :: See 15.10.1DecimalEscape b CharacterEscape CharacterClassEscape A.8 JSONA.8.1 JSON Lexical GrammarJSONWhiteSpace :: See 15.12.1.1    JSONString :: See 15.12.1.1" JSONStringCharactersopt " JSONStringCharacters :: See 15.12.1.1JSONStringCharacter JSONStringCharactersopt JSONStringCharacter :: See 15.12.1.1SourceCharacter but not one of " or \ or U+0000 through U+001F \ JSONEscapeSequence JSONEscapeSequence :: See 15.12.1.1JSONEscapeCharacter UnicodeEscapeSequence JSONEscapeCharacter :: one of See 15.12.1.1" / \ b f n r t JSONNumber :: See 15.12.1.1-opt DecimalIntegerLiteral JSONFractionopt ExponentPartopt JSONFraction :: See 15.12.1.1. DecimalDigits JSONNullLiteral :: See 15.12.1.1NullLiteral JSONBooleanLiteral :: See 15.12.1.1BooleanLiteral A.8.2 JSON Syntactic GrammarJSONText : See 15.12.1.2JSONValue JSONValue : See 15.12.1.2JSONNullLiteral JSONBooleanLiteral JSONObject JSONArray JSONString JSONNumber JSONObject : See 15.12.1.2{ } { JSONMemberList } JSONMember : See 15.12.1.2JSONString : JSONValue JSONMemberList : See 15.12.1.2JSONMember JSONMemberList , JSONMember JSONArray : See 15.12.1.2[ ] [ JSONElementList ] JSONElementList : See 15.12.1.2JSONValue JSONElementList , JSONValue