 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
Prolog has
shortcuts in notation for certain operators (especially
|
arithmetic ones)
|
|
|
Position Operator Syntax Normal Syntax
|
|
Prefix: -2 -(2)
|
|
Infix: 5+17 +(17,5)
|
|
|
Associativity:
left, right, none.
|
|
X+Y+Z
is parsed as (X+Y)+Z
|
|
because addition
is left-associative.
|
|
|
Precedence: an
integer.
|
|
X+Y*Z is parsed as X+(Y*Z)
|
|
because
multiplication has higher precedence.
|
|