38 template <
class T,
class NonterminalSymbolType,
class TerminalSymbolType =
typename grammar::TerminalSymbolTypeOfGrammar < T > >
43template <
class T,
class NonterminalSymbolType,
class TerminalSymbolType >
45 if (
grammar.getNonterminalAlphabet ( ).count ( nonterminal ) == 0 )
55 while (
i <=
grammar.getNonterminalAlphabet ( ).size ( ) ) {
58 for (
const NonterminalSymbolType & lhs : Ni.at (
i - 1 ) )
59 if ( rawRules.find ( lhs ) != rawRules.end ( ) )
62 if (
grammar.getTerminalAlphabet ( ).count ( rhsSymbol ) )
65 Ni.at (
i ).insert ( rhsSymbol.template get < NonterminalSymbolType > ( ) );
67 if ( ! nullable.count ( rhsSymbol.template get < NonterminalSymbolType > ( ) ) )
71 if ( Ni.at (
i ).count ( nonterminal ) )
Basic exception from which all other exceptions are derived.
Definition: CommonException.h:21
Class extending the deque class from the standard library. Original reason is to allow printing of th...
Definition: deque.hpp:44
Implementation of the variant class allowing to store any type of those listed in the template parame...
Definition: variant.hpp:98
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules(const LG< TerminalSymbolType, NonterminalSymbolType > &grammar)
Definition: RawRules.h:92
static ext::set< NonterminalSymbolType > getNullableNonterminals(const T &grammar)
Definition: NullableNonterminals.h:44
Definition: RecursiveNonterminal.h:24
static bool isNonterminalRecursive(const T &grammar, const NonterminalSymbolType &nonterminal)
Definition: RecursiveNonterminal.h:44
int i
Definition: AllEpsilonClosure.h:118
std::string to_string(const T &value)
To string method designated for objects that can be casted to string.
Definition: string.hpp:131
Definition: ToAutomaton.h:24