Skip to main content

emit_abnf

Function emit_abnf 

Source
pub fn emit_abnf(
    grammar: &Grammar,
) -> Result<(String, EmitReport), GrammarEmitError>
Expand description

Emits Augmented Backus-Naur Form text from the grammar IR.

ABNF has native alternation, grouping, optional expressions, counted repetition, numeric value ranges, and RFC 7405 case-sensitive string prefixes.

ยงErrors

Returns GrammarEmitError when the grammar contains a construct ABNF cannot represent, such as PEG predicates or negated character classes.