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

#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)
 

Detailed Description

Implements the Cocke Younger Kasami algorithm.

Member Function Documentation

◆ generate()

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::vector< ext::vector< ext::set< NonterminalSymbolType > > > grammar::generate::CockeYoungerKasamiVerbose::generate ( const grammar::CNF< TerminalSymbolType, NonterminalSymbolType > &  grammar,
const string::LinearString< TerminalSymbolType > &  string 
)
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.

Template Parameters
TerminalSymbolTypethe type of terminal symbol of the grammar
NonterminalSymbolTypethe type of nonterminal symbol of the grammar
Parameters
grammarcontext free grammar in chomsky's normal form
stringthe tested string
Returns
the internal table constructed by the Cock Younger Kasami algorithm
Here is the call graph for this function:
Here is the caller graph for this function:

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