Struct cfg::cycles::Cycles [] [src]

pub struct Cycles<G> { /* fields omitted */ }

Provides information about cycles among unit derivations in the grammar. There are two ways of pruning cycles.

Methods

impl<'a, G> Cycles<&'a mut G> where
    G: ContextFree,
    &'b G: ContextFreeRef<'b, Target = G>,
    &'b mut G: ContextFreeMut<'b, Target = G>, 
[src]

Analyzes the grammar's cycles.

Checks whether the grammar is cycle-free.

impl<'a, G> Cycles<&'a mut G> where
    G: ContextFree,
    &'a G: ContextFreeRef<'a, Target = G>,
    &'a mut G: ContextFreeMut<'a, Target = G>, 
[src]

Iterates over rules that participate in a cycle.

Removes all rules that participate in a cycle. Doesn't preserve the language represented by the grammar.

Rewrites all rules that participate in a cycle. Preserves the language represented by the grammar.