grammar-combinators-0.2.7: A parsing library of context-free grammar combinators.

Safe HaskellNone

Text.GrammarCombinators.Transform.UnfoldChainNTs

Synopsis

Documentation

unfoldChainNTs :: forall phi r t. EqFam phi => ProcessingContextFreeGrammar phi r t -> ProcessingContextFreeGrammar phi r tSource

Unfold chain non-terminals in a given context- free grammar. A chain non-terminal is a terminal such that its production rule is a numer of epsilons followed by a single normal reference to another non-terminal.

unfoldChainNTsE :: forall phi r t. EqFam phi => ProcessingExtendedContextFreeGrammar phi r t -> ProcessingExtendedContextFreeGrammar phi r tSource

Unfold chain non-terminals in a given extended context-free grammar. A chain non-terminal is a terminal such that its production rule is a numer of epsilons followed by a single normal reference to another non-terminal.