Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
UnboundedRegExp.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 < regexp::UnboundedRegExp < 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 regexp::UnboundedRegExp < SymbolType > & input );
23};
24
25template < typename SymbolType >
28
29 ext::set < SymbolType > alphabet = regexp::RegExpFromXmlParser::parseAlphabet < SymbolType > ( input );
30
32 regexp::UnboundedRegExp < SymbolType > regexp ( std::move ( alphabet ), std::move ( structure ) );
33
35
36 return regexp;
37}
38
39template < typename SymbolType >
42}
43
44template < typename SymbolType >
46 return "UnboundedRegExp";
47}
48
49template < typename SymbolType >
51 output.emplace_back ( xmlTagName(), sax::Token::TokenType::START_ELEMENT );
54 output.emplace_back ( xmlTagName(), sax::Token::TokenType::END_ELEMENT );
55}
56
57} /* namespace core */
58
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
static void composeAlphabet(ext::deque< sax::Token > &output, const ext::set< SymbolType > &alphabet)
Definition: RegExpToXmlComposer.h:141
Represents unbounded regular expression structure. Regular expression is stored as a tree of Unbounde...
Definition: UnboundedRegExpStructure.h:47
Unbounded regular expression represents regular expression. It describes regular languages....
Definition: UnboundedRegExp.h:80
const ext::set< SymbolType > & getAlphabet() const &
Definition: UnboundedRegExp.h:122
const UnboundedRegExpStructure< SymbolType > & getRegExp() const &
Definition: UnboundedRegExp.h:210
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: BarSymbol.cpp:12
Definition: normalize.hpp:10
Definition: ToAutomaton.h:15
Definition: xmlApi.hpp:27