|
ECMAScript 4 Netscape Proposal
Formal Description
Syntactic Grammar
|
Monday, June 30, 2003
This LALR(1) grammar describes the syntax of the ECMAScript 4 proposal. The starting nonterminal is Program. See also the description of the grammar notation.
This document is also available as a Word RTF file.
General tokens: Identifier NegatedMinLong Number RegularExpression String VirtualSemicolon
Punctuation tokens: ! !=
!== % %=
& &&
&&= &=
( ) *
*= + ++
+= , -
-- -= .
... / /=
: :: ;
< <<
<<= <=
= == ===
> >=
>> >>=
>>> >>>=
? [ ]
^ ^= ^^
^^= { |
|= || ||=
} ~
Reserved words: as break
case catch
class const
continue default
delete do
else extends
false finally
for function
if import in
instanceof is
namespace new
null package
private public
return super
switch this
throw true
try typeof
use var void
while with
Future reserved words: abstract debugger
enum export
goto implements
interface native
protected synchronized
throws transient
volatile
Non-reserved words: get set
nulltruefalsethis++--delete PostfixExpressionvoid UnaryExpressiontypeof UnaryExpression++ PostfixExpression-- PostfixExpression+ UnaryExpression- UnaryExpression- NegatedMinLong~ UnaryExpression! UnaryExpression;;A SimpleVariableDefinition represents the subset of VariableDefinition expansions that may be used when the variable definition is used as a Substatement instead of a Directive in non-strict mode. In strict mode variable definitions may not be used as substatements.
|
Waldemar Horwat Last modified Monday, June 30, 2003 |