diff options
author | chriseth <chris@ethereum.org> | 2018-02-20 02:30:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 02:30:54 +0800 |
commit | 59f5a3137626b3521fdcb1c5767ce014dc04ee96 (patch) | |
tree | 8cb1483d2478e5fdba75a7b6a695559eca3350bb /docs | |
parent | 39f09a90f0aa6ecbba2639c08c77b7a077be5d43 (diff) | |
parent | 088d0e5dc12f125ac00ee9a073ddada64100c033 (diff) | |
download | dexon-solidity-59f5a3137626b3521fdcb1c5767ce014dc04ee96.tar dexon-solidity-59f5a3137626b3521fdcb1c5767ce014dc04ee96.tar.gz dexon-solidity-59f5a3137626b3521fdcb1c5767ce014dc04ee96.tar.bz2 dexon-solidity-59f5a3137626b3521fdcb1c5767ce014dc04ee96.tar.lz dexon-solidity-59f5a3137626b3521fdcb1c5767ce014dc04ee96.tar.xz dexon-solidity-59f5a3137626b3521fdcb1c5767ce014dc04ee96.tar.zst dexon-solidity-59f5a3137626b3521fdcb1c5767ce014dc04ee96.zip |
Merge pull request #3357 from federicobond/improve-asm-grammar
docs: Improve assembly grammar definition
Diffstat (limited to 'docs')
-rw-r--r-- | docs/assembly.rst | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/docs/assembly.rst b/docs/assembly.rst index afc44d66..02522469 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -861,38 +861,37 @@ Grammar:: AssemblyItem = Identifier | AssemblyBlock | - FunctionalAssemblyExpression | + AssemblyExpression | AssemblyLocalDefinition | - FunctionalAssemblyAssignment | AssemblyAssignment | + AssemblyStackAssignment | LabelDefinition | AssemblyIf | AssemblySwitch | AssemblyFunctionDefinition | AssemblyFor | - 'break' | 'continue' | - SubAssembly | 'dataSize' '(' Identifier ')' | - LinkerSymbol | - 'errorLabel' | 'bytecodeSize' | - NumberLiteral | StringLiteral | HexLiteral + 'break' | + 'continue' | + SubAssembly + AssemblyExpression = AssemblyCall | Identifier | AssemblyLiteral + AssemblyLiteral = NumberLiteral | StringLiteral | HexLiteral Identifier = [a-zA-Z_$] [a-zA-Z_0-9]* - FunctionalAssemblyExpression = Identifier '(' ( AssemblyItem ( ',' AssemblyItem )* )? ')' - AssemblyLocalDefinition = 'let' IdentifierOrList ':=' FunctionalAssemblyExpression - FunctionalAssemblyAssignment = IdentifierOrList ':=' FunctionalAssemblyExpression + AssemblyCall = Identifier '(' ( AssemblyExpression ( ',' AssemblyExpression )* )? ')' + AssemblyLocalDefinition = 'let' IdentifierOrList ( ':=' AssemblyExpression )? + AssemblyAssignment = IdentifierOrList ':=' AssemblyExpression IdentifierOrList = Identifier | '(' IdentifierList ')' IdentifierList = Identifier ( ',' Identifier)* - AssemblyAssignment = '=:' Identifier + AssemblyStackAssignment = '=:' Identifier LabelDefinition = Identifier ':' - AssemblyIf = 'if' FunctionalAssemblyExpression AssemblyBlock - AssemblySwitch = 'switch' FunctionalAssemblyExpression AssemblyCase* + AssemblyIf = 'if' AssemblyExpression AssemblyBlock + AssemblySwitch = 'switch' AssemblyExpression AssemblyCase* ( 'default' AssemblyBlock )? - AssemblyCase = 'case' FunctionalAssemblyExpression AssemblyBlock + AssemblyCase = 'case' AssemblyExpression AssemblyBlock AssemblyFunctionDefinition = 'function' Identifier '(' IdentifierList? ')' ( '->' '(' IdentifierList ')' )? AssemblyBlock - AssemblyFor = 'for' ( AssemblyBlock | FunctionalAssemblyExpression) - FunctionalAssemblyExpression ( AssemblyBlock | FunctionalAssemblyExpression) AssemblyBlock + AssemblyFor = 'for' ( AssemblyBlock | AssemblyExpression ) + AssemblyExpression ( AssemblyBlock | AssemblyExpression ) AssemblyBlock SubAssembly = 'assembly' Identifier AssemblyBlock - LinkerSymbol = 'linkerSymbol' '(' StringLiteral ')' NumberLiteral = HexNumber | DecimalNumber HexLiteral = 'hex' ('"' ([0-9a-fA-F]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'') StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"' |