Expand description
Reverse conversion of a grammar back to its source format.
The checked cycle is source grammar -> native links -> exported grammar ->
native links: the source is imported, written as the native links form and
read back from those links alone, so the emitter is handed a grammar decoded
from links and never the source text. The export is re-imported and
compared with the imported grammar rule by rule (names, start rule, kinds,
definitions modulo the documented canonical spelling of single-character
sets, and rule documentation, the provenance an importer keeps from
comments), and both grammars are run on independent accept and reject
samples. It mirrors js/src/grammar-reverse.js.
Structs§
- Grammar
Reverse Conversion - The importer/emitter pair under test and the independent samples.
- Grammar
Reverse Failure - One failed check.
- Grammar
Reverse Report - The outcome of
check_grammar_reverse_conversion.
Enums§
- Grammar
Reverse Failure Kind - What a failed check found.
- Grammar
Reverse Stage - The step of the cycle a failed check looked at.
- Grammar
Reverse Status - Whether the cycle kept the grammar.
Functions§
- check_
grammar_ reverse_ conversion - Runs the reverse conversion cycle on
sourceand reports every failure.