Expand description
The typed AST of the input-parser DSL (§7.9).
The DSL has its own typed AST — the design (§7.9) forbids lowering parser
expressions directly into string-splitting calls. The ordinary language
parser produces rowan nodes; praxis-hir converts those into this ParserAst
before validation, type synthesis, and plan construction.
The node set is §7.4’s ten atomics (AtomicKind), §7.5’s fourteen
structural constructors (Constructor), and backtick templates with
{name:parser} / {parser} captures (TemplatePart).
Structs§
- Capture
Name - The name of a template capture — an identifier by construction.
- Empty
Separator - The one way
Separator::newfails: the text was empty. - Invalid
Capture Name - The one way
CaptureName::parsefails: the text is not an identifier. - Repeat
Count - The
Nof arepeated(P, N)— at least one section, by construction. - Separator
- The separator of a
sep(separator, P)call — non-empty by construction.
Enums§
- ArgShape
- The shape of a constructor call’s argument list (§7.5).
- Atomic
Kind - One of the atomic parsers (§7.4).
- Block
Item - One item in a
block(...)(§7.5). - Constructor
- The name of a structural constructor — the whole of §7.5.
- Invalid
Repeat Count - The two ways
RepeatCount::newfails. - Parser
Ast - A parser expression (§7.9
ParserExpr). - Section
Item - One named argument of a heterogeneous
sections(...)other than its unbounded tail (§7.5). - Skip
Policy - How
chars(P, skip:)trims between matches (§7.5). - Template
Part - One part of a backtick template (§7.9
TemplatePart). - WsPolicy
- How a template literal run of whitespace matches input (§7.2).
Functions§
- shift_
part_ spans - Shift every span inside a template’s parts by
deltabytes.