Skip to main content

default_pratt_table

Function default_pratt_table 

Source
pub fn default_pratt_table() -> PrattTable
Expand description

Builds the default Algol operator table.

Registers the arithmetic operators with their fixities and binding powers: left-associative + and - (binding power 50/51), * and / (60/61), right-associative ^ (80), prefix negation - (90), and postfix ! (100). Higher binding power binds more tightly, so 1 + 2 * 3 groups as 1 + (2 * 3).