Expand description
Operator table DATA — token → operator-name mappings grouped by ISO
precedence level, kept separate from the precedence-climbing logic in
[super::term].
This is deliberately pure data (plus trivial lookups over it) so the M2
runtime’s minimal goal parser can share the same table without dragging in
the full parser. Each &str here is the atom name the operator interns to.
Functions§
- op_400
- Precedence-400 left-associative (
yfx) operators:* / // mod rem div << >>. - op_500
- Precedence-500 left-associative (
yfx) operators:+ - /\ \/ xor. - op_700
- Precedence-700 non-associative operators (
is,=, comparisons, term ordering). Maps a fixed-kind token to its operator atom name. The “word” operators that arrive asAtom(..)tokens (@<,=.., …) are handled byword_op_700. - op_
as_ atom - Operator name for an operator token appearing in atom position
(issue #19):
p(+),[<, >],X = (mod),=..round-trips, etc. This is the superset of all infix/prefix operator spellings. - word_
op_ 700 - Precedence-700 operators that the tokenizer emits as bare atoms
(
@<,@>,@=<,@>=,=..). Returns the canonical name whensis one of them.