Expand description
Pratt-parser contracts: operator tables for shape-driven
syntax.
The kernel defines the operator-table, fixity, and token contracts that parameterize precedence parsing; concrete grammars and codecs that drive them live in library crates.
Structs§
- Pratt
Operator - A single operator entry in a
PrattTable: its symbol, fixity, binding powers, and the expression form it produces. - Pratt
Table - A registry of
PrattOperatorentries indexed by fixity for precedence parsing. - Pratt
Table Object - Runtime
Objectwrapper exposing a namedPrattTableto the kernel as a core table value.
Enums§
- Fixity
- The grammatical position an operator occupies relative to its operands.
- Pratt
Result - The expression form a matched
PrattOperatorproduces. - Token
- A lexical token consumed by the precedence parser.
Functions§
- parse_
symbol - Parses a raw operator string into a
Symbol, splitting on the first/or.into a qualified namespace and name when present. - pratt_
table_ value - Boxes a named operator table into an opaque runtime
Value.