#include <CockeYoungerKasami.h>
|
template<class TerminalSymbolType , class NonterminalSymbolType > |
static bool | generate (const grammar::CNF< TerminalSymbolType, NonterminalSymbolType > &grammar, const string::LinearString< TerminalSymbolType > &string) |
|
Implements the Cocke Younger Kasami algorithm.
◆ generate()
template<class TerminalSymbolType , class NonterminalSymbolType >
bool grammar::generate::CockeYoungerKasami::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
- Template Parameters
-
TerminalSymbolType | the type of terminal symbol of the grammar |
NonterminalSymbolType | the type of nonterminal symbol of the grammar |
- Parameters
-
grammar | context free grammar in chomsky's normal form. |
string | the tested string |
- Returns
- true if the
grammar
generates a language containing string
The documentation for this class was generated from the following file: