Expand description
The structured counterpart to crate::describe(): an instance and its
grammar as typed, JSON-serialisable data, so tools and tests can
consume the grammar programmatically.
Mirrors the canonical TypeScript tabnas.debug.model() and its
exported types in ts/src/debug.ts (DebugModel, DebugTokenInfo,
DebugTokenSet, DebugAltInfo, DebugRuleInfo, DebugRuleEdges,
DebugLexMatcher, DebugConfigInfo, DebugPluginInfo). The serde
field names match the TS field names and the Go JSON tags, so a model
decoded from any runtime is comparable with the others — the claim
test/spec/model.tsv pins.
Structs§
- Debug
AltInfo - The structured form of a single rule alternate — the data behind the
ALTStext ofcrate::describe(). - Debug
Config Info - The key parser settings: start rule, finish flag, safe-key, and the built-in per-lexer enable flags.
- Debug
LexMatcher - One lexer matcher, in priority order.
- Debug
Model - The full structured description of an instance: the token table, token sets, rules and alternates as data, the rule-reference graph, lexer matchers, config, plugins, and the ABNF text.
- Debug
Plugin Info - One applied plugin: its name, and its options when the instance holds a bag for it.
- Debug
Rule Edges - One rule’s outgoing edges in the rule-reference graph: the distinct
push/replace rule-name targets of its open and close alternates
(function-valued targets recorded as
<fn>). - Debug
Rule Info - One rule: its name and its open/close alternates as structured data.
- Debug
Token Info - One row of the token table: the token’s tin (token identification number), its name, and — for fixed (literal) tokens — the source text it matches.
- Debug
Token Set - A named token set and its member tins.
Enums§
- Debug
SeqItem - One lookahead position of an alternate’s token sequence: a single token name, or the several names a multi-token position accepts.
Functions§
- model
- Build the structured model of
parser.