![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
A regular expression: an immutable tree, shared between the expressions built from it. More...
#include "Regex.h"
Public Types | |
| enum | Kind : unsigned char { EMPTY , EPSILON , ATOM , STAR , CONCAT , UNION } |
| The operator at the root of the expression. More... | |
Public Member Functions | |
| Kind | kind () const |
| std::size_t | hash () const |
| bool | operator== (const regex_t &o) const |
| Syntactic equality. | |
| bool | operator!= (const regex_t &o) const |
| Syntactic inequality. | |
| std::string | render () const |
| The expression, as text. | |
| void | render (std::string &out) const |
Append the expression, as text, to out. | |
Public Attributes | |
| std::shared_ptr< const regex_node > | node |
| The root; null for ∅ | |
A regular expression: an immutable tree, shared between the expressions built from it.
Copying an expression, or concatenating two, copies no text: the text is rendered only once, by render(), for a result. Unions and concatenations are kept flat, so that a union of unions is one union, without an alternative already present.
| enum semiring::regex_t::Kind : unsigned char |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| std::shared_ptr<const regex_node> semiring::regex_t::node |