links->home

Action Associativity Operator Type
C
left to right
() [] . -> <expr>++ <expr>--
primary expression
 
right to left
* & + - ! ~ ++<expr> --<expr> sizeof (typecast)
unary
 
left to right
* / %
+ - 
<< >>
< > <= >=
== !=
&
^
|
&&
||
binary
 
right to left
?:
ternary
 
right to left
= += -= *= /= %= <<= >>= &= ^= |=
assignment
 
right to left
,
comma
D
non associative
!
template
 
left to right
=>
lambda
 
non associative
. <expr>++ <expr>-- () []
primary expression
 
right to left
^^
binary
 
right to left?
++<expr> --<expr> * + - ! & ~ cast
unary
 
left to right
* / %
+ - ~
<< >> >>>
binary
 
non associative
== != < > <= >= !< !> !<= !>= <> !<> <>= !<>= in !in is !is
 
 
non associative
&
^
|
 
 
left to right
&&
||
 
 
right to left
?:
ternary
 
right to left
= += -= *= /= %= ^= ^^= ~= <<= >>= >>>=
assignment
 
right to left
=>
lambda
 
left to right
,
comma
 
non associative
..
binary
Lua
right to left
^
binary
 
left to right
not # - ~
unary
 
left to right
* / // %
+ -
binary
 
right to left
..
 
 
left to right
<< >>
 
 
left to right
&
~
|
unary
 
left to right
< > <= >= == ~=
and
or
binary
Perl
left to right
e.g. (1, 2, sort 4, 3) => (1, 2, 3, 4)
terms and list operators (leftwards)
 
left to right
->
primary expression
 
non associativ
++ --
unary
 
right to left
**
binary
 
right to left
! ~ \ + -
unary
 
left to right
=~ !~
* / % x
+ - .
<< >>
binary
 
non associativ
e.g. -e -f
named unary operators
 
non associativ
< > <= >= lt gt le ge
== != <=> eq ne cmp
binary
 
left to right
&
| ^
&&
||
 
 
non associativ
.. ...
 
 
right to left
?:
ternary
 
right to left
= += -= *= /= .= **= %= x= &= |= ^= <<= >>= &&= ||=
assignment
 
left to right
, =>
comma
 
non associativ
e.g. <expr> or <expr>
list operators (rightwards)
 
right to left
not
unary
 
left to right
and
or xor
binary
Python
right to left
**
binary
 
right to left
~ + -
unary
 
left to right
* / % //
+ -
<< >>
&
^ |
< > <= >=
<> == !=
binary
 
TODO
= %= /= //= -= += *= **=
assignment
 
TODO
is is not
in not in
binary
 
TODO
not and or