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

#include <RightLG.h>

Static Public Member Functions

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

Detailed Description

template<class TerminalSymbolType, class NonterminalSymbolType>
class core::SetConstraint< grammar::RightLG< TerminalSymbolType, NonterminalSymbolType >, TerminalSymbolType, grammar::TerminalAlphabet >

Helper class specifying constraints for the grammar's internal terminal 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::RightLG< TerminalSymbolType, NonterminalSymbolType >, TerminalSymbolType, grammar::TerminalAlphabet >::available ( const grammar::RightLG< TerminalSymbolType, NonterminalSymbolType > &  ,
const TerminalSymbolType &   
)
inlinestatic

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

Parameters
grammarthe tested grammar
symbolthe tested symbol
Returns
true

◆ used()

template<class TerminalSymbolType , class NonterminalSymbolType >
static bool core::SetConstraint< grammar::RightLG< TerminalSymbolType, NonterminalSymbolType >, TerminalSymbolType, grammar::TerminalAlphabet >::used ( const grammar::RightLG< TerminalSymbolType, NonterminalSymbolType > &  grammar,
const TerminalSymbolType &  symbol 
)
inlinestatic

Returns true if the terminal symbol is still used in some rule 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::RightLG< TerminalSymbolType, NonterminalSymbolType >, TerminalSymbolType, grammar::TerminalAlphabet >::valid ( const grammar::RightLG< TerminalSymbolType, NonterminalSymbolType > &  grammar,
const TerminalSymbolType &  symbol 
)
inlinestatic

Throws runtime exception if the symbol requested to be terminal symbol is already in nonterminal 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: