#include <RandomGrammarFactory.h>
|
template<class TerminalSymbolType , class NonterminalSymbolType > |
static grammar::CFG< TerminalSymbolType, NonterminalSymbolType > | generateCFG (ext::set< NonterminalSymbolType > nonterminals, ext::set< TerminalSymbolType > terminals, double density) |
|
static grammar::CFG< std::string, std::string > | generateCFG (size_t nonterminalsCount, size_t terminalsCount, bool randomizedAlphabet, double density) |
|
◆ generateCFG() [1/2]
template<class TerminalSymbolType , class NonterminalSymbolType >
grammar::CFG< TerminalSymbolType, NonterminalSymbolType > grammar::generate::RandomGrammarFactory::generateCFG |
( |
ext::set< NonterminalSymbolType > |
nonterminals, |
|
|
ext::set< TerminalSymbolType > |
terminals, |
|
|
double |
density |
|
) |
| |
|
static |
Generates a random context free grammar.
- Template Parameters
-
TerminalSymbolType | the type of terminal symbols of the random grammar |
NonterminalSymbolType | the type of nonterminal symbols of the random grammar |
- Parameters
-
nonterminals | the nonterminals in the generated grammar |
terminals | the terminals in the generated grammar |
density | density of the rule set of the generated grammar |
- Returns
- random context free grammar
◆ generateCFG() [2/2]
grammar::CFG< std::string, std::string > grammar::generate::RandomGrammarFactory::generateCFG |
( |
size_t |
nonterminalsCount, |
|
|
size_t |
terminalsCount, |
|
|
bool |
randomizedAlphabet, |
|
|
double |
density |
|
) |
| |
|
static |
Generates a random context free grammar.
- Template Parameters
-
TerminalSymbolType | the type of terminal symbols of the random grammar |
NonterminalSymbolType | the type of nonterminal symbols of the random grammar |
- Parameters
-
nonterminalsCount | number of nonterminals in the generated grammar |
terminalsSize | the number of terminals used in the generated grammar |
randomizedAlphabet | selects random symbols from a-z range for terminal and A-Z for nonterminal alphabet if true |
density | density of the rule set of the generated grammar |
- Returns
- random context free grammar
The documentation for this class was generated from the following files: