Skip to main content

Module grammar

Module grammar 

Source
Expand description

Loading and installing the JSON-serializable grammar interchange format.

Structs§

GrammarError
GrammarSetting
Optional settings applied across a grammar installation.
GrammarSettingAlt
GrammarSettingRule
GrammarSpec
An ordered, immutable serialized grammar document.

Enums§

GrammarGroups
Group tags appended to every alternate while installing a grammar.

Constants§

BUILTIN_SCHEMA_VERSION
Builtin wire schema implemented by the Rust port. Schema v3 adds the @fold$ tree action used by current BNF-family compiler output. Schema v4 adds @key$ lit, the key as a constant rather than read from a token, for grammars that declare their shape instead of delimiting it. Schema v5 adds src to @setval$/@push$, taking a member’s value from the source text the tree builders accumulated.

Functions§

validate_grammar