#include <GenerateUpToLength.h>
|
template<class T , class TerminalSymbolType = typename grammar::TerminalSymbolTypeOfGrammar < T >, class NontermimnalSymbolType = typename grammar::NonterminalSymbolTypeOfGrammar < T >> |
static ext::trie< TerminalSymbolType, bool > | generate (const T &grammar, unsigned length) |
|
Implements the construction of index of all strings generated by given grammar shorter than given size.
◆ generate()
template<class T , class TerminalSymbolType , class NonterminalSymbolType >
ext::trie< TerminalSymbolType, bool > grammar::generate::GenerateUpToLength::generate |
( |
const T & |
grammar, |
|
|
unsigned |
length |
|
) |
| |
|
static |
Implements the construction of index of all strings generated by given grammar shorter than given size.
- Template Parameters
-
T | the type of grammar accepted |
TerminalSymbolType | the type of terminal symbol of the grammar |
NonterminalSymbolType | the type of nonterminal symbol of the grammar |
- Parameters
-
grammar | the given grammar generating the language |
length | the limiting size of considered strings |
- Returns
- trie where for each node the path from root to the node represents a string and a boolean flag determines whether the string is in the language or not.
The documentation for this class was generated from the following file: