Created
November 15, 2010 01:16
-
-
Save danking/676294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<statement> ::= <definition> | |
| <expression> | |
| "return " <expression> | |
<definition> ::= "var" <id> " = " <expression> | |
| "function " <id> " (" <argument-list> ") { " <statements> " }" | |
<statements> ::= <statment> ";\n" <statements> | |
| <statement> ";\n" | |
<expression> ::= <id> | |
| <primitive> | |
| <application> | |
| <lambda> | |
| "new " <application> | |
<id> ::= [A-z_][A-z0-9]* | |
Except: | |
abstract boolean break byte case catch char class const continue debugger | |
default delete do double else enum export extends false final finally | |
float for function goto if implements import in instanceof int interface | |
long native new null package private protected public return short | |
static super switch synchronized this throw throws transient true try | |
typeof var void volatile while with | |
<primitive> ::= true | |
| false | |
| undefined | |
| null | |
| <string> | |
| <number> | |
<application> ::= <expression> "(" <argument-list> ")" | |
<lambda> ::= "function (" <argument-list> ") { " <statements> " }" | |
<argument-list> ::= <expression> ", " <argument-list> | |
::= <expression> | |
<string> ::= "\"" [^\"]* "\"" | |
<number> ::= usual definition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment