Ocaml\_operators(3) OCaml library Ocaml\_operators(3)

# [NAME](#NAME)

Ocaml\_operators - Precedence level and associativity of operators

# [Module](#Module)

Module Ocaml\_operators

# [Documentation](#Documentation)

Module **Ocaml\_operators**  
: **sig end**

## [Precedence level and associativity of operators](#Precedence_level_and_associativity_of_operators)

The following table lists the precedence level of all operator classes from the highest to the lowest precedence. A few other syntactic constructions are also listed as references.

[Associativity](#Associativity)

Operator class

\-

!.. ~..

\-

.() .\[] .{}

[left](#left)

#..

[left](#left~2)

function application

\-

\- -.

[right](#right)

\*\*.. lsl lsr asr

[left](#left~3)

\*.. /.. %.. mod land lor lxor

[left](#left~4)

+.. -..

[right](#right~2)

::

[right](#right~3)

@.. ^..

[left](#left~5)

=.. &lt;.. &gt;.. |.. &.. $.. !=

[right](#right~4)

& &&

[right](#right~5)

or ||

\-

,

[right](#right~6)

&lt;- :=

\-

if

[right](#right~7)

;

2026-09-04 OCamldoc

---

Document: Ocaml_operators(3o) from ocaml 5.5.1-r0 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
