Expand description
Constructs useful in prefix, postfix, and infix operator parsing with the Pratt parsing method.
Macros§
- pratt_
precedence - Convenience macro for building a const Pratt parser precedence table.
Structs§
- Const
Pratt Parser - A Pratt parser that can be built in a
constcontext and stored in static memory. - Op
- An operator that corresponds to a rule.
- Pratt
Parser - Struct containing operators and precedences, which can perform Pratt parsing on
primary, prefix, postfix and infix expressions over
Pairs. The tokens inPairsshould alternate in the order:prefix* ~ primary ~ postfix* ~ (infix ~ prefix* ~ primary ~ postfix*)* - Pratt
Parser Map - Product of calling
map_primaryon aPrattParserorConstPrattParser, defines how expressions should be mapped.
Enums§
- Assoc
- Associativity of an infix binary operator, used by
Op::infix(Assoc).
Type Aliases§
- Prec
- Operator precedence level.