Regex

Typedefs

using Reg = Regex<char>

Functions

template<class T>
std::ostream &operator<<(std::ostream&, const Regex<T>&)
template<class T>
bool operator==(const Regex<T>&, const Regex<T>&)
template<class T>
class Regex

Public Types

enum Type

Values:

enumerator EMPTY_SET
enumerator EMPTY_STRING
enumerator CHARACTER
enumerator CONCATENATION
enumerator ALTERNATION
enumerator KLEEN_STAR

Public Functions

inline Regex()
inline Regex(const Regex &r)
inline ~Regex()
inline Type type() const
inline Regex *regex1() const
inline Regex *regex2() const
inline T character() const

Public Static Functions

static inline Regex *emptySet()
static inline Regex *emptyString()
static inline Regex *character(const T c)
static inline Regex *concatenation(Regex *a, Regex *b)
static inline Regex *alternation(Regex *a, Regex *b)
static inline Regex *kleenStar(Regex *r)

Private Functions

std::pair<Regex<std::pair<T, int>>*, int> linearised(const int i) const

Private Members

Type m_type
Regex *m_regex1
Regex *m_regex2
T m_character

Friends

friend class Regex
friend bool operator==(const Regex<T>&, const Regex<T>&)
friend std::ostream & operator (std::ostream &, const Regex< T > &)