Expand description
AXON Parser — recursive descent, fail-fast.
Direct port of axon/compiler/parser.py.
Tier 1 constructs (persona, context, anchor, memory, tool, type, flow, step, intent, run, epistemic, if, for, let, return) are fully parsed into typed AST nodes.
Tier 2+ constructs are parsed structurally (balanced braces) into
GenericDeclaration / GenericFlowStep.
Structs§
- Parse
Error - Parse
Result - Outcome of
Parser::parse_with_recovery— partial program plus the list of every error the parser recovered from. See module docs for the panic-mode + sync-point recovery semantics. - Parser
- Source
Snippet - v1.20.0 — Rustc-style source-context block for a parse error.
Constants§
- AXONENDPOINT_
BACKEND_ VALUES - v1.31.0 (D2) — Closed catalog for the
axonendpoint backend:declaration. The set isCANONICAL_PROVIDERS ∪ {auto, stub}: - AXONENDPOINT_
KEEPALIVE_ VALUES - Adopter-facing acceptable values for
keepalive:field. - AXONENDPOINT_
METHOD_ VALUES - v1.23.0 D3 — Closed method enum for
method:field. Adopter- declarable methods only; HEAD/OPTIONS/CONNECT/TRACE are runtime-managed (CORS preflight, etc.) and never declared from source. Closed enum refuses interpretation drift; smart-suggest catches near-misses at parse time. - AXONENDPOINT_
QUERY_ PARAM_ TYPES - v1.32.0 (D2) — Closed type catalog for query parameters.
- AXONENDPOINT_
TRANSPORT_ DIALECTS - v1.28.0 — Closed-catalog SSE wire-format
dialects. Selected via the parametrized grammar
transport: sse(<dialect>); baretransport: sseresolves to the Q1 default per the flow’s algebraic-effect predicate (openai for tool-streaming flows; axon for type-annotation-only). - AXONENDPOINT_
TRANSPORT_ VALUES - Adopter-facing acceptable values for
transport:field. Used by both the parser (validation + smart-suggest) and the type-checker (30.c) so adopter tooling sees one canonical list. - SOURCE_
CONTEXT_ LINES_ AFTER - SOURCE_
CONTEXT_ LINES_ BEFORE - v1.20.0 — Source-context constants. D4 ratified 2026-05-10:
2 lines before + 2 lines after the error line. Mirror of the
Python-side
_SOURCE_CONTEXT_LINES_BEFORE/_AFTERso the rustc-style block has identical shape across stacks.
Functions§
- is_
valid_ capability_ slug - v1.23.0 (D8) — Closed capability-slug grammar. Validates a
requires:slug per^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)*$.