Expand description
Shared Pratt parser substrate for SIM codecs.
A concrete codec owns its lexer and operator table, then hands a stream of
SpannedPrattToken values to PrattCodecParser. The parser applies the
shared precedence-climbing driver and returns a sim_kernel::LocatedExprTree
with source spans, trivia, and decode-budget checks attached to the parsed
expression nodes.
The crate is intentionally language-neutral: token sources decide how source text becomes Pratt tokens, while this crate owns only the common grouping and expression-tree construction rules.
Structs§
- Pratt
Codec Parser - Language-neutral Pratt driver: an operator table plus any token source.
- Spanned
Pratt Token - A Pratt token with its source span, produced by a language-specific lexer.
Statics§
- RECIPES
- Cookbook recipes for this parser substrate, embedded at build time.
Traits§
- Pratt
Token Source - A lexer that turns source text into Pratt tokens for the shared driver.
Functions§
- raw_
number_ expr - Builds the raw-number expression emitted for Pratt numeric literal tokens.
- raw_
number_ tag - Returns the raw-number tag consumed by Algol number-domain lowering.