Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <RightRG.h>
Static Public Member Functions | |
static bool | used (const grammar::RightRG< TerminalSymbolType, NonterminalSymbolType > &grammar, const NonterminalSymbolType &symbol) |
static bool | available (const grammar::RightRG< TerminalSymbolType, NonterminalSymbolType > &, const NonterminalSymbolType &) |
static void | valid (const grammar::RightRG< TerminalSymbolType, NonterminalSymbolType > &grammar, const NonterminalSymbolType &symbol) |
Helper class specifying constraints for the grammar's internal nonterminal 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 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 |