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

Text.GrammarCombinators.Transform.UnfoldDead

Synopsis

Documentation

unfoldDead :: (EqFam phi, FoldFam phi, MemoFam phi) => GContextFreeGrammar phi r t rr -> GContextFreeGrammar phi r t rrSource

Unfold dead non-terminals in a given context- free grammar, such that the unfolded references can be filtered with the filterDies algorithm. This uses the isDead algorithm to detect dead non-terminals.

unfoldDeadE :: (EqFam phi, FoldFam phi, MemoFam phi) => GExtendedContextFreeGrammar phi r t rr -> GExtendedContextFreeGrammar phi r t rrSource

Unfold dead non-terminals in a given extended context- free grammar, such that the unfolded references can be filtered with the filterDies algorithm. This uses the isDead algorithm to detect dead non-terminals.

unfoldDeadLE :: (EqFam phi, FoldFam phi, MemoFam phi) => GLExtendedContextFreeGrammar phi r t rr -> GLExtendedContextFreeGrammar phi r t rrSource

Unfold dead non-terminals in a given extended liftable context- free grammar, such that the unfolded references can be filtered with the filterDies algorithm. This uses the isDead algorithm to detect dead non-terminals.