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

#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)
 

Detailed Description

Implements algorithms from Melichar, chapter 2.2

Member Function Documentation

◆ getNullableNonterminals()

template<class T , class TerminalSymbolType , class NonterminalSymbolType >
ext::set< NonterminalSymbolType > grammar::properties::NullableNonterminals::getNullableNonterminals ( const T &  grammar)
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

Template Parameters
Tthe type of the tested grammar
TerminalSymbolTypethe type of terminals in the tested grammar
NonterminalSymbolTypethe type of nonterminals in the tested grammar
Parameters
grammarthe tested grammar
Returns
set of nullable nonterminals from the grammar
Here is the call graph for this function:
Here is the caller graph for this function:

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