|
JavaScript 2.0
Formal Description
Parser Grammar
|
Wednesday, May 12, 1999
This LALR(1) grammar describes the syntax of the JavaScript 2.0 proposal. The starting nonterminal is Program. See also the description of the grammar notation.
This document is also available as a Word 98 rtf file.
General tokens: Identifier Number RegularExpression String
Punctuation tokens: !
!= !==
% %=
& &&
&= (
) *
*= +
++ +=
, -
-- -=
. ..
... /
/= :
:: ;
< <<
<<= <=
= ==
=== >
>= >>
>>=
>>>
>>>= ?
@ [
] ^
^= {
| |=
|| }
~
Future punctuation tokens: #
&&= ->
^^ ^^=
||=
Reserved words: break
case catch
class const
continue default
delete do
else eval
extends false
field final
finally for
function if
import in
instanceof new
null package
private
protected public
return super
switch this
throw true
try typeof
var while
with
Future reserved words: abstract
debugger enum
export goto
implements native
static
synchronized throws
transient
volatile
Non-reserved words: constructor
getter method
override setter
traditional
version
nulltruefalsethissuper;;;;;;if ParenthesizedExpression CodeStatementabbrevNoShortIf else CodeStatementabbrevNoShortIfgetter NamedFunctionsetter NamedFunction