Skip to main content

Module runtime

Module runtime 

Source
Expand description

Runtime parser for first-class grammar values.

GrammarParser interprets the grammar IR directly. It uses PEG-style ordered choice, longest-local-match determinisation for unordered choice, greedy repetition, and a same-rule/same-position guard so left-recursive grammars fail closed instead of looping.

Structs§

GrammarParser
A LanguageParser that interprets a Grammar at runtime.

Functions§

register_grammar
Register grammar under key, shadowing the built-in dispatch for that key.
with_grammar
Builder-style variant mirroring ParserRegistry::with_parser.