Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
RegExp.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <ext/type_traits>
9
10#include <alib/string>
11#include <alib/vector>
12
14
18
21
22#include <string/LinearString.h>
23
24namespace regexp {
25
29class RegExp;
30
31template < class T >
32using SymbolTypeOfRegexp = typename std::decay < decltype (std::declval<T>().getAlphabet()) >::type::value_type;
33
34regexp::UnboundedRegExp < char > regexpFrom ( const std::string & string );
35
36regexp::UnboundedRegExp < char > regexpFrom ( const char * string );
37
38template < class SymbolType >
41
42 for ( auto & symbol : string )
44
46}
47
48template < class SymbolType >
50 return regexpFrom ( string.getContent ( ) );
51}
52
53template < class SymbolType >
56}
57
58template < class SymbolType = DefaultSymbolType >
60
61} /* namespace regexp */
62
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
Represents the concatenation operator in the regular expression. The node can have 0 to n children in...
Definition: UnboundedRegExpConcatenation.h:44
void appendElement(UnboundedRegExpElement< SymbolType > &&element)
Definition: UnboundedRegExpConcatenation.h:195
Represents unbounded regular expression structure. Regular expression is stored as a tree of Unbounde...
Definition: UnboundedRegExpStructure.h:47
Represents the symbol in the regular expression. The can't have any children.
Definition: UnboundedRegExpSymbol.h:42
Unbounded regular expression represents regular expression. It describes regular languages....
Definition: UnboundedRegExp.h:80
Linear string.
Definition: LinearString.h:57
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
Definition: ToAutomaton.h:15
typename std::decay< decltype(std::declval< T >().getAlphabet()) >::type::value_type SymbolTypeOfRegexp
Definition: RegExp.h:32
regexp::UnboundedRegExp< char > regexpFrom(const std::string &string)
Definition: RegExp.cpp:10