BindingPower Module
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.
Functions and values
| Function or value | Description |
|
|
Full Usage:
leftAssocRhs basePower
Parameters:
byte<MeasureProduct<bp, MeasureOne>>
Returns: byte<MeasureProduct<bp, MeasureOne>>
|
|
Full Usage:
rightAssocLhs basePower
Parameters:
byte<MeasureProduct<bp, MeasureOne>>
Returns: byte<MeasureProduct<bp, MeasureOne>>
|