Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <NullableNonterminals.h>
Static Public Member Functions | |
template<class T , class TerminalSymbolType = typename grammar::TerminalSymbolTypeOfGrammar < T >, class NonterminalSymbolType = typename grammar::NonterminalSymbolTypeOfGrammar < T >> | |
static ext::set< NonterminalSymbolType > | getNullableNonterminals (const T &grammar) |
Implements algorithms from Melichar, chapter 2.2
|
static |
Retrieve all nullable nonterminals from grammar Nullable nonterminal is such nonterminal A for which holds that A ->^* \eps
Source: Melichar, algorithm 2.4, step 1
T | the type of the tested grammar |
TerminalSymbolType | the type of terminals in the tested grammar |
NonterminalSymbolType | the type of nonterminals in the tested grammar |
grammar | the tested grammar |
grammar