ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
semiring::regex_t Struct Reference

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 ∅

Detailed Description

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.

Definition at line 63 of file Regex.h.

Member Enumeration Documentation

◆ Kind

enum semiring::regex_t::Kind : unsigned char

The operator at the root of the expression.

Enumerator
EMPTY 
EPSILON 
ATOM 
STAR 
CONCAT 
UNION 

Definition at line 65 of file Regex.h.

Member Function Documentation

◆ hash()

std::size_t semiring::regex_t::hash ( ) const
inline

Definition at line 98 of file Regex.h.

Here is the caller graph for this function:

◆ kind()

regex_t::Kind semiring::regex_t::kind ( ) const
inline

Definition at line 94 of file Regex.h.

Here is the caller graph for this function:

◆ operator!=()

bool semiring::regex_t::operator!= ( const regex_t & o) const
inline

Syntactic inequality.

Definition at line 73 of file Regex.h.

◆ operator==()

bool semiring::regex_t::operator== ( const regex_t & o) const
inline

Syntactic equality.

Definition at line 102 of file Regex.h.

◆ render() [1/2]

std::string semiring::regex_t::render ( ) const
inline

The expression, as text.

Definition at line 77 of file Regex.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ render() [2/2]

void semiring::regex_t::render ( std::string & out) const
inline

Append the expression, as text, to out.

Definition at line 115 of file Regex.h.

Here is the call graph for this function:

Member Data Documentation

◆ node

std::shared_ptr<const regex_node> semiring::regex_t::node

The root; null for ∅

Definition at line 66 of file Regex.h.


The documentation for this struct was generated from the following file:
  • /home/pierre/git/software/provsql/src/semiring/Regex.h