Created
March 7, 2012 00:34
-
-
Save xcambar/1990115 to your computer and use it in GitHub Desktop.
ECMAScript Harmony - conflicting states in grammar
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
Program ::= ProgramElement* | |
ProgramElement ::= Statement | |
| VariableDeclaration | |
| FunctionDeclaration | |
| ImportDeclaration | |
| ExportDeclaration | |
| ModuleDeclaration | |
ModuleSpecifier ::= StringLiteral | Path | |
ModuleDeclaration ::= "module" Id "at" String ";" | |
| "module" Id "is" ImportSource ";" | |
| "module" Id "{" ModuleBody "}" | |
ImportSource ::= Id ("from" ModuleSpecifier)? | |
ImportDeclaration ::= "import" ImportSpecifierSet "from" ModuleSpecifier ";" | |
ImportSpecifierSet ::= Id | |
| "*" | |
| "{" ImportSpecifier ("," ImportSpecifier)* "}" | |
ImportSpecifier ::= Id (":" Id)? | |
ExportDeclaration ::= "export" ExportSpecifierSet ("," ExportSpecifierSet)* ";" | |
| "export" VariableDeclaration | |
| "export" FunctionDeclaration | |
| "export" ModuleDeclaration | |
/** | |
* | |
* This rule holds the modification | |
* | |
**/ | |
ExportSpecifierSet ::= "{" ExportSpecifier ("," ExportSpecifier)* "}" | |
| Id | |
| "*" ("from" Path)? | |
ExportSpecifier ::= Id (":" Path)? | |
ModuleBody ::= ModuleElement* | |
ModuleElement ::= Statement | |
| VariableDeclaration | |
| FunctionDeclaration | |
| ModuleDeclaration | |
| ImportDeclaration | |
| ExportDeclaration |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment