Header menu logo XParsec

XParsec.OperatorParsing Namespace

Type/Module Description

BindingPower

Binding power is used in Pratt parsing to determine the precedence and associativity of operators. Higher binding power indicates higher precedence. By convention, binding powers are odd numbers N with the next higher even number indicating the operator associativity. A left-associative operator with binding power N has left power N and right power N + 1. A right-associative operator with binding power N has left power N + 1 and right power N. A non-associative operator with binding power N has both left and right power N.

bp

A unit of measure representing binding power for operators. Binding power is used in Pratt parsing to determine the precedence and associativity of operators. Higher binding power indicates higher precedence. By convention, binding powers are odd numbers N with the next higher even number indicating the operator associativity. A left-associative operator with binding power N has left power N and right power N + 1. A right-associative operator with binding power N has left power N + 1 and right power N. A non-associative operator with binding power N has both left and right power N.

LHSOperator<'Op, 'Aux, 'Expr, 'T, 'State, 'Input, 'InputSlice>

Operator

Provides functions to create and parse expressions using operators.

Operator<'Op, 'Aux, 'Expr, 'T, 'State, 'Input, 'InputSlice>

OperatorLookup<'Key, 'Value>

Operators<'Op, 'Aux, 'Expr, 'T, 'State, 'Input, 'InputSlice>

A collection of operators used for parsing expressions. It contains both left-hand side (LHS) and right-hand side (RHS) operators, along with their associated parsers. Use `Operator.create` to create an instance of this type.

OperatorsCollection<'Op, 'Aux, 'Expr, 'T, 'State, 'Input, 'InputSlice>

Precedence

Operator precedence is used to determine the order of operations in expressions. Operators with higher precedence are evaluated first, resulting in the higher value appearing in the inner expression.

RHSOperator<'Op, 'Aux, 'Expr, 'T, 'State, 'Input, 'InputSlice>

Type something to start searching.