Created
July 9, 2012 06:37
-
-
Save micrypt/3074634 to your computer and use it in GitHub Desktop.
Ampify notes
This file contains hidden or 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 ::= Statements | |
Statements ::= Statement [EOL] | Statement Statements | |
Statement ::= Assignment | Procedure | If | While | 'return' [Expr] | |
Assignment ::= Variable '=' Expr | |
Variable ::= /[A-Za-z_0-9]+/ | |
Expr ::= Literal | Variable | Procedure | Variable Operator Variable | |
Literal ::= " String " | ' String ' | /[0-9]+/ | |
Procedure ::= Identifier '(' [param1 param2 ... paramN] ')' | |
Identifier ::= 'commit' | 'rollback' | 'save' | |
If ::= ‘if’ Expr ‘{‘ ( [EOL] Statements ‘}’ [ 'else' '{' [EOL] Statements '}' ] | |
While ::= 'while' Expr '{' [EOL] Statements '}' | |
String ::= /[A-Za-z_0-9/s]+/ | |
Operator ::= '+' | '-' | '/' | '*' | '>' | '<' | '>=' | '<=' | '==' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment