|
Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <GrammarConcatenation.h>
Static Public Member Functions | |
| template<class TerminalSymbolType , class NonterminalSymbolType > | |
| static grammar::CFG< TerminalSymbolType, ext::pair< NonterminalSymbolType, unsigned > > | concatenation (const grammar::CFG< TerminalSymbolType, NonterminalSymbolType > &first, const grammar::CFG< TerminalSymbolType, NonterminalSymbolType > &second) |
Concatenation of two grammars. For two regular grammars G1 and G2, we create a regular grammar such that L(G) = L(G1).L(G2). For CFG and CFG/RG we create a context free grammar such that L(G) = L(G1).(G2). Source:
|
static |
Concatenates two grammars.
| TerminalSymbolType | Type for terminal symbols. |
| NonterminalSymbolType | Type for nonterminal symbols. |
| first | First grammar (G1) |
| second | Second grammar (G2) |