Expand description
Abstract Syntax Tree (AST) definitions for the Document Character (Dc) syntax DSL.
Structs§
- DcSyntax
Rule - Root AST structure for a complete Dc syntax declaration.
- Number
Subtype Constraint - Structured numeric format and/or range bound constraint for
[number:...]constructs. - Syntax
Action - Action invocation representing semantic translation or AST emission.
- Syntax
Diagnostic - Diagnostic message emitted during parsing or matching.
- Syntax
Element - Quantified element combining a term and its repetition quantifier.
Enums§
- Action
Arg - Argument passed to an action invocation.
- Char
Target - Target reference to a character or format entity.
- Framing
Shape - Physical framing classification of a Document Character or Format syntax rule.
- Numeric
Bound Value - Exact integer endpoint value used in
Dc 643 "Range"numeric subtype bounds (0..=u128::MAX, negative-u128, or2^128). - Quantifier
- Quantifier applied to a syntax term.
- Subtype
Constraint - Structured subtype constraint on a
SyntaxTerm::NamedConstruct([<name>:<subtype>]). - Syntax
Pattern - Pattern grammar combining sequences and alternations.
- Syntax
Term - Syntactic term in a Dc syntax rule.
Constants§
- MAX_
LEGACY_ FRAMING_ SHORT_ DC_ ID - Highest Short Dc ID permitted to use legacy framing shapes (
PrefixVariableArity,Infix, orLegacySourceWhitespace). Any newly allocated Short Dc (> 634) that defines a syntax rule must use deterministicPaired,Closer,PrefixAtomArity, orPrefixArityframing.
Functions§
- classify_
rule_ framing_ shape - Classifies the physical framing shape of a Document Character or Format rule without external subframe lookups.
- classify_
rule_ framing_ shape_ with - Classifies the physical framing shape of a Document Character or Format rule,
using
closer_for_openerandis_unary_prefix_targetto identify inline subframes. - is_
unary_ prefix_ rule - Returns true if
ruleis a 1-argument prefix rule (:~ <1 ExactOne NamedConstruct>). - normalize_
syntax_ pattern - Normalizes a syntax pattern by converting explicit references to the defining
character’s Short ID (or any equivalent ID) into
SyntaxTerm::SelfChar(~), and mapping target references to their canonical equivalents undercanonical_map.