|
Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <NonterminalUnitRuleCycle.h>
Static Public Member Functions | |
| template<class T , class NonterminalSymbolType > | |
| static ext::set< NonterminalSymbolType > | getNonterminalUnitRuleCycle (const T &grammar, const NonterminalSymbolType &nonterminal) |
Implements algorithms from Melichar, chapter 2.2
|
static |
Retrieves set N = {B : A->^* B} for given grammar and nonterminal
Source: Melichar, algorithm 2.6, step 1
| T | the type of tested grammar |
| NonterminalSymbolType | the type of nonterminals in the tested grammar |
| grammar | grammar |
| nonterminal | nonterminal |