8#include <ext/algorithm>
13#include <alib/variant>
26 template <
class T,
class TerminalSymbolType,
class NonterminalSymbolType >
30 template <
class T,
class TerminalSymbolType =
typename grammar::TerminalSymbolTypeOfGrammar < T >,
class NonterminalSymbolType =
typename grammar::NonterminalSymbolTypeOfGrammar < T > >
33 template <
class T,
class NonterminalSymbolType,
class TerminalSymbolType =
typename grammar::TerminalSymbolTypeOfGrammar < T > >
37template <
class T,
class TerminalSymbolType,
class NonterminalSymbolType >
41 const NonterminalSymbolType & X = rule.first;
48 if ( !
grammar.getNonterminalAlphabet ( ).count ( Y ) )
55 followSet [ Y.template get < TerminalSymbolType > ( ) ].insert ( followSet[X].
begin ( ), followSet[X].
end ( ) );
58 followSet [ Y.template get < TerminalSymbolType > ( ) ].insert ( firstBeta.
begin ( ), firstBeta.
end ( ) );
64template <
class T,
class TerminalSymbolType,
class NonterminalSymbolType >
79 for (
const NonterminalSymbolType & symb :
grammar.getNonterminalAlphabet ( ) )
89 if ( followSet1 == followSet2 )
92 followSet1 = followSet2;
98template <
class T,
class NonterminalSymbolType,
class TerminalSymbolType >
100 if ( !
grammar.getNonterminalAlphabet ( ).count ( nt ) )
Basic exception from which all other exceptions are derived.
Definition: CommonException.h:21
Class extending the map class from the standard library. Original reason is to allow printing of the ...
Definition: map.hpp:48
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: set.hpp:99
auto end() &
Inherited behavior of end for non-const instance.
Definition: set.hpp:129
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
auto begin(Container &&cont) -> decltype(std::forward(cont).begin())
Definition: iterator.hpp:900
Definition: ToAutomaton.h:24
void end()
Definition: measurements.cpp:19