Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <CockeYoungerKasamiVerbose.h>
Static Public Member Functions | |
template<class TerminalSymbolType , class NonterminalSymbolType > | |
static ext::vector< ext::vector< ext::set< NonterminalSymbolType > > > | generate (const grammar::CNF< TerminalSymbolType, NonterminalSymbolType > &grammar, const string::LinearString< TerminalSymbolType > &string) |
Implements the Cocke Younger Kasami algorithm.
|
static |
Implements the Cocke Younger Kasami algorithm to test whether string is in language generated by a grammar. This version returns the internal data structures.
TerminalSymbolType | the type of terminal symbol of the grammar |
NonterminalSymbolType | the type of nonterminal symbol of the grammar |
grammar | context free grammar in chomsky's normal form |
string | the tested string |