Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Static Public Member Functions
regexp::convert::ToGrammar Class Reference

#include <ToGrammar.h>

Static Public Member Functions

template<class SymbolType >
static grammar::RightRG< SymbolType, ext::pair< SymbolType, unsigned > > convert (const regexp::FormalRegExp< SymbolType > &regexp)
 
template<class SymbolType >
static grammar::RightRG< SymbolType, ext::pair< SymbolType, unsigned > > convert (const regexp::UnboundedRegExp< SymbolType > &regexp)
 

Detailed Description

Conversion of regular expression to regular grammar. This class serves as a "default wrapper" over the conversion of RE to RG. It delegates to the glushkov conversion algorithm.

See also
regexp::convert::ToGrammarRightRGGlushkov

Member Function Documentation

◆ convert() [1/2]

template<class SymbolType >
grammar::RightRG< SymbolType, ext::pair< SymbolType, unsigned > > regexp::convert::ToGrammar::convert ( const regexp::FormalRegExp< SymbolType > &  regexp)
static

Converts the regular expression into a grammar (

See also
regexp::convert::ToGrammarRightRGGlushkov::convert).
Template Parameters
SymbolTypethe type of regular expression
Parameters
regexpthe regular expression
Returns
right regular grammar equivalent to original regular expression.
Here is the call graph for this function:

◆ convert() [2/2]

template<class SymbolType >
grammar::RightRG< SymbolType, ext::pair< SymbolType, unsigned > > regexp::convert::ToGrammar::convert ( const regexp::UnboundedRegExp< SymbolType > &  regexp)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Here is the call graph for this function:

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