Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Reachability of nonterminals in the grammar.
- reachables :: forall cfg t nt. (Cfg cfg t nt, Ord nt) => cfg t nt -> Set nt
- unreachables :: forall cfg t nt. (Cfg cfg t nt, Ord nt) => cfg t nt -> Set nt
- removeUnreachables :: forall cfg t nt. (Cfg cfg t nt, Ord nt) => cfg t nt -> FreeCfg t nt
Documentation
reachables :: forall cfg t nt. (Cfg cfg t nt, Ord nt) => cfg t nt -> Set nt Source
Returns the nonterminals of this grammar reachable from the start symbol.
unreachables :: forall cfg t nt. (Cfg cfg t nt, Ord nt) => cfg t nt -> Set nt Source
Returns the nonterminals of this grammar unreachable from the start symbol.
removeUnreachables :: forall cfg t nt. (Cfg cfg t nt, Ord nt) => cfg t nt -> FreeCfg t nt Source
Returns an equivalent grammar not including unreachable nonterminals.