Skip to main content

Module describe

Module describe 

Source
Expand description

describe() — a human-readable dump of a live instance: its tag, tokens, token sets, rules, alternates, lexer matchers, config, plugins, and an ABNF rendering of the grammar.

The EIGHT section banners are the cross-runtime parity contract (test/spec/sections.tsv): INSTANCE, TOKENS, RULES, ALTS, LEXER, CONFIG, PLUGIN, ABNF, emitted byte-for-byte and in order by every runtime. The text BETWEEN them is not pinned, and differs where the engines expose different detail.

Ported from ts/src/debug.ts, which is canonical.

Constants§

SECTIONS
The eight section banners, in order. Pinned by test/spec/sections.tsv.

Functions§

describe
Render parser as printable text.