|
JavaScript 2.0
Formal Description
Parser Grammar
|
Thursday, November 11, 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 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
boxconstructorfieldgetlanguagelocalmethodsetoverrideversionnulltruefalsethissuper? Identifier++--delete PostfixExpressiontypeof UnaryExpressioneval UnaryExpression++ PostfixExpression-- PostfixExpression+ UnaryExpression- UnaryExpression~ UnaryExpression! UnaryExpression;;;;;;if ParenthesizedExpression StatementabbrevNoShortIf else StatementabbrevNoShortIf...methodoverride [no line break] methodfinal [no line break] methodfinal [no line break] override [no line break] method;;|
Waldemar Horwat Last modified Thursday, November 11, 1999 |