Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Static Public Member Functions
grammar::simplify::Trim Class Reference

#include <Trim.h>

Static Public Member Functions

template<class T >
static T trim (const T &grammar)
 

Detailed Description

Algorithm for the removal of dead symbols from a context free grammar. Firstly, it calls the unproductive symbols removal algorithm, then unreachable symbols removal algorithm.

See also
grammar::simplify::UnproduciveSymbolsRemover
grammar::simplify::UnreachableSymbolsRemover

Member Function Documentation

◆ trim()

template<class T >
T grammar::simplify::Trim::trim ( const T &  grammar)
static

Removes unproductive and unreachable symbols from the given grammar. Uses first the

See also
UnproductiveSymbolsRemover and next
UnreachableSymbolsRemover in the process.
Template Parameters
Ttype of a finite automaton
Parameters
grammarthe context free grammar to trim
Returns
the trimmed grammar equivalent to grammar
Here is the call graph for this function:

The documentation for this class was generated from the following file: