Package-level declarations

Types

Link copied to clipboard
class Operator(val functor: String, val specifier: Specifier, val priority: Int) : Comparable<Operator> , TermConvertible

A logic (a.k.a. Prolog) operator declaration, associating a functor with a specifier (fixity and associativity) and a priority (lower binds tighter). Operators are what let a TermFormatter render, e.g., +(1, 2) as 1 + 2, and what an OperatorSet groups together for a parser or formatter to consult.

Link copied to clipboard
class OperatorSet(operators: Sequence<Operator>) : Set<Operator>

An immutable Set of Operators, used by pretty-printing/parsing code (e.g. TermFormatter.prettyExpressions) to know which functors should be rendered/read as prefix, infix, or postfix expressions. DEFAULT (same as STANDARD) bundles the usual arithmetic, comparison, and control-flow operators; plus/minus let a program layer its own operators on top of (or remove some from) an existing set without mutating it.

Link copied to clipboard

A lookup structure mapping an Operator.functor to its Operator.priority, indexed by Operator.specifier.

Link copied to clipboard

Enumeration containing all type of specifiers that can be given to Operators.

Functions

Link copied to clipboard

Builds an OperatorsIndex out of this collection of Operators, for fast functor/specifier lookups.