Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Static Public Member Functions
core::SetConstraint< grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType >, NonterminalSymbolType, grammar::NonterminalAlphabet > Class Template Reference

#include <LeftRG.h>

Static Public Member Functions

static bool used (const grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType > &grammar, const NonterminalSymbolType &symbol)
 
static bool available (const grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType > &, const NonterminalSymbolType &)
 
static void valid (const grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType > &grammar, const NonterminalSymbolType &symbol)
 

Detailed Description

template<class TerminalSymbolType, class NonterminalSymbolType>
class core::SetConstraint< grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType >, NonterminalSymbolType, grammar::NonterminalAlphabet >

Helper class specifying constraints for the grammar's internal nonterminal alphabet component.

Template Parameters
TerminalSymbolTypeused for the terminal alphabet of the grammar.
NonterminalSymbolTypeused for the nonterminal alphabet, and the initial symbol of the grammar.

Member Function Documentation

◆ available()

template<class TerminalSymbolType , class NonterminalSymbolType >
static bool core::SetConstraint< grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType >, NonterminalSymbolType, grammar::NonterminalAlphabet >::available ( const grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType > &  ,
const NonterminalSymbolType &   
)
inlinestatic

Returns true as all terminal symbols are possibly available to be nonterminal symbols.

Parameters
grammarthe tested grammar
symbolthe tested symbol
Returns
true

◆ used()

template<class TerminalSymbolType , class NonterminalSymbolType >
static bool core::SetConstraint< grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType >, NonterminalSymbolType, grammar::NonterminalAlphabet >::used ( const grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType > &  grammar,
const NonterminalSymbolType &  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.

Parameters
grammarthe tested grammar
symbolthe tested symbol
Returns
true if the symbol is used, false othervise
Here is the call graph for this function:

◆ valid()

template<class TerminalSymbolType , class NonterminalSymbolType >
static void core::SetConstraint< grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType >, NonterminalSymbolType, grammar::NonterminalAlphabet >::valid ( const grammar::LeftRG< TerminalSymbolType, NonterminalSymbolType > &  grammar,
const NonterminalSymbolType &  symbol 
)
inlinestatic

Throws runtime exception if the symbol requested to be nonterminal symbol is already in terminal alphabet.

Parameters
grammarthe tested grammar
symbolthe tested symbol
Exceptions
grammar::GrammarExceptionof the tested symbol is in nonterminal alphabet
Here is the call graph for this function:

The documentation for this class was generated from the following file: