Specifier

enum class Specifier: Enum<Specifier>, TermConvertible

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

The conventions for defining the order (prefix, infix and postfix) and associativity (left, right, none) of operators are as follows, where f stands for the position of the operator and x and y for its arguments:

| Prefix | Postfix | Infix | Associativity | | ------ | ------- | ----- | ------------- | | fx | xf | xfx | none | | | yf | yfx | left | | fy | | xfy | right |

EnumItems

Name Description
XF

Postfix and no-associative

YF

Postfix and left-associative

FX

Prefix and non-associative

FY

Prefix and right-associative

XFX

Infix and non-associative

XFY

Infix and right-associative

YFX

Infix and left-associative

Fields

Name Description
val isPrefix: Boolean

Whether this specifier is a prefix one

val isInfix: Boolean

Whether this specifier is an infix one

val isPostfix: Boolean

Whether this specifier is a postfix one

Methods

toTerm

fun toTerm(): Atom

Creates an atom containing the specifier symbolic name

ReturnValue

Name Description
Atom

Extensions

toAssociativity

fun Specifier.toAssociativity(): String

Receiver

Name Description
Specifier

ReturnValue

Name Description
String

CompanionObject

Specifier

enum class Specifier: Enum<Specifier>, TermConvertible

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

The conventions for defining the order (prefix, infix and postfix) and associativity (left, right, none) of operators are as follows, where f stands for the position of the operator and x and y for its arguments:

| Prefix | Postfix | Infix | Associativity | | ------ | ------- | ----- | ------------- | | fx | xf | xfx | none | | | yf | yfx | left | | fy | | xfy | right |

Fields

Name Description
val PREFIX: Set<Specifier>

Set of prefix specifiers

val POSTFIX: Set<Specifier>

Set of postfix specifiers

val INFIX: Set<Specifier>

Set of infix specifiers

val NON_PREFIX: Set<Specifier>

Set of non-prefix specifiers

Methods

fromTerm

fun fromTerm(atom: Atom): Specifier

Retrieves the specifier from an Atom value

Parameters

Name Description
atom: Atom

ReturnValue

Name Description
Specifier

fromTerm

fun fromTerm(term: Term): Specifier

Retrieves the specifier from an Atom value, throwing exception if not found

Parameters

Name Description
term: Term

ReturnValue

Name Description
Specifier