April 2002 Draft
JavaScript 2.0
Formal Description
Syntactic Grammar
|
Tuesday, February 26, 2002
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 VirtualSemicolon
Punctuation tokens: !
!=
!==
%
%=
&
&&
&&=
&=
(
)
*
*=
+
++
+=
,
-
--
-=
.
...
/
/=
:
::
;
<
<<
<<=
<=
=
==
===
>
>=
>>
>>=
>>>
>>>=
?
[
]
^
^=
^^
^^=
{
|
|=
||
||=
}
~
Reserved words: abstract
as
break
case
catch
class
const
continue
default
delete
do
else
export
extends
false
final
finally
for
function
if
implements
import
in
instanceof
interface
is
namespace
new
null
package
private
public
return
static
super
switch
this
throw
true
try
typeof
use
var
void
while
with
Future reserved words: debugger
enum
goto
native
protected
synchronized
throws
transient
volatile
Non-reserved words: exclude
get
include
named
set
null
true
false
public
this
++
--
;
;
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 Tuesday, February 26, 2002 |