diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/contributing.rst | 3 | ||||
-rw-r--r-- | docs/grammar.txt | 35 |
2 files changed, 30 insertions, 8 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst index f9c4d9d9..43b2fd38 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -102,6 +102,9 @@ For example, here's an example test you might run; ``./scripts/soltest.sh -t "yulOptimizerTests/disambiguator/*" --no-ipc --no-smt``. This will test all the tests for the disambiguator. +To get a list of all tests, use +``./build/test/soltest --list_content=HRF -- --ipcpath /tmp/irrelevant``. + If you want to debug using GDB, make sure you build differently than the "usual". For example, you could run the following command in your ``build`` folder: :: diff --git a/docs/grammar.txt b/docs/grammar.txt index b9c8ddb9..3d2c9bc3 100644 --- a/docs/grammar.txt +++ b/docs/grammar.txt @@ -72,7 +72,7 @@ WhileStatement = 'while' '(' Expression ')' Statement PlaceholderStatement = '_' SimpleStatement = VariableDefinition | ExpressionStatement ForStatement = 'for' '(' (SimpleStatement)? ';' (Expression)? ';' (ExpressionStatement)? ')' Statement -InlineAssemblyStatement = 'assembly' StringLiteral? InlineAssemblyBlock +InlineAssemblyStatement = 'assembly' StringLiteral? AssemblyBlock DoWhileStatement = 'do' Statement 'while' '(' Expression ')' Continue = 'continue' Break = 'break' @@ -152,11 +152,30 @@ Fixed = 'fixed' | ( 'fixed' [0-9]+ 'x' [0-9]+ ) Ufixed = 'ufixed' | ( 'ufixed' [0-9]+ 'x' [0-9]+ ) -InlineAssemblyBlock = '{' AssemblyItem* '}' -AssemblyItem = Identifier | FunctionalAssemblyExpression | InlineAssemblyBlock | AssemblyVariableDeclaration | AssemblyAssignment | AssemblyLabel | NumberLiteral | StringLiteral | HexLiteral -AssemblyExpression = Identifier | FunctionalAssemblyExpression | NumberLiteral | StringLiteral | HexLiteral -AssemblyVariableDeclaration = 'let' Identifier ':=' AssemblyExpression -AssemblyAssignment = ( Identifier ':=' AssemblyExpression ) | ( '=:' Identifier ) -AssemblyLabel = Identifier ':' -FunctionalAssemblyExpression = Identifier '(' AssemblyItem? ( ',' AssemblyItem )* ')' +AssemblyBlock = '{' AssemblyStatement* '}' + +AssemblyStatement = AssemblyBlock + | AssemblyFunctionDefinition + | AssemblyVariableDeclaration + | AssemblyAssignment + | AssemblyIf + | AssemblyExpression + | AssemblySwitch + | AssemblyForLoop + | AssemblyBreakContinue +AssemblyFunctionDefinition = + 'function' Identifier '(' AssemblyIdentifierList? ')' + ( '->' AssemblyIdentifierList )? AssemblyBlock +AssemblyVariableDeclaration = 'let' AssemblyIdentifierList ( ':=' AssemblyExpression )? +AssemblyAssignment = AssemblyIdentifierList ':=' AssemblyExpression +AssemblyExpression = AssemblyFunctionCall | Identifier | Literal +AssemblyIf = 'if' AssemblyExpression AssemblyBlock +AssemblySwitch = 'switch' AssemblyExpression ( Case+ AssemblyDefault? | AssemblyDefault ) +AssemblyCase = 'case' Literal AssemblyBlock +AssemblyDefault = 'default' AssemblyBlock +AssemblyForLoop = 'for' AssemblyBlock AssemblyExpression AssemblyBlock AssemblyBlock +AssemblyBreakContinue = 'break' | 'continue' +AssemblyFunctionCall = Identifier '(' ( AssemblyExpression ( ',' AssemblyExpression )* )? ')' + +AssemblyIdentifierList = Identifier ( ',' Identifier )* |