Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <CNF.h>
Static Public Member Functions | |
static bool | used (const grammar::CNF< TerminalSymbolType, NonterminalSymbolType > &grammar, const TerminalSymbolType &symbol) |
static bool | available (const grammar::CNF< TerminalSymbolType, NonterminalSymbolType > &, const TerminalSymbolType &) |
static void | valid (const grammar::CNF< TerminalSymbolType, NonterminalSymbolType > &grammar, const TerminalSymbolType &symbol) |
Helper class specifying constraints for the grammar's internal terminal alphabet component.
TerminalSymbolType | used for the terminal alphabet of the grammar. |
NonterminalSymbolType | used for the nonterminal alphabet, and the initial symbol of the grammar. |
|
inlinestatic |
Returns true as all terminal symbols are possibly available to be terminal symbols.
grammar | the tested grammar |
symbol | the tested symbol |
|
inlinestatic |
Returns true if the terminal symbol is still used in some rule of the grammar.
grammar | the tested grammar |
symbol | the tested symbol |
|
inlinestatic |
Throws runtime exception if the symbol requested to be terminal symbol is already in nonterminal alphabet.
grammar | the tested grammar |
symbol | the tested symbol |
grammar::GrammarException | of the tested symbol is in nonterminal alphabet |