Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
FormalRTE.h
Go to the documentation of this file.
1
6#pragma once
7
10#include <core/xmlApi.hpp>
11
14
15namespace core {
16
17template < typename SymbolType >
18struct xmlApi < rte::FormalRTE < SymbolType > > {
20 static bool first ( const ext::deque < sax::Token >::const_iterator & input );
21 static std::string xmlTagName ( );
22 static void compose ( ext::deque < sax::Token > & output, const rte::FormalRTE < SymbolType > & input );
23};
24
25template < typename SymbolType >
28
29 std::pair < ext::set < common::ranked_symbol < SymbolType > >, ext::set < common::ranked_symbol < SymbolType > > > alphabets = rte::RTEFromXmlParser::parseAlphabet < SymbolType > ( input );
31 rte::FormalRTE < SymbolType > rte ( std::move ( alphabets.first ), std::move ( alphabets.second ), std::move ( element ) );
32
34 return rte;
35}
36
37template < typename SymbolType >
40}
41
42template < typename SymbolType >
43std::string xmlApi < rte::FormalRTE < SymbolType > >::xmlTagName ( ) {
44 return "FormalRTE";
45}
46
47template < typename SymbolType >
49 output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::START_ELEMENT );
52 output.emplace_back ( xmlTagName ( ), sax::Token::TokenType::END_ELEMENT );
53}
54
55} /* namespace core */
56
Class extending the deque class from the standard library. Original reason is to allow printing of th...
Definition: deque.hpp:44
Definition: set.hpp:44
Represents unbounded regular expression structure. Regular expression is stored as a tree of Unbounde...
Definition: FormalRTEStructure.h:41
Formal regular tree expression represents regular tree expression. It describes regular tree language...
Definition: FormalRTE.h:71
const ext::set< common::ranked_symbol< SymbolType > > & getSubstitutionAlphabet() const &
Definition: FormalRTE.h:170
const ext::set< common::ranked_symbol< SymbolType > > & getAlphabet() const &
Definition: FormalRTE.h:112
const FormalRTEStructure< SymbolType > & getRTE() const &
Definition: FormalRTE.h:298
static void composeAlphabet(ext::deque< sax::Token > &output, const ext::set< common::ranked_symbol< SymbolType > > &alphabetF, const ext::set< common::ranked_symbol< SymbolType > > &alphabetK)
Definition: RTEToXmlComposer.h:97
static void popToken(ext::deque< Token >::iterator &input, Token::TokenType type, const std::string &data)
Definition: FromXMLParserHelper.cpp:39
static bool isToken(ext::deque< Token >::const_iterator input, Token::TokenType type, const std::string &data)
Definition: FromXMLParserHelper.cpp:29
Definition: normalize.hpp:10
Definition: ToFTAGlushkov.h:22
Definition: xmlApi.hpp:27