8#include <ext/algorithm>
37 template<
class T,
class TerminalSymbolType =
typename grammar::TerminalSymbolTypeOfGrammar < T >,
class NonterminalSymbolType =
typename grammar::NonterminalSymbolTypeOfGrammar < T > >
41template <
class T,
class TerminalSymbolType,
class NonterminalSymbolType >
51 return ( symbol.template is < NonterminalSymbolType > ( ) && Ni.at(
i - 1 ) . count ( symbol.template get < NonterminalSymbolType > ( ) ) )
52 || ( symbol.template is < TerminalSymbolType > ( ) &&
grammar.getTerminalAlphabet( ). count ( symbol.template get < TerminalSymbolType > ( ) ) );
59 Ni.push_back ( Ni.at(
i - 1 ) );
61 for (
const auto & rule : rawRules ) {
62 for (
const auto & rhs : rule.second ) {
63 if (
std::all_of ( rhs.begin ( ), rhs.end ( ), testCallback ) )
64 Ni.at (
i ).insert ( rule.first );
68 }
while ( Ni.at (
i ) != Ni.at (
i - 1 ) );
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
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules(const LG< TerminalSymbolType, NonterminalSymbolType > &grammar)
Definition: RawRules.h:92
Definition: ProductiveNonterminals.h:24
static ext::set< NonterminalSymbolType > getProductiveNonterminals(const T &grammar)
Definition: ProductiveNonterminals.h:42
int i
Definition: AllEpsilonClosure.h:118
all_of(T &&...) -> all_of< T... >
Definition: ToAutomaton.h:24