Module normalizer

Module normalizer 

Source

Structsยง

GrammarNormalizer
Normalize a grammar: rename the root rule, then structure-normalize. Port of GrammarNormalizer.
RootRuleRenamer
Rename the root rule to "root"; if another rule is already named "root", give it a fresh root_N name.
SingleElementExprEliminator
Eliminates single-element sequences/choices and single-codepoint character classes. choices("a") -> "a", [a-a] -> "a".