From 1ceb735fe1a996a3b469e2fa5278f49160e9f85a Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 15 Jun 2017 00:39:46 +0100 Subject: Fix AssemblyAssignment in grammar --- docs/grammar.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/grammar.txt b/docs/grammar.txt index dc188572..ee655216 100644 --- a/docs/grammar.txt +++ b/docs/grammar.txt @@ -139,5 +139,5 @@ InlineAssemblyBlock = '{' AssemblyItem* '}' AssemblyItem = Identifier | FunctionalAssemblyExpression | InlineAssemblyBlock | AssemblyLocalBinding | AssemblyAssignment | NumberLiteral | StringLiteral | HexLiteral AssemblyLocalBinding = 'let' Identifier ':=' FunctionalAssemblyExpression -AssemblyAssignment = Identifier ':=' FunctionalAssemblyExpression | '=:' Identifier +AssemblyAssignment = ( Identifier ':=' FunctionalAssemblyExpression ) | ( '=:' Identifier ) FunctionalAssemblyExpression = Identifier '(' AssemblyItem? ( ',' AssemblyItem )* ')' -- cgit From 4970d89f3b4b38a447def0ce1e9c705a8a494291 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 15 Jun 2017 00:40:01 +0100 Subject: Support AssemblyLabel in grammar --- docs/grammar.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/grammar.txt b/docs/grammar.txt index ee655216..c67a8a4a 100644 --- a/docs/grammar.txt +++ b/docs/grammar.txt @@ -137,7 +137,8 @@ Ufixed = 'ufixed' | 'ufixed0x8' | 'ufixed0x16' | 'ufixed0x24' | 'ufixed0x32' | ' InlineAssemblyBlock = '{' AssemblyItem* '}' -AssemblyItem = Identifier | FunctionalAssemblyExpression | InlineAssemblyBlock | AssemblyLocalBinding | AssemblyAssignment | NumberLiteral | StringLiteral | HexLiteral +AssemblyItem = Identifier | FunctionalAssemblyExpression | InlineAssemblyBlock | AssemblyLocalBinding | AssemblyAssignment | AssemblyLabel | NumberLiteral | StringLiteral | HexLiteral AssemblyLocalBinding = 'let' Identifier ':=' FunctionalAssemblyExpression AssemblyAssignment = ( Identifier ':=' FunctionalAssemblyExpression ) | ( '=:' Identifier ) +AssemblyLabel = Identifier ':' FunctionalAssemblyExpression = Identifier '(' AssemblyItem? ( ',' AssemblyItem )* ')' -- cgit From 9e1d24a7eb436b3dbab1fdaea16a923e433133a1 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 15 Jun 2017 00:41:00 +0100 Subject: Support interface contracts --- docs/grammar.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/grammar.txt b/docs/grammar.txt index c67a8a4a..f0350239 100644 --- a/docs/grammar.txt +++ b/docs/grammar.txt @@ -7,7 +7,7 @@ ImportDirective = 'import' StringLiteral ('as' Identifier)? ';' | 'import' ('*' | Identifier) ('as' Identifier)? 'from' StringLiteral ';' | 'import' '{' Identifier ('as' Identifier)? ( ',' Identifier ('as' Identifier)? )* '}' 'from' StringLiteral ';' -ContractDefinition = ( 'contract' | 'library' ) Identifier +ContractDefinition = ( 'contract' | 'library' | 'interface' ) Identifier ( 'is' InheritanceSpecifier (',' InheritanceSpecifier )* )? '{' ContractPart* '}' -- cgit From eb73015fd2c93abddef6477190180d04b396973a Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 15 Jun 2017 00:43:19 +0100 Subject: Support dialect of assembly in grammar --- docs/grammar.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/grammar.txt b/docs/grammar.txt index f0350239..09e492f3 100644 --- a/docs/grammar.txt +++ b/docs/grammar.txt @@ -62,7 +62,7 @@ WhileStatement = 'while' '(' Expression ')' Statement PlaceholderStatement = '_' SimpleStatement = VariableDefinition | ExpressionStatement ForStatement = 'for' '(' (SimpleStatement)? ';' (Expression)? ';' (ExpressionStatement)? ')' Statement -InlineAssemblyStatement = 'assembly' InlineAssemblyBlock +InlineAssemblyStatement = 'assembly' StringLiteral? InlineAssemblyBlock DoWhileStatement = 'do' Statement 'while' '(' Expression ')' Continue = 'continue' Break = 'break' -- cgit