The grammar in Figure 1 allows infix binary operators, but (for brevity) is not explicit about their precedence. Instead we give the following table of precedences, where a higher precedence means tighter binding:
Precedence | Associativity | Operator |
6 | Left | Application |
5 | Right | * |
None | / | |
4 | Right | + |
None | - | |
3 | None | == /= > >= < <= |
2 | Right | && |
1 | Right | || |
An operator's associativity determines when parentheses may be omitted around repetitions of the operator. For example, + is right-associative, so x+y+z means the same as x+(y+z). On the other hand, / is non-associative, so the expression x/y/z is illegal.