mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-09-19 01:49:11 +03:00
Make a table for operator precedences
This commit is contained in:
parent
29eefbc09d
commit
7a98ab5b9b
@ -116,24 +116,44 @@ The following table contains Cryptol's operators and their
|
||||
associativity with lowest precedence operators first, and highest
|
||||
precedence last.
|
||||
|
||||
Operator Associativity
|
||||
----------------------------------------- -------------
|
||||
`==>` right
|
||||
`\/` right
|
||||
`/\` right
|
||||
`==` `!=` `===` `!==` not associative
|
||||
`>` `<` `<=` `>=` `<$` `>$` `<=$` `>=$` not associative
|
||||
`||` right
|
||||
`^` left
|
||||
`&&` right
|
||||
`#` right
|
||||
`>>` `<<` `>>>` `<<<` `>>$` left
|
||||
`+` `-` left
|
||||
`*` `/` `%` `/$` `%$` left
|
||||
`^^` right
|
||||
`@` `@@` `!` `!!` left
|
||||
(unary) `-` `~` right
|
||||
.. table:: Operator precedences
|
||||
|
||||
+-----------------------------------------+-----------------+
|
||||
|Operator | Associativity |
|
||||
+=========================================+=================+
|
||||
| ``==>`` | right |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``\/`` | right |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``/\`` | right |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``==`` ``!=`` ``===`` ``!==`` | not associative |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``>`` ``<`` ``<=`` ``>=`` | not associative |
|
||||
| ``<$`` ``>$`` ``<=$`` ``>=$`` | |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``||`` | right |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``^`` | left |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``&&`` | right |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``#`` | right |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``>>`` ``<<`` ``>>>`` ``<<<`` ``>>$`` | left |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``+`` ``-`` | left |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``*`` ``/`` ``%`` ``/$`` ``%$`` | left |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``^^`` | right |
|
||||
+-----------------------------------------+-----------------+
|
||||
| ``@`` ``@@`` ``!`` ``!!`` | left |
|
||||
+-----------------------------------------+-----------------+
|
||||
| (unary) ``-`` ``~`` | right |
|
||||
+-----------------------------------------+-----------------+
|
||||
|
||||
|
||||
|
||||
Table: Operator precedences.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user