/*
 * ToAutomaton.cpp
 *
 * Created on: 1. 11. 2013
 * Author: Tomas Pecka
 */
#include "ToAutomaton.h"
#include <registration/AlgoRegistration.hpp>

namespace {

auto ToAutomatonLeftRG = registration::AbstractRegister < grammar::convert::ToAutomaton, automaton::NFA < >, const grammar::LeftRG < > & > ( grammar::convert::ToAutomaton::convert, "grammar" ).setDocumentation (
"Performs the conversion.\n\
\n\
@param grammar the left regular grammar to convert\n\
@return finite automaton accepting the language generated by @p grammar" );

auto ToAutomatonRightRG = registration::AbstractRegister < grammar::convert::ToAutomaton, automaton::NFA < >, const grammar::RightRG < > & > ( grammar::convert::ToAutomaton::convert, "grammar" ).setDocumentation (
"Performs the conversion.\n\
\n\
@param grammar the left regular grammar to convert\n\
@return finite automaton accepting the language generated by @p grammar" );

auto ToAutomatonCFG = registration::AbstractRegister < grammar::convert::ToAutomaton, automaton::NPDA < DefaultSymbolType, ext::variant < DefaultSymbolType, DefaultSymbolType >, unsigned >, const grammar::CFG < > & > ( grammar::convert::ToAutomaton::convert, "grammar" ).setDocumentation (
"Performs the conversion.\n\
\n\
@param grammar some context free grammar\n\
@return pushdown automaton accepting the language generated by @p grammar" );

auto ToAutomatonEpsilonFreeCFG = registration::AbstractRegister < grammar::convert::ToAutomaton, automaton::NPDA < DefaultSymbolType, ext::variant < DefaultSymbolType, DefaultSymbolType >, unsigned >, const grammar::EpsilonFreeCFG < > & > ( grammar::convert::ToAutomaton::convert, "grammar" ).setDocumentation (
"Performs the conversion.\n\
\n\
@param grammar some context free grammar\n\
@return pushdown automaton accepting the language generated by @p grammar" );

} /* namespace */
