Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Static Public Member Functions
grammar::RawRules Class Reference

#include <RawRules.h>

Static Public Member Functions

template<class TerminalSymbolType , class NonterminalSymbolType >
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules (const LG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
template<class TerminalSymbolType , class NonterminalSymbolType >
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules (const GNF< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
template<class TerminalSymbolType , class NonterminalSymbolType >
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules (const EpsilonFreeCFG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
template<class TerminalSymbolType , class NonterminalSymbolType >
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules (const CNF< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
template<class TerminalSymbolType , class NonterminalSymbolType >
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules (const CFG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
template<class TerminalSymbolType , class NonterminalSymbolType >
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules (const LeftLG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
template<class TerminalSymbolType , class NonterminalSymbolType >
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules (const LeftRG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
template<class TerminalSymbolType , class NonterminalSymbolType >
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules (const RightLG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 
template<class TerminalSymbolType , class NonterminalSymbolType >
static ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > getRawRules (const RightRG< TerminalSymbolType, NonterminalSymbolType > &grammar)
 

Detailed Description

Implementation of transformation from grammar specific rules to common representation, i.e. A -> (N \cup T) where A \in N and N is set of nonterminal symbols and T is set of terminal symbols of the grammar.

Member Function Documentation

◆ getRawRules() [1/9]

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > grammar::RawRules::getRawRules ( const CFG< TerminalSymbolType, NonterminalSymbolType > &  grammar)
static

\override

◆ getRawRules() [2/9]

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > grammar::RawRules::getRawRules ( const CNF< TerminalSymbolType, NonterminalSymbolType > &  grammar)
static

\override

◆ getRawRules() [3/9]

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > grammar::RawRules::getRawRules ( const EpsilonFreeCFG< TerminalSymbolType, NonterminalSymbolType > &  grammar)
static

\override

◆ getRawRules() [4/9]

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > grammar::RawRules::getRawRules ( const GNF< TerminalSymbolType, NonterminalSymbolType > &  grammar)
static

\override

Here is the call graph for this function:

◆ getRawRules() [5/9]

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > grammar::RawRules::getRawRules ( const LeftLG< TerminalSymbolType, NonterminalSymbolType > &  grammar)
static

\override

Here is the call graph for this function:

◆ getRawRules() [6/9]

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > grammar::RawRules::getRawRules ( const LeftRG< TerminalSymbolType, NonterminalSymbolType > &  grammar)
static

\override

◆ getRawRules() [7/9]

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > grammar::RawRules::getRawRules ( const LG< TerminalSymbolType, NonterminalSymbolType > &  grammar)
static

Get rules in most common format of rules as mapping from leftHandSide to rightHandSides represented as vectors of symbols.

Template Parameters
TerminalSymbolTypethe type of terminal symbols in the grammar
NonterminalSymbolTypethe type of nontermnal symbols in the grammar
Parameters
grammarthe source grammar of rules to transform
Returns
rules of the grammar in a common representation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRawRules() [8/9]

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > grammar::RawRules::getRawRules ( const RightLG< TerminalSymbolType, NonterminalSymbolType > &  grammar)
static

\override

Here is the call graph for this function:

◆ getRawRules() [9/9]

template<class TerminalSymbolType , class NonterminalSymbolType >
ext::map< NonterminalSymbolType, ext::set< ext::vector< ext::variant< TerminalSymbolType, NonterminalSymbolType > > > > grammar::RawRules::getRawRules ( const RightRG< TerminalSymbolType, NonterminalSymbolType > &  grammar)
static

\override


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