To lookup syntax operators we use ordinary Prolog facts. The predicate current_op/3 queries the current system and user syntax operators. The predicate op/3 defines a new operator or updates an existing operator.
The following syntax operators are predefined:
Level | Mode | Operators |
---|---|---|
1200 | fx | [:-, ?-, -->] |
1200 | xfx | [:-] |
1150 |
fx |
[dynamic, discontiguous, multifile] |
1100 | xfy | [;] |
1050 |
xfy |
[->] |
1000 | xfy | [','] |
900 | fy | [\+] |
700 | xfx | [is, =, =.., <, =<, =\=, >=, >,
=:=, @<, @=<, \==, @>=, @>, ==] |
600 |
xfy |
[:] |
500 | yfx | [+, -, /\, \/] |
400 | yfx | [*, /, //, rem, xor, >>, <<, div, mod] |
200 | xfx |
[**] |
200 | xfy |
[^] |
200 |
fy |
[-, \] |
The following syntax operator predicates are provided: