aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-19 07:26:39 +0800
committerNicolai <NicolaiSoeborg@users.noreply.github.com>2016-07-19 07:26:39 +0800
commitdc3828ee371acbe6cdfdb538b416c4bca12b8cef (patch)
tree914824fcc9b3acdffdb17f6cc70c4fe23ec27a0e /libsolidity
parentce8a003611024069f797db91723099ecf3c6a834 (diff)
downloaddexon-solidity-dc3828ee371acbe6cdfdb538b416c4bca12b8cef.tar
dexon-solidity-dc3828ee371acbe6cdfdb538b416c4bca12b8cef.tar.gz
dexon-solidity-dc3828ee371acbe6cdfdb538b416c4bca12b8cef.tar.bz2
dexon-solidity-dc3828ee371acbe6cdfdb538b416c4bca12b8cef.tar.lz
dexon-solidity-dc3828ee371acbe6cdfdb538b416c4bca12b8cef.tar.xz
dexon-solidity-dc3828ee371acbe6cdfdb538b416c4bca12b8cef.tar.zst
dexon-solidity-dc3828ee371acbe6cdfdb538b416c4bca12b8cef.zip
Remove "in", extra semicolons, forced function param. Added "throw". Changes FunctionCall & IndexAccess
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/grammar.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt
index d536644c..5b16db9c 100644
--- a/libsolidity/grammar.txt
+++ b/libsolidity/grammar.txt
@@ -24,18 +24,18 @@ ArrayTypeName = TypeName ('[' Expression? ']')+
Block = '{' Statement* '}'
Statement = IfStatement | WhileStatement | Block |
- ( Continue | Break | Return | VariableDefinition | ExpressionStatement ) ';'
+ ( Continue | Break | Return | Throw | VariableDefinition | ExpressionStatement ) ';'
ExpressionStatement = Expression
IfStatement = 'if' '(' Expression ')' Statement ( 'else' Statement )?
WhileStatement = 'while' '(' Expression ')' Statement
VardefOrExprStmt = Variabledefinition | ExpressionStatement
ForStatement = 'for' '(' (VardefOrExprStmt)? ';' (Expression)? ';' (ExpressionStatement)? ')' Statement
-Continue = 'continue' ';'
-Break = 'break' ';'
-Return = 'return' Expression? ';'
-Throw = 'throw' Expression? ';'
-VariableDefinition = VariableDeclaration ( '=' Expression )? ';'
+Continue = 'continue'
+Break = 'break'
+Return = 'return' Expression?
+Throw = 'throw' Expression?
+VariableDefinition = VariableDeclaration ( '=' Expression )?
Expression = Assignment | UnaryOperation | BinaryOperation | FunctionCall | NewExpression | IndexAccess |
MemberAccess | PrimaryExpression
@@ -45,10 +45,10 @@ BasicBinaryOperation = '|' | '^' | '&' | '<<' | '>>' | '>>>' | '+' | '-' | '*' |
AssignmentOp = BasicBinaryOperation'='
UnaryOperation = '!' | '~' | '++' | '--' | 'delete'
BinaryOperation = BasicBinaryOperation | '||' | '&&' | '**' |
- '==' | '!=' | '<' | '>' | '<=' | '>=' | 'in'
+ '==' | '!=' | '<' | '>' | '<=' | '>='
-FunctionCall = Expression '(' Expression ( ',' Expression )* ')'
+FunctionCall = Identifier '(' Expression? ( ',' Expression )* ')'
NewExpression = 'new' Identifier
MemberAccess = Expression '.' Identifier
-IndexAccess = Expression '[' (Expression)? ']'
+IndexAccess = Identifier ('[' Expression? ']')+
PrimaryExpression = Identifier | NumberLiteral | StringLiteral | ElementaryTypeName | '(' Expression ')'