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

Text.GrammarCombinators.Utils.IsDead

Synopsis

Documentation

isDead :: forall phi t r rr ix. (EqFam phi, FoldFam phi, MemoFam phi) => GExtendedContextFreeGrammar phi t r rr -> phi ix -> BoolSource

Detect if a given non-terminal in a given grammar is dead. A non-terminal is dead if its production rule can never match anything.