Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Static Public Member Functions
grammar::generate::GenerateUpToLength Class Reference

#include <GenerateUpToLength.h>

Static Public Member Functions

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)
 

Detailed Description

Implements the construction of index of all strings generated by given grammar shorter than given size.

Member Function Documentation

◆ 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
Tthe type of grammar accepted
TerminalSymbolTypethe type of terminal symbol of the grammar
NonterminalSymbolTypethe type of nonterminal symbol of the grammar
Parameters
grammarthe given grammar generating the language
lengththe 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.
Here is the call graph for this function:

The documentation for this class was generated from the following file: