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