29 template <
class TerminalSymbolType,
class NonterminalSymbolType >
35 template <
class TerminalSymbolType,
class NonterminalSymbolType >
39template <
class TerminalSymbolType,
class NonterminalSymbolType >
45 for(
const auto & rule :
grammar.getRules()) {
46 const NonterminalSymbolType& lhs = rule.first;
48 for(
const auto& ruleRHS : rule.second) {
49 if(ruleRHS.template is<TerminalSymbolType>()) {
50 const TerminalSymbolType& rhs = ruleRHS.template get<TerminalSymbolType>();
58 if(
grammar.getGeneratesEpsilon())
64template <
class TerminalSymbolType,
class NonterminalSymbolType >
70 for(
const auto & rule :
grammar.getRules()) {
71 const NonterminalSymbolType & lhs = rule.first;
73 for(
const auto& ruleRHS : rule.second) {
74 if ( ruleRHS.template is < TerminalSymbolType > ( ) ) {
75 const TerminalSymbolType & rhs = ruleRHS.template get < TerminalSymbolType > ( );
83 if(
grammar.getGeneratesEpsilon())
Definition: LeftRegularEquationSolver.h:16
Definition: RightRegularEquationSolver.h:16
Class extending the pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
Left regular grammar in Chomsky hierarchy or type 3 in Chomsky hierarchy. Generates regular languages...
Definition: LeftRG.h:70
Right regular grammar in Chomsky hierarchy or type 3 in Chomsky hierarchy. Generates regular language...
Definition: RightRG.h:70
Definition: ToRegExpAlgebraic.h:21
static regexp::UnboundedRegExp< TerminalSymbolType > convert(const grammar::RightRG< TerminalSymbolType, NonterminalSymbolType > &grammar)
Definition: ToRegExpAlgebraic.h:65
Represents the epsilon expression in the regular expression. The node can't have any children.
Definition: UnboundedRegExpEpsilon.h:41
Represents the symbol in the regular expression. The can't have any children.
Definition: UnboundedRegExpSymbol.h:42
Unbounded regular expression represents regular expression. It describes regular languages....
Definition: UnboundedRegExp.h:80
equations::RightRegularEquationSolver< SymbolType, StateType > solver
Definition: ToRegExpAlgebraic.h:117
Definition: converterCommon.hpp:8
Definition: ToAutomaton.h:24